get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'applica_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'applica_customize_partial_blogdescription', ) ); } /*Get default values to set while building customizer elements*/ $default_options = applica_get_default_customizer_values(); /* Header Background Color*/ $wp_customize->add_setting( 'applica_options[header_bg_color]', array( 'default' => $default_options['header_bg_color'], 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'applica_options[header_bg_color]', array( 'label' => __('Header Background Color', 'applica'), 'section' => 'colors', 'type' => 'color', 'priority' => 1, ) ) ); /*Load customizer options.*/ require_once get_template_directory() . '/inc/customizer/theme-options/page-loading-add.php'; require_once get_template_directory() . '/inc/customizer/theme-options/preloader.php'; require_once get_template_directory() . '/inc/customizer/theme-options/night-mode.php'; require_once get_template_directory() . '/inc/customizer/theme-options/topbar.php'; require_once get_template_directory() . '/inc/customizer/theme-options/header.php'; require_once get_template_directory() . '/inc/customizer/theme-options/front-page-banner.php'; require_once get_template_directory() . '/inc/customizer/theme-options/front-page.php'; require_once get_template_directory() . '/inc/customizer/theme-options/general-setting.php'; require_once get_template_directory() . '/inc/customizer/theme-options/archive.php'; require_once get_template_directory() . '/inc/customizer/theme-options/read-time.php'; require_once get_template_directory() . '/inc/customizer/theme-options/single.php'; require_once get_template_directory() . '/inc/customizer/theme-options/pagination.php'; require_once get_template_directory() . '/inc/customizer/theme-options/footer-recommended.php'; require_once get_template_directory() . '/inc/customizer/theme-options/footer.php'; require_once get_template_directory() . '/inc/customizer/theme-options/theme-options.php'; // View Pro $wp_customize->add_section( 'pro__section', array( 'title' => '' . esc_html__( 'View PRO Version', 'applica' ), 'priority' => 2, 'description' => sprintf( /* translators: %s: The view pro link. */ __( '

Need More? Go PRO

Take it to the next level. See the features below:

%s
', 'applica' ), /* translators: %1$s: The view pro URL, %2$s: The view pro link text. */ sprintf( '%2$s', esc_url( applica_get_pro_link() ), esc_html__( 'View Applica PRO', 'applica' ) ) ), ) ); $wp_customize->add_setting( 'applica_style_view_pro_desc', array( 'default' => '', 'sanitize_callback' => '__return_true', ) ); $wp_customize->add_control( 'applica_style_view_pro_desc', array( 'section' => 'pro__section', 'type' => 'hidden', ) ); } add_action( 'customize_register', 'applica_customize_register' ); /** * Render the site title for the selective refresh partial. * * @return void */ function applica_customize_partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * * @return void */ function applica_customize_partial_blogdescription() { bloginfo( 'description' ); } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function applica_customize_preview_js() { wp_enqueue_script( 'applica-customizer', get_template_directory_uri() . '/assets/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true ); } add_action( 'customize_preview_init', 'applica_customize_preview_js' ); /** * Customizer control scripts and styles. * * @since 1.0.0 */ function applica_customizer_control_scripts(){ wp_enqueue_style('applica-customizer-css', get_template_directory_uri() . '/assets/css/customizer.css'); wp_enqueue_script('applica-customizer-controls', get_template_directory_uri() . '/assets/js/customizer-admin.js', array('jquery', 'jquery-ui-sortable', 'customize-controls') ); } add_action('customize_controls_enqueue_scripts', 'applica_customizer_control_scripts', 0); /** * Generate a link to the Hive Lite info page. */ function applica_get_pro_link() { return 'https://www.themeinwp.com/theme/applica-pro/'; }