get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; /*----------- Move Customizer default Control -----------*/ $aazeen_appearance_options = $wp_customize->get_control('background_color'); if ($aazeen_appearance_options) { $aazeen_appearance_options->section = 'aazeen_appearance_options'; } $homewidgetsarea_section = $wp_customize->get_section('sidebar-widgets-home-sidebar'); if (! empty($homewidgetsarea_section)) { $homewidgetsarea_section->panel = 'aazeen_home_options'; $homewidgetsarea_section->title = esc_attr__('Home Sections', 'aazeen'); $homewidgetsarea_section->priority = 2; $homewidgetsarea_section->type = 'expanded'; } } add_action('customize_register', 'aazeen_customize_register'); /** * Returns false if Creative Homepage is activated. */ function aazeen_is_active_creative_homepage() { if ( 'page' == get_option( 'show_on_front' ) ) { $frontpage_id = get_option( 'page_on_front' ); $frontpage_slug = get_page_template_slug( $frontpage_id ); if ( $frontpage_slug == 'template-creative.php' ) { return true; } else { return false; } } else { return false; } } function aazeen_inactive_creative() { if ( true == aazeen_is_active_creative_homepage() ) { return false; } else { return true; } } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function aazeen_customize_preview_js() { wp_enqueue_script('aazeen_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true); } add_action('customize_preview_init', 'aazeen_customize_preview_js'); require get_template_directory() . '/inc/customizer/config.php'; require get_template_directory() . '/inc/customizer/panels.php'; require get_template_directory() . '/inc/customizer/sections.php'; require get_template_directory() . '/inc/customizer/fields.php';