add_action ( 'customize_register' , 'xxx_tc_customize_register' ,20,1 );
add_filter ( '__customize_map' , 'xxx_tc_customizer_map');
add_action ('init' , 'xxx_tc_customizer_map_init');
function xxx_tc_customizer_map_init() {
remove_action( 'customize_register', array( TC_featured_pages::$instance , 'tc_customize_register'), 20, 1 );
add_action ( 'customize_register' , 'xxx_tc_customize_register' ,20,1 );
add_action ( '__before_main_container' , 'xxx_tc_fp_block_display', 10 );
remove_filter ( '__customize_map' , array( TC_customize::$instance , 'tc_customizer_map' ));
add_filter ( '__customize_map' , 'xxx_tc_customizer_map');
remove_action( '__before_main_container', array( TC_featured_pages::$instance , 'tc_fp_block_display'), 10 );
add_action ( '__before_main_container' , 'xxx_tc_fp_block_display', 10 );
}
function xxx_tc_customize_register( $wp_customize) {
return TC_customize::$instance -> tc_customize_factory ( $wp_customize ,
$args = TC_customize::$instance -> tc_customize_arguments(),
$setup = tc__f('__customize_map', $get_default = 'true' ) );
}
function xxx_tc_customizer_map($r) {
$r = TC_customize::$instance->tc_customizer_map();
$r['add_setting_control']['tc_theme_options[tc_featured_page_four]'] = array(
'label' => __( 'Home featured page four' , 'customizr' ),
'section' => 'tc_frontpage_settings' ,
'type' => 'dropdown-pages' ,
'priority' => 90,
);
$r['add_setting_control']['tc_theme_options[tc_featured_text_four]'] = array(
'sanitize_callback' => array( TC_customize::$instance , 'tc_sanitize_textarea' ),
'transport' => 'postMessage',
'control' => 'TC_controls' ,
'label' => __( 'Featured text one (200 car. max)' , 'customizr' ),
'section' => 'tc_frontpage_settings' ,
'type' => 'textarea' ,
'notice' => __( 'You need to select a page first. Leave this field empty if you want to use the page excerpt.' , 'customizr' ),
'priority' => 100,
);
return $r;
}