get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_section( 'static_front_page' )->title = esc_html__('Enable Front Page', 'business-roy'); $wp_customize->get_section( 'static_front_page' )->priority = 25; $wp_customize->get_control('header_textcolor')->section = "title_tagline"; /** * Upgrade Pro Version */ $wp_customize->add_setting('business_roy_title_tagline_upgrade_text', array( 'sanitize_callback' => 'business_roy_sanitize_text' )); $wp_customize->add_control(new BusinessRoy_Upgrade_Text($wp_customize, 'business_roy_title_tagline_upgrade_text', array( 'section' => 'title_tagline', 'label' => esc_html__('For More Settings,', 'business-roy'), 'choices' => array( esc_html__('Title, Tagline & Logo Alignment', 'business-roy'), esc_html__('Adjust Title, Tagline & Logo', 'business-roy') ), 'priority' => 250, 'active_callback' => 'business_roy_upgrade_notice', ))); $wp_customize->register_control_type('BusinessRoy_Custom_Control_Tab'); $wp_customize->register_control_type('BusinessRoy_Background_Control'); $wp_customize->register_control_type('BusinessRoy_Range_Slider_Control'); $wp_customize->register_control_type('BusinessRoy_Sortable_Control'); $wp_customize->register_control_type('BusinessRoy_Color_Tab_Control'); $wp_customize->register_control_type('BusinessRoy_Custom_Control_Buttonset'); $wp_customize->register_section_type('BusinessRoy_Toggle_Section'); $wp_customize->register_section_type('BusinessRoy_Upgrade_Section'); /** * pro controller */ require get_template_directory() . '/inc/customizer/customizer-panel/social-settings.php'; require get_template_directory() . '/inc/customizer/customizer-panel/quick-info.php'; require get_template_directory() . '/inc/customizer/customizer-panel/footer.php'; require get_template_directory() . '/inc/customizer/customizer-panel/colors.php'; /** * Enable Front Page. */ $wp_customize->add_setting('business_roy_enable_frontpage', array( 'default' => 'disable', 'sanitize_callback' => 'business_roy_sanitize_switch', //done )); $wp_customize->add_control(new BusinessRoy_Switch_Control($wp_customize, 'business_roy_enable_frontpage', array( 'label' => esc_html__('Enable FrontPage', 'business-roy'), 'settings' => 'business_roy_enable_frontpage', 'description' => esc_html__( 'Note :- Overwrites the home page display setting and shows the frontpage', 'business-roy' ), 'section' => 'static_front_page', 'switch_label' => array( 'enable' => esc_html__('On', 'business-roy'), 'disable' => esc_html__('Off', 'business-roy'), ), ))); // List All Pages $pages = array(); $pages_obj = get_pages(); $pages[''] = esc_html__('Select Page', 'business-roy'); foreach ($pages_obj as $page) { $pages[$page->ID] = $page->post_title; } $blog_cat = business_roy_post_category(); /** * Header Settings. */ $wp_customize->add_panel('business_roy_header_settings', array( 'title' => esc_html__('Header Settings','business-roy'), 'priority' => 10, )); require get_template_directory() . '/inc/customizer/customizer-panel/general-settings.php'; require get_template_directory() . '/inc/customizer/customizer-panel/top-header.php'; require get_template_directory() . '/inc/customizer/customizer-panel/header.php'; require get_template_directory() . '/inc/customizer/customizer-panel/header-cta.php'; require get_template_directory() . '/inc/customizer/customizer-panel/blog.php'; /** * Home Page Settings */ $wp_customize->add_panel('business_roy_frontpage_settings', array( 'title' => esc_html__('Home Sections','business-roy'), 'priority' => 35, 'description' => esc_html__('Drag and Drop to Reorder', 'business-roy'). '', )); require get_template_directory() . '/inc/customizer/customizer-panel/home/common-settings.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/breadcrumb.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/slider.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/aboutus.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/promo-services.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/cta.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/services.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/video-cta.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/how_it_works.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/recentwork.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/testimonial.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/team.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/client.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/blog.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/contact-settings.php'; require get_template_directory() . '/inc/customizer/customizer-panel/home/counter.php'; /** * Page Layout Sidebar Options */ $wp_customize->add_section('business_roy_sidebar', array( 'title' => esc_html__('Page Sidebar Settings','business-roy'), 'panel' => 'business_roy_general_settings_panel', )); $wp_customize->add_setting("business_roy_page_heading", array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new BusinessRoy_Customize_Heading($wp_customize, "business_roy_page_heading", array( 'section' => "business_roy_sidebar", 'label' => esc_html__('Page Layout Setting', 'business-roy'), ))); $wp_customize->add_setting('business_roy_page_sidebar', array( 'default' => 'no', 'sanitize_callback' => 'business_roy_sanitize_options' )); $wp_customize->add_control(new BusinessRoy_Selector($wp_customize, 'business_roy_page_sidebar', array( 'section' => 'business_roy_sidebar', //'label' => esc_html__('Page Layout', 'business-roy'), 'options' => array( 'left' => get_template_directory_uri() . '/inc/customizer/images/left-sidebar.png', 'right' => get_template_directory_uri() . '/inc/customizer/images/right-sidebar.png', 'no' => get_template_directory_uri() . '/inc/customizer/images/no-sidebar.png', ) ))); /** * Upgrade Pro Version */ $wp_customize->add_setting('business_roy_pro_upgrade_page_layout_text', array( 'sanitize_callback' => 'business_roy_sanitize_text' )); $wp_customize->add_control(new BusinessRoy_Upgrade_Text($wp_customize, 'business_roy_pro_upgrade_page_layout_text', array( 'section' => 'business_roy_sidebar', 'label' => esc_html__('For More Settings,', 'business-roy'), 'choices' => array( esc_html__('Sticky widget sidebar options', 'business-roy'), ), 'priority' => 250, 'active_callback' => 'business_roy_upgrade_notice', ))); $wp_customize->add_section(new BusinessRoy_Upgrade_Section($wp_customize, 'business_roy-frontpage-notice', array( 'title' => sprintf(esc_html__('Important! Home Page Sections are not enabled. Enable it %1shere%2s.', 'business-roy'), '', ''), 'priority' => -1, 'class' => 'ikthemes-enable-front', 'panel' => 'business_roy_frontpage_settings', ))); /****** Upgrade Pro in Front Page Section */ $wp_customize->add_section(new BusinessRoy_Upgrade_Section($wp_customize, 'business_roy_frontpage_upgrade_pro_section', array( 'title' => esc_html__('More Sections on Premium', 'business-roy'), 'panel' => 'business_roy_frontpage_settings', 'priority' => 1000, 'class' => 'ikthemes-boxed', 'options' => array( esc_html__('- Each section seats more styles and customization options', 'business-roy'), esc_html__('- Multiple Services Layouts', 'business-roy'), esc_html__('- News and Events Update Section', 'business-roy'), esc_html__('- Free Hand Text (HTML)', 'business-roy'), esc_html__('- Highlight Section', 'business-roy'), esc_html__('- WooCommerce Section', 'business-roy'), esc_html__('- Pricing table with advance features', 'business-roy'), esc_html__('- Advanced Tab Section', 'business-roy'), esc_html__('- 40+ Custom Patterns', 'business-roy'), esc_html__('- Advanced Typography Settings', 'business-roy'), esc_html__('----------------------------------------------- Many More Sections ---------', 'business-roy'), esc_html__('Elementor page builder compatible. All the above sections can be created with Elementor page builder or customizer whichever you prefer.', 'business-roy'), ), 'active_callback' => 'business_roy_upgrade_notice', 'upgrade_text' => esc_html__('Upgrade to Pro', 'business-roy'), 'upgrade_url' => 'https://ikreatethemes.com/wordpress-themes/business-roy-pro/', ))); } add_action( 'customize_register', 'business_roy_customize_register' ); add_action( 'customize_controls_print_scripts', 'business_roy_customizer_dynamic_script', 30 ); function business_roy_customizer_dynamic_script(){ ?> description) { ?> description); ?> choices; if ($choices) { echo ''; } } } } } if ( class_exists( 'WP_Customize_Section' ) ) { if ( !class_exists( 'BusinessRoy_Upgrade_Section' ) ) { class BusinessRoy_Upgrade_Section extends WP_Customize_Section { /** * The type of customize section being rendered. * * @since 1.0.0 * @access public * @var string */ public $type = 'business-roy-upgrade-section'; public $class = ''; /** * Custom button text to output. * * @since 1.0.0 * @access public * @var string */ public $upgrade_text = ''; /** * Custom pro button URL. * * @since 1.0.0 * @access public * @var string */ public $upgrade_url = ''; public $options = array(); /** * Add custom parameters to pass to the JS via JSON. * * @since 1.0.0 * @access public * @return void */ public function json() { $json = parent::json(); $json['upgrade_text'] = $this->upgrade_text; $json['upgrade_url'] = $this->upgrade_url; $json['options'] = $this->options; $json['class'] = $this->class; return $json; } /** * Outputs the Underscore.js template. * * @since 1.0.0 * @access public * @return void */ protected function render_template() { ?>
  • <# if ( _.isEmpty(data.options) ) { #>

    <# if ( data.title ) { #> {{{ data.title }}} <# } #> <# if ( data.upgrade_text && data.upgrade_url ) { #> {{ data.upgrade_text }} <# } #>

    <# }else{ #> <# _.each( data.options, function(key, value) { #> {{{ key }}}
    <# }) #> <# if ( data.upgrade_text && data.upgrade_url ) { #> {{ data.upgrade_text }} <# } #> <# } #>
  • label ); ?> description){ ?> description ); ?> link(); ?> value="value() ); ?>">