register_section_type( Business_Lawyer_Firm_Button::class ); $manager->add_section( new Business_Lawyer_Firm_Button( $manager, 'business_lawyer_firm_pro', [ 'title' => __( 'Lawyer Firm Pro', 'business-lawyer-firm' ), 'priority' => 0, 'button_text' => __( 'GET PREMIUM', 'business-lawyer-firm' ), 'button_url' => esc_url( 'https://www.themagnifico.net/themes/lawyer-wordpress-theme/', 'business-lawyer-firm') ] ) ); } ); // Load the JS and CSS. add_action( 'customize_controls_enqueue_scripts', function() { $version = wp_get_theme()->get( 'Version' ); wp_enqueue_script( 'business-lawyer-firm-customize-section-button', get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/js/customize-controls.js' ), [ 'customize-controls' ], $version, true ); wp_enqueue_style( 'business-lawyer-firm-customize-section-button', get_theme_file_uri( 'vendor/wptrt/customize-section-button/public/css/customize-controls.css' ), [ 'customize-controls' ], $version ); } ); /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function business_lawyer_firm_customize_register($wp_customize){ // Pro Version class Business_Lawyer_Firm_Customize_Pro_Version extends WP_Customize_Control { public $type = 'pro_options'; public function render_content() { echo 'For More '. esc_html( $this->label ) .'?'; echo ''; echo ''; echo ' '. esc_html( BUSINESS_LAWYER_FIRM_BUY_TEXT,'business-lawyer-firm' ) .''; echo ''; } } // Custom Controls function Business_Lawyer_Firm_sanitize_custom_control( $input ) { return $input; } $wp_customize->get_setting('blogname')->transport = 'postMessage'; $wp_customize->get_setting('blogdescription')->transport = 'postMessage'; $wp_customize->add_setting('business_lawyer_firm_logo_title', array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_logo_title',array( 'label' => __( 'Enable Disable Title', 'business-lawyer-firm' ), 'section' => 'title_tagline', 'settings' => 'business_lawyer_firm_logo_title', 'type' => 'checkbox', ))); //Logo $wp_customize->add_setting('business_lawyer_firm_logo_max_height',array( 'default' => '24', 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_absint' )); $wp_customize->add_control('business_lawyer_firm_logo_max_height',array( 'label' => esc_html__('Logo Width','business-lawyer-firm'), 'section' => 'title_tagline', 'type' => 'number' )); $wp_customize->add_setting('business_lawyer_firm_theme_description', array( 'default' => false, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_theme_description',array( 'label' => __( 'Enable Disable Tagline', 'business-lawyer-firm' ), 'section' => 'title_tagline', 'settings' => 'business_lawyer_firm_theme_description', 'type' => 'checkbox', ))); // Theme Color $wp_customize->add_section('business_lawyer_firm_color_option',array( 'title' => esc_html__('Theme Color','business-lawyer-firm'), 'priority' => 10 )); $wp_customize->add_setting( 'business_lawyer_firm_theme_color', array( 'default' => '#0d0f42', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_theme_color', array( 'label' => esc_html__('First Color Option','business-lawyer-firm'), 'section' => 'business_lawyer_firm_color_option', 'settings' => 'business_lawyer_firm_theme_color' ))); $wp_customize->add_setting( 'business_lawyer_firm_theme_color_2', array( 'default' => '#b12d40', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_theme_color_2', array( 'label' => esc_html__('Second Color Option','business-lawyer-firm'), 'section' => 'business_lawyer_firm_color_option', 'settings' => 'business_lawyer_firm_theme_color_2' ))); // Pro Version $wp_customize->add_setting( 'pro_version_theme_color', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_theme_color', array( 'section' => 'business_lawyer_firm_color_option', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // General Settings $wp_customize->add_section('business_lawyer_firm_general_settings',array( 'title' => esc_html__('General Settings','business-lawyer-firm'), 'priority' => 30, )); $wp_customize->add_setting('business_lawyer_firm_preloader_hide', array( 'default' => false, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_preloader_hide',array( 'label' => __( 'Show Theme Preloader', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_preloader_hide', 'type' => 'checkbox', ))); $wp_customize->add_setting( 'business_lawyer_firm_preloader_bg_color', array( 'default' => '#000', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_preloader_bg_color', array( 'label' => esc_html__('Preloader Background Color','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_preloader_bg_color' ))); $wp_customize->add_setting( 'business_lawyer_firm_preloader_dot_1_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_preloader_dot_1_color', array( 'label' => esc_html__('Preloader First Dot Color','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_preloader_dot_1_color' ))); $wp_customize->add_setting( 'business_lawyer_firm_preloader_dot_2_color', array( 'default' => '#b12d40', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_preloader_dot_2_color', array( 'label' => esc_html__('Preloader Second Dot Color','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_preloader_dot_2_color' ))); $wp_customize->add_setting('business_lawyer_firm_scroll_hide', array( 'default' => false, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_scroll_hide',array( 'label' => __( 'Show Theme Scroll To Top', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_scroll_hide', 'type' => 'checkbox', ))); $wp_customize->add_setting('business_lawyer_firm_sticky_header', array( 'default' => false, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_sticky_header',array( 'label' => __( 'Show Sticky Header', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_sticky_header', 'type' => 'checkbox', ))); // Pro Version $wp_customize->add_setting( 'pro_version_general_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_general_setting', array( 'section' => 'business_lawyer_firm_general_settings', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Top Header $wp_customize->add_section('business_lawyer_firm_top_header',array( 'title' => esc_html__('Top Header','business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_time',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_time',array( 'label' => esc_html__('Opening Time','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_time', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_location',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_location',array( 'label' => esc_html__('Location','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_location', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_phone_number',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_phone_number',array( 'label' => esc_html__('Phone Number','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_phone_number', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_email',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_email',array( 'label' => esc_html__('Email Address','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_email', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_facebook_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_facebook_url',array( 'label' => esc_html__('Facebook Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_facebook_url', 'type' => 'url' )); $wp_customize->add_setting('business_lawyer_firm_twitter_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_twitter_url',array( 'label' => esc_html__('Twitter Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_twitter_url', 'type' => 'url' )); $wp_customize->add_setting('business_lawyer_firm_intagram_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_intagram_url',array( 'label' => esc_html__('Intagram Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_intagram_url', 'type' => 'url' )); $wp_customize->add_setting('business_lawyer_firm_linkedin_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_linkedin_url',array( 'label' => esc_html__('Linkedin Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_linkedin_url', 'type' => 'url' )); $wp_customize->add_setting('business_lawyer_firm_pintrest_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_pintrest_url',array( 'label' => esc_html__('Pinterest Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_header', 'setting' => 'business_lawyer_firm_pintrest_url', 'type' => 'url' )); // Pro Version $wp_customize->add_setting( 'pro_version_top_header_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_top_header_setting', array( 'section' => 'business_lawyer_firm_top_header', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Header $wp_customize->add_section('business_lawyer_firm_header',array( 'title' => esc_html__('Header','business-lawyer-firm') )); $wp_customize->add_setting('business_lawyer_firm_tropy_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_tropy_title',array( 'label' => esc_html__('Heading 1','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_tropy_title', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_tropy_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_tropy_text',array( 'label' => esc_html__('Text 1','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_tropy_text', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_trusted_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_trusted_title',array( 'label' => esc_html__('Heading 2','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_trusted_title', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_trusted_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_trusted_text',array( 'label' => esc_html__('Text 2','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_trusted_text', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_star_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_star_title',array( 'label' => esc_html__('Heading 3','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_star_title', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_star_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_star_text',array( 'label' => esc_html__('Text 3','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_star_text', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_consultation_button',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_consultation_button',array( 'label' => esc_html__('Consultation Button Text','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_consultation_button', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_consultation_button_url',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('business_lawyer_firm_consultation_button_url',array( 'label' => esc_html__('Consultation Button Link','business-lawyer-firm'), 'section' => 'business_lawyer_firm_header', 'setting' => 'business_lawyer_firm_consultation_button_url', 'type' => 'url' )); // Pro Version $wp_customize->add_setting( 'pro_version_header_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_header_setting', array( 'section' => 'business_lawyer_firm_header', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); //Slider $wp_customize->add_section('business_lawyer_firm_top_slider',array( 'title' => esc_html__('Slider Option','business-lawyer-firm') )); $wp_customize->add_setting('business_lawyer_firm_slider_setting', array( 'default' => 0, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_slider_setting',array( 'label' => __( 'Enable Disable Slider', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_top_slider', 'settings' => 'business_lawyer_firm_slider_setting', 'type' => 'checkbox', ))); for ( $business_lawyer_firm_count = 1; $business_lawyer_firm_count <= 3; $business_lawyer_firm_count++ ) { $wp_customize->add_setting( 'business_lawyer_firm_top_slider_page' . $business_lawyer_firm_count, array( 'default' => '', 'sanitize_callback' => 'business_lawyer_firm_sanitize_dropdown_pages' ) ); $wp_customize->add_control( 'business_lawyer_firm_top_slider_page' . $business_lawyer_firm_count, array( 'label' => __( 'Select Slide Page', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_top_slider', 'type' => 'dropdown-pages' ) ); } // Pro Version $wp_customize->add_setting( 'pro_version_slider_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_slider_setting', array( 'section' => 'business_lawyer_firm_top_slider', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Project Section $wp_customize->add_section('business_lawyer_firm_latest_project',array( 'title' => esc_html__('Latest Project Option','business-lawyer-firm') )); $wp_customize->add_setting('business_lawyer_firm_projects_title',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_projects_title',array( 'label' => esc_html__('Section Title','business-lawyer-firm'), 'section' => 'business_lawyer_firm_latest_project', 'setting' => 'business_lawyer_firm_projects_title', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_projects_text',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_projects_text',array( 'label' => esc_html__('Section Text','business-lawyer-firm'), 'section' => 'business_lawyer_firm_latest_project', 'setting' => 'business_lawyer_firm_projects_text', 'type' => 'text' )); $business_lawyer_firm_args = array('numberposts' => -1); $post_list = get_posts($business_lawyer_firm_args); $pst_sls[]= __('Select','business-lawyer-firm'); foreach ($post_list as $key => $p_post) { $pst_sls[$p_post->ID]=$p_post->post_title; } $wp_customize->add_setting('business_lawyer_firm_project_section',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices', )); $wp_customize->add_control('business_lawyer_firm_project_section',array( 'type' => 'select', 'choices' => $pst_sls, 'label' => __('Select Post','business-lawyer-firm'), 'description' => esc_html__('Here you have to select post in below dropdown. Image Dimension ( 580px x 580px )','business-lawyer-firm'), 'section' => 'business_lawyer_firm_latest_project', )); wp_reset_postdata(); $business_lawyer_firm_args = array('numberposts' => -1); $post_list = get_posts($business_lawyer_firm_args); $i = 0; $pst_sls[]= __('Select','business-lawyer-firm'); foreach ($post_list as $key => $p_post) { $pst_sls[$p_post->ID]=$p_post->post_title; } for ( $i = 1; $i <= 4; $i++ ) { $wp_customize->add_setting('business_lawyer_firm_other_project_section'.$i,array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices', )); $wp_customize->add_control('business_lawyer_firm_other_project_section'.$i,array( 'type' => 'select', 'choices' => $pst_sls, 'label' => __('Select Post','business-lawyer-firm'), 'description' => esc_html__('Here you have to select post in below dropdown. Image Dimension ( 260px x 260px )','business-lawyer-firm'), 'section' => 'business_lawyer_firm_latest_project', )); } wp_reset_postdata(); // Pro Version $wp_customize->add_setting( 'pro_version_project_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_project_setting', array( 'section' => 'business_lawyer_firm_latest_project', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Footer $wp_customize->add_section('business_lawyer_firm_site_footer_section', array( 'title' => esc_html__('Footer', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_footer_text_setting', array( 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control('business_lawyer_firm_footer_text_setting', array( 'label' => __('Replace the footer text', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', 'priority' => 1, 'type' => 'text', )); // Pro Version $wp_customize->add_setting( 'pro_version_footer_setting', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_footer_setting', array( 'section' => 'business_lawyer_firm_site_footer_section', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Post Settings $wp_customize->add_section('business_lawyer_firm_post_settings',array( 'title' => esc_html__('Post Settings','business-lawyer-firm'), 'priority' =>40, )); $wp_customize->add_setting('business_lawyer_firm_single_post_thumb',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_post_thumb',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Post Thumbnail', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable post thumbnail on single post.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_single_post_meta',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_post_meta',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Post Meta', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable single post meta such as post date, author, category, comment etc.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_single_post_title',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_post_title',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Post Title', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable title on single post.', 'business-lawyer-firm'), )); } add_action('customize_register', 'business_lawyer_firm_customize_register'); /** * Render the site title for the selective refresh partial. * * @return void */ function business_lawyer_firm_customize_partial_blogname(){ bloginfo('name'); } /** * Render the site tagline for the selective refresh partial. * * @return void */ function business_lawyer_firm_customize_partial_blogdescription(){ bloginfo('description'); } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function business_lawyer_firm_customize_preview_js(){ wp_enqueue_script('business-lawyer-firm-customizer', esc_url(get_template_directory_uri()) . '/assets/js/customizer.js', array('customize-preview'), '20151215', true); } add_action('customize_preview_init', 'business_lawyer_firm_customize_preview_js'); /* ** Load dynamic logic for the customizer controls area. */ function business_lawyer_firm_panels_js() { wp_enqueue_style( 'business-lawyer-firm-customizer-layout-css', get_theme_file_uri( '/assets/css/customizer-layout.css' ) ); wp_enqueue_script( 'business-lawyer-firm-customize-layout', get_theme_file_uri( '/assets/js/customize-layout.js' ), array(), '1.2', true ); } add_action( 'customize_controls_enqueue_scripts', 'business_lawyer_firm_panels_js' );