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/products/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'; //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_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', ))); $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', ))); $wp_customize->add_setting('business_lawyer_firm_logo_title_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'business_lawyer_firm_logo_title_color', array( 'label' => __('Site Title Color', 'business-lawyer-firm'), 'section' => 'title_tagline' ))); $wp_customize->add_setting('business_lawyer_firm_logo_tagline_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'business_lawyer_firm_logo_tagline_color', array( 'label' => __('Site Tagline Color', 'business-lawyer-firm'), 'section' => 'title_tagline' ))); // Pro Version $wp_customize->add_setting( 'pro_version_logo', array( 'sanitize_callback' => 'Business_Lawyer_Firm_sanitize_custom_control' )); $wp_customize->add_control( new Business_Lawyer_Firm_Customize_Pro_Version ( $wp_customize,'pro_version_logo', array( 'section' => 'title_tagline', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // 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_site_width_layout',array( 'default' => 'Full Width', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_site_width_layout',array( 'label' => esc_html__( 'Site Width Layout','business-lawyer-firm' ), 'type' => 'radio', 'section' => 'business_lawyer_firm_general_settings', 'choices' => array( 'Full Width' => __('Full Width','business-lawyer-firm'), 'Wide Width' => __('Wide Width','business-lawyer-firm'), 'Container Width' => __('Container Width','business-lawyer-firm') ), ) ); $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_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', ))); $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_scroll_top_position',array( 'default' => 'Right', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_scroll_top_position',array( 'type' => 'radio', 'label' => __( 'Scroll To Top Position', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'choices' => array( 'Right' => __('Right','business-lawyer-firm'), 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm') ), ) ); $wp_customize->add_setting( 'business_lawyer_firm_scroll_bg_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_scroll_bg_color', array( 'label' => esc_html__('Scroll Top Background Color','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_scroll_bg_color' ))); $wp_customize->add_setting( 'business_lawyer_firm_scroll_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'business_lawyer_firm_scroll_color', array( 'label' => esc_html__('Scroll Top Color','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_scroll_color' ))); $wp_customize->add_setting('business_lawyer_firm_scroll_font_size',array( 'default' => '16', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_scroll_font_size',array( 'label' => __('Scroll Top Font Size','business-lawyer-firm'), 'description' => __('Put in px','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'type' => 'number' )); $wp_customize->add_setting( 'business_lawyer_firm_scroll_to_top_border_radius', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_range' ) ); $wp_customize->add_control( 'business_lawyer_firm_scroll_to_top_border_radius', array( 'label' => esc_html__( 'Scroll To Top Border Radius','business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'type' => 'range', 'input_attrs' => array( 'step' => 1, 'min' => 1, 'max' => 50, ), ) ); // Product Columns $wp_customize->add_setting( 'business_lawyer_firm_products_per_row' , array( 'default' => '3', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_select', ) ); $wp_customize->add_control('business_lawyer_firm_products_per_row', array( 'label' => __( 'Product per row', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'type' => 'select', 'choices' => array( '2' => '2', '3' => '3', '4' => '4', ), ) ); //Woocommerce shop page Sidebar $wp_customize->add_setting('business_lawyer_firm_woocommerce_shop_page_sidebar', array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_woocommerce_shop_page_sidebar',array( 'label' => __( 'Hide Shop Page Sidebar', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_woocommerce_shop_page_sidebar', 'type' => 'checkbox', ))); $wp_customize->add_setting('business_lawyer_firm_shop_page_sidebar_layout',array( 'default' => 'Right Sidebar', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_shop_page_sidebar_layout',array( 'type' => 'select', 'label' => __('Woocommerce Shop Page Sidebar','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'choices' => array( 'Left Sidebar' => __('Left Sidebar','business-lawyer-firm'), 'Right Sidebar' => __('Right Sidebar','business-lawyer-firm'), ), ) ); //Woocommerce Single Product page Sidebar $wp_customize->add_setting('business_lawyer_firm_woocommerce_single_product_page_sidebar', array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_woocommerce_single_product_page_sidebar',array( 'label' => __( 'Hide Single Product Page Sidebar', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_woocommerce_single_product_page_sidebar', 'type' => 'checkbox', ))); $wp_customize->add_setting('business_lawyer_firm_single_product_sidebar_layout',array( 'default' => 'Right Sidebar', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_single_product_sidebar_layout',array( 'type' => 'select', 'label' => __('Woocommerce Single Product Page Sidebar','business-lawyer-firm'), 'section' => 'business_lawyer_firm_general_settings', 'choices' => array( 'Left Sidebar' => __('Left Sidebar','business-lawyer-firm'), 'Right Sidebar' => __('Right Sidebar','business-lawyer-firm'), ), ) ); $wp_customize->add_setting('business_lawyer_firm_woocommerce_product_sale',array( 'default' => 'Left', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_woocommerce_product_sale',array( 'type' => 'radio', 'section' => 'business_lawyer_firm_general_settings', 'choices' => array( 'Right' => __('Right','business-lawyer-firm'), 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm') ), ) ); // Related Product $wp_customize->add_setting('business_lawyer_firm_woocommerce_related_product_show_hide', array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_woocommerce_related_product_show_hide',array( 'label' => __( 'Show / Hide Related product', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_general_settings', 'settings' => 'business_lawyer_firm_woocommerce_related_product_show_hide', '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 ))); //404 Page Settings $wp_customize->add_section('business_lawyer_firm_404_page_settings',array( 'title' => esc_html__(' 404 Page Settings','business-lawyer-firm') )); $wp_customize->add_setting('business_lawyer_firm_404_page_main_heading',array( 'default' => __( 'Oops! Page Not Found', 'business-lawyer-firm' ), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_404_page_main_heading',array( 'label' => esc_html__('404 Main Heading','business-lawyer-firm'), 'section' => 'business_lawyer_firm_404_page_settings', 'setting' => 'business_lawyer_firm_404_page_main_heading', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_404_page_content_1',array( 'default' => __( 'We can’t seem to find the page you’re looking for.', 'business-lawyer-firm' ), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_404_page_content_1',array( 'label' => esc_html__('404 Main Content 1','business-lawyer-firm'), 'section' => 'business_lawyer_firm_404_page_settings', 'setting' => 'business_lawyer_firm_404_page_content_1', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_404_page_text_1',array( 'default' => __( 'It looks like nothing was found at this location.', 'business-lawyer-firm' ), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_404_page_text_1',array( 'label' => esc_html__('404 Text 1','business-lawyer-firm'), 'section' => 'business_lawyer_firm_404_page_settings', 'setting' => 'business_lawyer_firm_404_page_text_1', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_404_page_content_2',array( 'default' => __( 'Need Help?', 'business-lawyer-firm' ), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_404_page_content_2',array( 'label' => esc_html__('404 Main Content 2','business-lawyer-firm'), 'section' => 'business_lawyer_firm_404_page_settings', 'setting' => 'business_lawyer_firm_404_page_content_2', 'type' => 'text' )); $wp_customize->add_setting('business_lawyer_firm_404_page_text_2',array( 'default' => __( 'Try searching for what you need below.', 'business-lawyer-firm' ), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_404_page_text_2',array( 'label' => esc_html__('404 Text 2','business-lawyer-firm'), 'section' => 'business_lawyer_firm_404_page_settings', 'setting' => 'business_lawyer_firm_404_page_text_2', 'type' => 'text' )); // 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 ))); //Menu Settings $wp_customize->add_section('business_lawyer_firm_menu_settings',array( 'title' => esc_html__('Menus Settings','business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_menu_font_size',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_menu_font_size',array( 'label' => esc_html__('Menu Font Size','business-lawyer-firm'), 'section' => 'business_lawyer_firm_menu_settings', 'type' => 'number' )); $wp_customize->add_setting('business_lawyer_firm_nav_menu_text_transform',array( 'default'=> 'Uppercase', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_nav_menu_text_transform',array( 'type' => 'radio', 'label' => esc_html__('Menu Text Transform','business-lawyer-firm'), 'choices' => array( 'Uppercase' => __('Uppercase','business-lawyer-firm'), 'Capitalize' => __('Capitalize','business-lawyer-firm'), 'Lowercase' => __('Lowercase','business-lawyer-firm'), ), 'section'=> 'business_lawyer_firm_menu_settings', )); $wp_customize->add_setting('business_lawyer_firm_nav_menu_font_weight',array( 'default'=> '600', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_nav_menu_font_weight',array( 'type' => 'number', 'label' => esc_html__('Menu Font Weight','business-lawyer-firm'), 'input_attrs' => array( 'step' => 100, 'min' => 100, 'max' => 1000, ), 'section'=> 'business_lawyer_firm_menu_settings', )); //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', ))); $wp_customize->add_setting('business_lawyer_firm_slider_title_setting', array( 'default' => 1, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_slider_title_setting',array( 'label' => __( 'Enable Disable Slider Title', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_top_slider', 'settings' => 'business_lawyer_firm_slider_title_setting', 'type' => 'checkbox', ))); $wp_customize->add_setting('business_lawyer_firm_slider_button_setting', array( 'default' => 1, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control( new WP_Customize_Control($wp_customize,'business_lawyer_firm_slider_button_setting',array( 'label' => __( 'Enable Disable Slider Button', 'business-lawyer-firm' ), 'section' => 'business_lawyer_firm_top_slider', 'settings' => 'business_lawyer_firm_slider_button_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' ), 'description' => __('Slider image size (1400 x 600)','business-lawyer-firm'), 'section' => 'business_lawyer_firm_top_slider', 'type' => 'dropdown-pages' ) ); } $wp_customize->add_setting('business_lawyer_firm_slider_content_layout',array( 'default'=> 'Right', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_slider_content_layout',array( 'type' => 'radio', 'label' => esc_html__('Slider Content Layout','business-lawyer-firm'), 'choices' => array( 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm'), 'Right' => __('Right','business-lawyer-firm'), ), 'section'=> 'business_lawyer_firm_top_slider', )); //Slider button text $wp_customize->add_setting('business_lawyer_firm_slider_button_text',array( 'default'=> '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_slider_button_text',array( 'label' => __('Slider Button Text','business-lawyer-firm'), 'section'=> 'business_lawyer_firm_top_slider', 'type'=> 'text' )); //Slider Image Opacity $wp_customize->add_setting('business_lawyer_firm_slider_opacity_color',array( 'default' => '', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control( 'business_lawyer_firm_slider_opacity_color', array( 'label' => esc_html__( 'Slider Image Opacity','business-lawyer-firm' ), 'section' => 'business_lawyer_firm_top_slider', 'type' => 'select', 'choices' => array( '0' => esc_attr('0','business-lawyer-firm'), '0.1' => esc_attr('0.1','business-lawyer-firm'), '0.2' => esc_attr('0.2','business-lawyer-firm'), '0.3' => esc_attr('0.3','business-lawyer-firm'), '0.4' => esc_attr('0.4','business-lawyer-firm'), '0.5' => esc_attr('0.5','business-lawyer-firm'), '0.6' => esc_attr('0.6','business-lawyer-firm'), '0.7' => esc_attr('0.7','business-lawyer-firm'), '0.8' => esc_attr('0.8','business-lawyer-firm'), '0.9' => esc_attr('0.9','business-lawyer-firm') ), )); //Slider height $wp_customize->add_setting('business_lawyer_firm_slider_img_height',array( 'default'=> '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_slider_img_height',array( 'label' => __('Slider Height','business-lawyer-firm'), 'description' => __('Add the slider height in px(eg. 500px).','business-lawyer-firm'), 'input_attrs' => array( 'placeholder' => __( '500px', 'business-lawyer-firm' ), ), 'section'=> 'business_lawyer_firm_top_slider', 'type'=> 'text' )); // 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_bg_image',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw', )); $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'business_lawyer_firm_footer_bg_image',array( 'label' => __('Footer Background Image','business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', 'priority' => 1, ))); $wp_customize->add_setting('business_lawyer_firm_footer_bg_image_position',array( 'default'=> 'scroll', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_footer_bg_image_position',array( 'type' => 'select', 'label' => __('Footer Background Image Position','business-lawyer-firm'), 'choices' => array( 'fixed' => __('fixed','business-lawyer-firm'), 'scroll' => __('scroll','business-lawyer-firm'), ), 'section'=> 'business_lawyer_firm_site_footer_section', )); $wp_customize->add_setting('business_lawyer_firm_footer_widget_heading_alignment',array( 'default' => 'Left', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_footer_widget_heading_alignment',array( 'type' => 'select', 'label' => __('Footer Widget Heading Alignment','business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', 'choices' => array( 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm'), 'Right' => __('Right','business-lawyer-firm') ) ) ); $wp_customize->add_setting('business_lawyer_firm_footer_widget_content_alignment',array( 'default' => 'Left', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_footer_widget_content_alignment',array( 'type' => 'select', 'label' => __('Footer Widget Content Alignment','business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', 'choices' => array( 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm'), 'Right' => __('Right','business-lawyer-firm') ), ) ); $wp_customize->add_setting('business_lawyer_firm_show_hide_copyright',array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control('business_lawyer_firm_show_hide_copyright',array( 'type' => 'checkbox', 'label' => __('Show / Hide Copyright','business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', )); $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', 'type' => 'text', )); $wp_customize->add_setting('business_lawyer_firm_copyright_content_alignment',array( 'default' => 'Center', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_choices' )); $wp_customize->add_control('business_lawyer_firm_copyright_content_alignment',array( 'type' => 'select', 'label' => __('Copyright Content Alignment','business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', 'choices' => array( 'Left' => __('Left','business-lawyer-firm'), 'Center' => __('Center','business-lawyer-firm'), 'Right' => __('Right','business-lawyer-firm') ), ) ); $wp_customize->add_setting('business_lawyer_firm_copyright_background_color', array( 'default' => '', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'business_lawyer_firm_copyright_background_color', array( 'label' => __('Copyright Background Color', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_site_footer_section', ))); // 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_post_page_title',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_post_page_title',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Post Page Title', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable title on post page.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_post_page_meta',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_post_page_meta',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Post Page Meta', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable meta on post page.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_post_page_button',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_post_page_button',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Post Page Button', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable button on post page.', 'business-lawyer-firm'), )); $wp_customize->add_setting( 'business_lawyer_firm_post_page_image_border_radius', array( 'default' => '0', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_range' ) ); $wp_customize->add_control( 'business_lawyer_firm_post_page_image_border_radius', array( 'label' => esc_html__( 'Post Page Image Border Radius','business-lawyer-firm' ), 'section' => 'business_lawyer_firm_post_settings', 'type' => 'range', 'input_attrs' => array( 'step' => 1, 'min' => 1, 'max' => 50, ), ) ); $wp_customize->add_setting('business_lawyer_firm_post_page_content',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_post_page_content',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Post Page Content', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable content on post page.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_post_page_excerpt_length',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_range', 'default' => 30, )); $wp_customize->add_control('business_lawyer_firm_post_page_excerpt_length',array( 'label' => esc_html__('Post Page Excerpt Length', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'type' => 'range', 'input_attrs' => array( 'step' => 1, 'min' => 1, 'max' => 50, ), )); $wp_customize->add_setting('business_lawyer_firm_post_page_excerpt_suffix',array( 'sanitize_callback' => 'sanitize_text_field', 'default' => '[...]', )); $wp_customize->add_control('business_lawyer_firm_post_page_excerpt_suffix',array( 'type' => 'text', 'label' => esc_html__('Post Page Excerpt Suffix', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('For Ex. [...], etc', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_post_page_pagination',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_post_page_pagination',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Post Page Pagination', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable pagination on post page.', 'business-lawyer-firm'), )); $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_page_image_border_radius', array( 'default' => '0', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_range' ) ); $wp_customize->add_control( 'business_lawyer_firm_single_post_page_image_border_radius', array( 'label' => esc_html__( 'Single Post Page Image Border Radius','business-lawyer-firm' ), 'section' => 'business_lawyer_firm_post_settings', 'type' => 'range', 'input_attrs' => array( 'step' => 1, 'min' => 1, 'max' => 50, ), ) ); $wp_customize->add_setting( 'business_lawyer_firm_single_post_page_image_box_shadow', array( 'default' => '0', 'transport' => 'refresh', 'sanitize_callback' => 'business_lawyer_firm_sanitize_number_range' ) ); $wp_customize->add_control( 'business_lawyer_firm_single_post_page_image_box_shadow', array( 'label' => esc_html__( 'Single Post Page Image Box Shadow','business-lawyer-firm' ), 'section' => 'business_lawyer_firm_post_settings', 'type' => 'range', 'input_attrs' => array( 'step' => 1, 'min' => 1, 'max' => 50, ), ) ); $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'), )); $wp_customize->add_setting('business_lawyer_firm_single_post_page_content',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_post_page_content',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Post Page Content', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable content on single post page.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_single_post_tags',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_post_tags',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Post Tags', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', 'description' => esc_html__('Check this box to enable tags on single post.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_single_post_navigation_show_hide',array( 'default' => true, 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox' )); $wp_customize->add_control('business_lawyer_firm_single_post_navigation_show_hide',array( 'type' => 'checkbox', 'label' => __('Show / Hide Post Navigation','business-lawyer-firm'), 'section' => 'business_lawyer_firm_post_settings', )); $wp_customize->add_setting('business_lawyer_firm_single_post_comment_title',array( 'default'=> 'Leave a Reply', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_single_post_comment_title',array( 'label' => __('Add Comment Title','business-lawyer-firm'), 'input_attrs' => array( 'placeholder' => __( 'Leave a Reply', 'business-lawyer-firm' ), ), 'section'=> 'business_lawyer_firm_post_settings', 'type'=> 'text' )); $wp_customize->add_setting('business_lawyer_firm_single_post_comment_btn_text',array( 'default'=> 'Post Comment', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('business_lawyer_firm_single_post_comment_btn_text',array( 'label' => __('Add Comment Button Text','business-lawyer-firm'), 'input_attrs' => array( 'placeholder' => __( 'Post Comment', 'business-lawyer-firm' ), ), 'section'=> 'business_lawyer_firm_post_settings', 'type'=> 'text' )); // Pro Version $wp_customize->add_setting( 'pro_version_post_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_post_setting', array( 'section' => 'business_lawyer_firm_post_settings', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); // Page Settings $wp_customize->add_section('business_lawyer_firm_page_settings',array( 'title' => esc_html__('Page Settings','business-lawyer-firm'), 'priority' =>50, )); $wp_customize->add_setting('business_lawyer_firm_single_page_title',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_page_title',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Page Title', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_page_settings', 'description' => esc_html__('Check this box to enable title on single page.', 'business-lawyer-firm'), )); $wp_customize->add_setting('business_lawyer_firm_single_page_thumb',array( 'sanitize_callback' => 'business_lawyer_firm_sanitize_checkbox', 'default' => 1, )); $wp_customize->add_control('business_lawyer_firm_single_page_thumb',array( 'type' => 'checkbox', 'label' => esc_html__('Enable Single Page Thumbnail', 'business-lawyer-firm'), 'section' => 'business_lawyer_firm_page_settings', 'description' => esc_html__('Check this box to enable page thumbnail on single page.', 'business-lawyer-firm'), )); // Pro Version $wp_customize->add_setting( 'pro_version_single_page_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_single_page_setting', array( 'section' => 'business_lawyer_firm_page_settings', 'type' => 'pro_options', 'label' => esc_html__( 'Customizer Options', 'business-lawyer-firm' ), 'description' => esc_url( BUSINESS_LAWYER_FIRM_URL ), 'priority' => 100 ))); } 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' );