manager->get_setting('banner_options_main')->value(); if($banner_slider_option == 'banner_slider_section_option'){ return true; } else{ return false; } } function banner_slider_category_function($control){ $no_option = $control->manager->get_setting('banner_options_main')->value(); $banner_slider_category_option = $control->manager->get_setting('banner_slider_section_option')->value(); if ($banner_slider_category_option == 'banner_slider_category_option' && $no_option == 'banner_slider_section_option') { return true; }else{ return false;} } function header_video_act_call($control){ $video_banner_section = $control->manager->get_setting('banner_options_main')->value(); if($video_banner_section == 'header_video'){ return true; }else{ return false; } } function video_banner_section_function($control){ $video_banner_section = $control->manager->get_setting('banner_options_main')->value(); if($video_banner_section == 'video_banner_section'){ return true; }else{ return false; } } function slider_callback($control){ $banner_slider_option = $control->manager->get_setting('banner_options_main')->value(); $banner_slider_section_option = $control->manager->get_setting('banner_slider_section_option')->value(); if ($banner_slider_option == 'banner_slider_section_option' && $banner_slider_section_option == 'latest_post_show') { return true; }else{ return false; } } function overlay_text($control){ $banner_slider_option = $control->manager->get_setting('banner_options_main')->value(); if($banner_slider_option == 'header_video' || $banner_slider_option == 'video_banner_section'){ return true; }else{ return false; } } /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function Blogarise_Customize_register($wp_customize) { // Load customize controls. require get_template_directory().'/inc/ansar/customize/customizer-control.php'; // Load customize sanitize. require get_template_directory().'/inc/ansar/customize/customizer-sanitize.php'; $wp_customize->get_setting( 'custom_logo')->sanitize_callback = 'esc_url_raw'; $wp_customize->get_setting( 'custom_logo')->transport = 'postMessage'; $wp_customize->get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; $wp_customize->get_setting('header_textcolor')->transport = 'postMessage'; // use get control $wp_customize->get_control( 'header_textcolor')->label = __( 'Site Info Color', 'blogarise' ); $wp_customize->get_control( 'header_textcolor')->section = 'colors'; $wp_customize->get_control( 'header_textcolor')->priority = 1; $wp_customize->get_control( 'header_textcolor')->default = '#000'; $wp_customize->get_setting('background_color')->transport = 'refresh'; if (isset($wp_customize->selective_refresh)) { // site logo $wp_customize->selective_refresh->add_partial('custom_logo', array( 'selector' => '.site-logo', 'render_callback' => 'custom_logo_selective_refresh' )); // site title $wp_customize->selective_refresh->add_partial('blogname', array( 'selector' => '.site-title a, .site-title-footer a', 'render_callback' => 'Blogarise_Customize_partial_blogname', )); // site tagline $wp_customize->selective_refresh->add_partial('blogdescription', array( 'selector' => '.site-description, .site-description-footer', 'render_callback' => 'Blogarise_Customize_partial_blogdescription', )); $wp_customize->selective_refresh->add_partial('blogarise_header_social_icons', array( 'selector' => '.bs-head-detail .bs-social' )); $wp_customize->selective_refresh->add_partial('blogarise_footer_social_icons', array( 'selector' => 'footer .bs-social ', )); $wp_customize->selective_refresh->add_partial('blogarise_scrollup_enable', array( 'selector' => '.bs_upscr', )); $wp_customize->selective_refresh->add_partial('you_missed_title', array( 'selector' => '.missed .bs-widget-title .title', 'render_callback' => 'Blogarise_Customize_partial_you_missed_title', )); $wp_customize->selective_refresh->add_partial('blogarise_related_post_title', array( 'selector' => '.single-class .col-lg-9 .bs-widget-title .title', 'render_callback' => 'Blogarise_Customize_partial_blogarise_related_post_title', )); $wp_customize->selective_refresh->add_partial('blogarise_menu_search', array( 'selector' => '.bs-default .desk-header .msearch', 'render_callback' => 'Blogarise_Customize_partial_blogarise_menu_search', )); $wp_customize->selective_refresh->add_partial('blogarise_lite_dark_switcher', array( 'selector' => '.bs-menu-full .desk-header.right-nav', 'render_callback' => 'blogarise_customize_partial_right_nav', )); $wp_customize->selective_refresh->add_partial('blogarise_subsc_link', array( 'selector' => '.bs-menu-full .desk-header.right-nav', 'render_callback' => 'blogarise_customize_partial_right_nav', )); $wp_customize->selective_refresh->add_partial('blogarise_subsc_open_in_new', array( 'selector' => '.bs-menu-full .desk-header.right-nav', 'render_callback' => 'blogarise_customize_partial_right_nav', )); $wp_customize->selective_refresh->add_partial('blogarise_menu_search', array( 'selector' => '.bs-menu-full .desk-header.right-nav', 'render_callback' => 'blogarise_customize_partial_right_nav', )); $wp_customize->selective_refresh->add_partial('blogarise_menu_subscriber', array( 'selector' => '.bs-menu-full .desk-header.right-nav', 'render_callback' => 'blogarise_customize_partial_right_nav', )); $wp_customize->selective_refresh->add_partial('blogarise_footer_copyright', array( 'selector' => '.bs-footer-copyright .sep', )); $wp_customize->selective_refresh->add_partial('header_social_icon_enable', array( 'selector' => '.bs-head-detail .col-md-4.col-xs-12, .bs-header-main .container > .row > .col-lg-4:not(.navbar-header, .d-lg-flex)', 'render_callback' => 'blogarise_customize_partial_head_social_icon', )); $wp_customize->selective_refresh->add_partial('blogarise_header_social_icons', array( 'selector' => '.bs-head-detail .col-md-4.col-xs-12, .bs-header-main .container > .row > .col-lg-4:not(.navbar-header, .d-lg-flex)', 'render_callback' => 'blogarise_customize_partial_head_social_icon', )); $wp_customize->selective_refresh->add_partial('blogarise_drop_caps_enable', array( 'selector' => '.content-right .bs-blog-post .bs-blog-meta, .content-full .bs-blog-post .bs-blog-meta', )); $wp_customize->selective_refresh->add_partial('blogarise_single_post_admin_details', array( 'selector' => '.bs-blog-post .bs-header .bs-blog-meta ', )); $wp_customize->selective_refresh->add_partial('banner_advertisement_section_url', array( 'selector' => '.bs-header-main .attachment-full.size-full ', )); $wp_customize->selective_refresh->add_partial('breaking_news_title', array( 'selector' => '.mg-latest-news .bn_title .title', 'render_callback' => 'Blogarise_Customize_partial_breaking_news_title', )); $wp_customize->selective_refresh->add_partial('brk_news_enable', array( 'selector' => '.bs-head-detail', 'render_callback' => 'Blogarise_Customize_partial_brk_news_enable', )); $wp_customize->selective_refresh->add_partial('blogarise_content_layout', array( 'selector' => '.index-class .container > .row, .archive-class > .container > .row', 'render_callback' => 'blogarise_customize_partial_content_layout', )); $wp_customize->selective_refresh->add_partial('blogarise_page_layout', array( 'selector' => '.page-class > .container > .row', 'render_callback' => 'blogarise_customize_partial_page_layout', )); } $default = blogarise_get_default_theme_options(); /*Theme option panel info*/ require get_template_directory().'/inc/ansar/customize/header-options.php'; require get_template_directory().'/inc/ansar/customize/theme-options.php'; /*theme general layout panel*/ require get_template_directory().'/inc/ansar/customize/theme-layout.php'; /*theme Frontpage panel*/ require get_template_directory().'/inc/ansar/customize/frontpage-featured.php'; } add_action('customize_register', 'Blogarise_Customize_register'); function custom_logo_selective_refresh() { if( get_theme_mod( 'custom_logo' ) === "" ) return; echo '