get_section( 'colors' )->panel = 'theme_colors_panel'; $wp_customize->get_section( 'colors' )->title = esc_html__('Color Options','boundlessnews'); $wp_customize->get_section( 'title_tagline' )->panel = 'theme_general_settings'; $wp_customize->get_section( 'header_image' )->panel = 'theme_general_settings'; $wp_customize->get_section( 'background_image' )->panel = 'theme_general_settings'; $wp_customize->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' => 'boundlessnews_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'boundlessnews_customize_partial_blogdescription', ) ); } // Theme Options Panel. $wp_customize->add_panel( 'theme_option_panel', array( 'title' => esc_html__( 'Theme Options', 'boundlessnews' ), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_panel( 'theme_general_settings', array( 'title' => esc_html__( 'General Settings', 'boundlessnews' ), 'priority' => 10, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_panel( 'theme_colors_panel', array( 'title' => esc_html__( 'Color Settings', 'boundlessnews' ), 'priority' => 15, 'capability' => 'edit_theme_options', ) ); // Template Options $wp_customize->add_panel( 'theme_template_pannel', array( 'title' => esc_html__( 'Template Settings', 'boundlessnews' ), 'priority' => 150, 'capability' => 'edit_theme_options', ) ); // Register custom section types. $wp_customize->register_section_type( 'BoundlessNews_Customize_Section_Upsell' ); // Register sections. $wp_customize->add_section( new BoundlessNews_Customize_Section_Upsell( $wp_customize, 'theme_upsell', array( 'title' => esc_html__( 'BoundlessNews Pro', 'boundlessnews' ), 'pro_text' => esc_html__( 'Upgrade To Pro', 'boundlessnews' ), 'pro_url' => esc_url('https://www.themeinwp.com/theme/boundlessnews-pro/'), 'priority' => 1, ) ) ); } endif; add_action( 'customize_register', 'boundlessnews_customize_register' ); /** * Customizer Enqueue scripts and styles. */ if (!function_exists('boundlessnews_customizer_scripts')) : function boundlessnews_customizer_scripts(){ wp_enqueue_script('jquery-ui-button'); wp_enqueue_style('boundlessnews-customizer', get_template_directory_uri() . '/assets/lib/custom/css/customizer.css'); wp_enqueue_script('boundlessnews-customizer', get_template_directory_uri() . '/assets/lib/custom/js/customizer.js', array('jquery','customize-controls'), '', 1); $ajax_nonce = wp_create_nonce('boundlessnews_customizer_ajax_nonce'); wp_localize_script( 'boundlessnews-customizer', 'boundlessnews_customizer', array( 'ajax_url' => esc_url( admin_url( 'admin-ajax.php' ) ), 'ajax_nonce' => $ajax_nonce, ) ); } endif; add_action('customize_controls_enqueue_scripts', 'boundlessnews_customizer_scripts'); add_action('customize_controls_init', 'boundlessnews_customizer_scripts'); /** * Customizer Enqueue scripts and styles. */ function boundlessnews_customizer_repearer(){ wp_enqueue_style('boundlessnews-repeater', get_template_directory_uri() . '/assets/lib/custom/css/repeater.css'); wp_enqueue_script('boundlessnews-repeater', get_template_directory_uri() . '/assets/lib/custom/js/repeater.js', array('jquery','customize-controls'), '', 1); $boundlessnews_post_category_list = boundlessnews_post_category_list(); $cat_option = ''; if( $boundlessnews_post_category_list ){ foreach( $boundlessnews_post_category_list as $key => $cats ){ $cat_option .= ""; } } wp_localize_script( 'boundlessnews-repeater', 'boundlessnews_repeater', array( 'optionns' => "