add_panel( 'multipurpose_lawyer_panel_id', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __( 'Theme Settings', 'multipurpose-lawyer' ),
'description' => __( 'Description of what this panel does.', 'multipurpose-lawyer' ),
) );
// Add the Theme Color Option section.
$wp_customize->add_section( 'multipurpose_lawyer_theme_color_option', array(
'panel' => 'multipurpose_lawyer_panel_id',
'title' => esc_html__( 'Global Color Settings', 'multipurpose-lawyer' )
) );
$wp_customize->add_setting( 'multipurpose_lawyer_first_theme_color', array(
'default' => '#60d158',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_first_theme_color', array(
'label' => 'Color Option 1',
'description' => __('One can change complete theme global color settings on just one click.', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_color_option',
'settings' => 'multipurpose_lawyer_first_theme_color',
)));
$wp_customize->add_setting( 'multipurpose_lawyer_second_theme_color', array(
'default' => '#2f3235',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_second_theme_color', array(
'label' => 'Color Option 2',
'description' => __('One can change complete theme global color settings on just one click.', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_color_option',
'settings' => 'multipurpose_lawyer_second_theme_color',
)));
// font array
$multipurpose_lawyer_font_array = array(
'' => 'No Fonts',
'Abril Fatface' => 'Abril Fatface',
'Acme' => 'Acme',
'Anton' => 'Anton',
'Architects Daughter' => 'Architects Daughter',
'Arimo' => 'Arimo',
'Arsenal' => 'Arsenal',
'Arvo' => 'Arvo',
'Alegreya' => 'Alegreya',
'Alfa Slab One' => 'Alfa Slab One',
'Averia Serif Libre' => 'Averia Serif Libre',
'Bangers' => 'Bangers',
'Boogaloo' => 'Boogaloo',
'Bad Script' => 'Bad Script',
'Bitter' => 'Bitter',
'Bree Serif' => 'Bree Serif',
'BenchNine' => 'BenchNine',
'Cabin' => 'Cabin',
'Cardo' => 'Cardo',
'Courgette' => 'Courgette',
'Cherry Swash' => 'Cherry Swash',
'Cormorant Garamond' => 'Cormorant Garamond',
'Crimson Text' => 'Crimson Text',
'Cuprum' => 'Cuprum',
'Cookie' => 'Cookie',
'Chewy' => 'Chewy',
'Days One' => 'Days One',
'Dosis' => 'Dosis',
'Droid Sans' => 'Droid Sans',
'Economica' => 'Economica',
'Fredoka One' => 'Fredoka One',
'Fjalla One' => 'Fjalla One',
'Francois One' => 'Francois One',
'Frank Ruhl Libre' => 'Frank Ruhl Libre',
'Gloria Hallelujah' => 'Gloria Hallelujah',
'Great Vibes' => 'Great Vibes',
'Handlee' => 'Handlee',
'Hammersmith One' => 'Hammersmith One',
'Inconsolata' => 'Inconsolata',
'Indie Flower' => 'Indie Flower',
'IM Fell English SC' => 'IM Fell English SC',
'Julius Sans One' => 'Julius Sans One',
'Josefin Slab' => 'Josefin Slab',
'Josefin Sans' => 'Josefin Sans',
'Kanit' => 'Kanit',
'Lobster' => 'Lobster',
'Lato' => 'Lato',
'Lora' => 'Lora',
'Libre Baskerville' =>'Libre Baskerville',
'Lobster Two' => 'Lobster Two',
'Merriweather' =>'Merriweather',
'Monda' => 'Monda',
'Montserrat' => 'Montserrat',
'Muli' => 'Muli',
'Marck Script' => 'Marck Script',
'Noto Serif' => 'Noto Serif',
'Open Sans' => 'Open Sans',
'Overpass' => 'Overpass',
'Overpass Mono' => 'Overpass Mono',
'Oxygen' => 'Oxygen',
'Orbitron' => 'Orbitron',
'Patua One' => 'Patua One',
'Pacifico' => 'Pacifico',
'Padauk' => 'Padauk',
'Playball' => 'Playball',
'Playfair Display' => 'Playfair Display',
'PT Sans' => 'PT Sans',
'Philosopher' => 'Philosopher',
'Permanent Marker' => 'Permanent Marker',
'Poiret One' => 'Poiret One',
'Quicksand' => 'Quicksand',
'Quattrocento Sans' => 'Quattrocento Sans',
'Raleway' => 'Raleway',
'Rubik' => 'Rubik',
'Rokkitt' => 'Rokkitt',
'Russo One' => 'Russo One',
'Righteous' => 'Righteous',
'Slabo' => 'Slabo',
'Source Sans Pro' => 'Source Sans Pro',
'Shadows Into Light Two' =>'Shadows Into Light Two',
'Shadows Into Light' => 'Shadows Into Light',
'Sacramento' => 'Sacramento',
'Shrikhand' => 'Shrikhand',
'Tangerine' => 'Tangerine',
'Ubuntu' => 'Ubuntu',
'VT323' => 'VT323',
'Varela Round' => 'Varela Round',
'Vampiro One' => 'Vampiro One',
'Vollkorn' => 'Vollkorn',
'Volkhov' => 'Volkhov',
'Yanone Kaffeesatz' => 'Yanone Kaffeesatz',
);
//Typography
$wp_customize->add_section( 'multipurpose_lawyer_typography', array(
'title' => __( 'Typography', 'multipurpose-lawyer' ),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id'
) );
// This is Paragraph Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_paragraph_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_paragraph_color', array(
'label' => __('Paragraph Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_paragraph_color',
)));
//This is Paragraph FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_paragraph_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_paragraph_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'Paragraph Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
$wp_customize->add_setting('multipurpose_lawyer_paragraph_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_paragraph_font_size',array(
'label' => __('Paragraph Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_paragraph_font_size',
'type' => 'text'
));
// This is "a" Tag Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_atag_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_atag_color', array(
'label' => __('"a" Tag Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_atag_color',
)));
//This is "a" Tag FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_atag_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_atag_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( '"a" Tag Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
// This is "a" Tag Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_li_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_li_color', array(
'label' => __('"li" Tag Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_li_color',
)));
//This is "li" Tag FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_li_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_li_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( '"li" Tag Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
// This is H1 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h1_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h1_color', array(
'label' => __('H1 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h1_color',
)));
//This is H1 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h1_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h1_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'H1 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H1 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h1_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h1_font_size',array(
'label' => __('H1 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h1_font_size',
'type' => 'text'
));
// This is H2 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h2_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h2_color', array(
'label' => __('h2 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h2_color',
)));
//This is H2 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h2_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h2_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'h2 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H2 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h2_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h2_font_size',array(
'label' => __('h2 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h2_font_size',
'type' => 'text'
));
// This is H3 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h3_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h3_color', array(
'label' => __('h3 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h3_color',
)));
//This is H3 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h3_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h3_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'h3 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H3 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h3_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h3_font_size',array(
'label' => __('h3 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h3_font_size',
'type' => 'text'
));
// This is H4 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h4_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h4_color', array(
'label' => __('h4 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h4_color',
)));
//This is H4 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h4_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h4_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'h4 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H4 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h4_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h4_font_size',array(
'label' => __('h4 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h4_font_size',
'type' => 'text'
));
// This is H5 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h5_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h5_color', array(
'label' => __('h5 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h5_color',
)));
//This is H5 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h5_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h5_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'h5 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H5 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h5_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h5_font_size',array(
'label' => __('h5 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h5_font_size',
'type' => 'text'
));
// This is H6 Color picker setting
$wp_customize->add_setting( 'multipurpose_lawyer_h6_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_h6_color', array(
'label' => __('h6 Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'settings' => 'multipurpose_lawyer_h6_color',
)));
//This is H6 FontFamily picker setting
$wp_customize->add_setting('multipurpose_lawyer_h6_font_family',array(
'default' => '',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control(
'multipurpose_lawyer_h6_font_family', array(
'section' => 'multipurpose_lawyer_typography',
'label' => __( 'h6 Fonts','multipurpose-lawyer'),
'type' => 'select',
'choices' => $multipurpose_lawyer_font_array,
));
//This is H6 FontSize setting
$wp_customize->add_setting('multipurpose_lawyer_h6_font_size',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_h6_font_size',array(
'label' => __('h6 Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_typography',
'setting' => 'multipurpose_lawyer_h6_font_size',
'type' => 'text'
));
//Topbar section
$wp_customize->add_section('multipurpose_lawyer_topbar_icon',array(
'title' => __('Topbar Section','multipurpose-lawyer'),
'description' => __('Add Header Content here','multipurpose-lawyer'),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_top_header',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_top_header',array(
'type' => 'checkbox',
'label' => __('Enable Top Header','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon'
));
$wp_customize->add_setting('multipurpose_lawyer_topbar_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_topbar_padding',array(
'label' => esc_html__('Topbar Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_topbar_icon',
));
$wp_customize->add_setting('multipurpose_lawyer_top_topbar_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_top_topbar_padding',array(
'description' => __('Top','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_topbar_icon',
'type'=> 'number',
));
$wp_customize->add_setting('multipurpose_lawyer_bottom_topbar_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_bottom_topbar_padding',array(
'description' => __('Bottom','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_topbar_icon',
'type'=> 'number',
));
$wp_customize->add_setting('multipurpose_lawyer_sticky_header',array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_sticky_header',array(
'type' => 'checkbox',
'label' => __('Stick header on Desktop','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon'
));
$wp_customize->add_setting('multipurpose_lawyer_sticky_header_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_sticky_header_padding',array(
'label' => esc_html__('Sticky Header Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_topbar_icon',
'type' => 'hidden',
));
$wp_customize->add_setting('multipurpose_lawyer_top_sticky_header_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_top_sticky_header_padding',array(
'description' => __('Top','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_topbar_icon',
'type'=> 'number'
));
$wp_customize->add_setting('multipurpose_lawyer_bottom_sticky_header_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_bottom_sticky_header_padding',array(
'description' => __('Bottom','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_topbar_icon',
'type'=> 'number'
));
$wp_customize->add_setting('multipurpose_lawyer_show_search',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_show_search',array(
'type' => 'checkbox',
'label' => __('Show/Hide Search','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon'
));
$wp_customize->add_setting('multipurpose_lawyer_search_placeholder',array(
'default' => __('Search','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_search_placeholder',array(
'type' => 'text',
'label' => __('Search Placeholder text','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon'
));
$wp_customize->add_setting('multipurpose_lawyer_welcome_icon',array(
'default' => 'fas fa-building',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control(new Multipurpose_Lawyer_Icon_Selector(
$wp_customize,'multipurpose_lawyer_welcome_icon',array(
'label' => __('Welcome Icon','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'type' => 'icon',
)));
$wp_customize->add_setting('multipurpose_lawyer_welcome_text',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_welcome_text',array(
'label' => __('Add Welcome Text','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'setting' => 'multipurpose_lawyer_welcome_text',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_email_icon',array(
'default' => 'fas fa-at',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control(new Multipurpose_Lawyer_Icon_Selector(
$wp_customize,'multipurpose_lawyer_email_icon',array(
'label' => __('Email Icon','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'type' => 'icon',
)));
$wp_customize->add_setting('multipurpose_lawyer_email',array(
'default' => '',
'sanitize_callback' => 'sanitize_email'
));
$wp_customize->add_control('multipurpose_lawyer_email',array(
'label' => __('Add Email Address','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'setting' => 'multipurpose_lawyer_email',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_request_text',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_request_text',array(
'label' => __('Add Request Text','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'setting' => 'multipurpose_lawyer_request_text',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_request_link',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_request_link',array(
'label' => __('Add Request Link','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_topbar_icon',
'setting' => 'multipurpose_lawyer_request_link',
'type' => 'url'
));
$wp_customize->add_section('multipurpose_lawyer_header',array(
'title' => __('Header','multipurpose-lawyer'),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_menu_case',array(
'default' => 'uppercase',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_menu_case',array(
'type' => 'select',
'label' => __('Menu Case','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_header',
'choices' => array(
'uppercase' => __('Uppercase','multipurpose-lawyer'),
'capitalize' => __('Capitalize','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_menu_font_size', array(
'default'=> '14',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_menu_font_size', array(
'label' => __('Menu Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_header',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
$wp_customize->add_setting('multipurpose_lawyer_menu_font_weight',array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_menu_font_weight',array(
'type' => 'select',
'label' => __('Menu Font Weight','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_header',
'choices' => array(
'100' => __('100','multipurpose-lawyer'),
'200' => __('200','multipurpose-lawyer'),
'300' => __('300','multipurpose-lawyer'),
'400' => __('400','multipurpose-lawyer'),
'500' => __('500','multipurpose-lawyer'),
'600' => __('600','multipurpose-lawyer'),
'700' => __('700','multipurpose-lawyer'),
'800' => __('800','multipurpose-lawyer'),
'900' => __('900','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_social_icons_font_size', array(
'default'=> '12',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_social_icons_font_size', array(
'label' => __('Social Icons Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_header',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
//Slider section
$wp_customize->add_section('multipurpose_lawyer_slidersettings',array(
'title' => __('Slider Section','multipurpose-lawyer'),
'description' => '',
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_slider_hide_show',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_slider_hide_show',array(
'type' => 'checkbox',
'label' => __('Show / Hide slider','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings',
));
$wp_customize->add_setting('multipurpose_lawyer_slider_title',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_slider_title',array(
'type' => 'checkbox',
'label' => __('Show / Hide Slider Title','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings'
));
$wp_customize->add_setting('multipurpose_lawyer_slider_content',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_slider_content',array(
'type' => 'checkbox',
'label' => __('Show / Hide Slider Content','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings'
));
$wp_customize->add_setting('multipurpose_lawyer_slider_button',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_slider_button',array(
'type' => 'checkbox',
'label' => __('Show / Hide Slider Button','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings'
));
for ( $count = 1; $count <= 4; $count++ ) {
$wp_customize->add_setting( 'multipurpose_lawyer_slidersettings_page' . $count, array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_dropdown_pages'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slidersettings_page' . $count, array(
'label' => __( 'Select Slide Image Page', 'multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'dropdown-pages'
) );
}
$wp_customize->add_setting( 'multipurpose_lawyer_slider_speed', array(
'default' => 3000,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_speed', array(
'label' => esc_html__( 'Slider Speed','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'settings' => 'multipurpose_lawyer_slider_speed',
'input_attrs' => array(
'step' => 500,
'min' => 500,
'max' => 5000,
),
) );
//content Alignment
$wp_customize->add_setting('multipurpose_lawyer_slider_alignment_option',array(
'default' => 'Left Align',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_slider_alignment_option',array(
'type' => 'radio',
'label' => __('Slider Content Alignment','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings',
'choices' => array(
'Center Align' => __('Center Align','multipurpose-lawyer'),
'Left Align' => __('Left Align','multipurpose-lawyer'),
'Right Align' => __('Right Align','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting('multipurpose_lawyer_content_position',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_content_position',array(
'label' => esc_html__('Slider Content Position','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_slidersettings',
'type' => 'hidden'
));
$wp_customize->add_setting( 'multipurpose_lawyer_slider_top_position', array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_top_position', array(
'label' => esc_html__( 'Top','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 100,
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_slider_bottom_position', array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_bottom_position', array(
'label' => esc_html__( 'Bottom','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 100,
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_slider_left_position', array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_left_position', array(
'label' => esc_html__( 'Left','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 100,
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_slider_right_position', array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_right_position', array(
'label' => esc_html__('Right','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 100,
),
) );
//Slider excerpt
$wp_customize->add_setting( 'multipurpose_lawyer_slider_excerpt', array(
'default' => 15,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float',
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_excerpt', array(
'label' => esc_html__( 'Slider Excerpt length','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'settings' => 'multipurpose_lawyer_slider_excerpt',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_slider_button_label', array(
'default' => __('READ MORE','multipurpose-lawyer' ),
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_button_label', array(
'label' => esc_html__( 'Slider Button Label','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'text',
'settings' => 'multipurpose_lawyer_slider_button_label'
) );
$wp_customize->add_setting( 'multipurpose_lawyer_slider_height', array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_slider_height', array(
'label' => esc_html__( 'Slider Height','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_slidersettings',
'type' => 'number',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 500,
'max' => 1000,
),
) );
//Practice Section
$wp_customize->add_section('multipurpose_lawyer_practice',array(
'title' => __('Practice Section','multipurpose-lawyer'),
'description' => __('Add Practice sections below.','multipurpose-lawyer'),
'panel' => 'multipurpose_lawyer_panel_id',
));
$args = array('numberposts' => -1);
$post_list = get_posts($args);
$i = 0;
$pst1[]='Select';
foreach($post_list as $post){
$pst1[$post->post_title] = $post->post_title;
}
$wp_customize->add_setting('multipurpose_lawyer_practice_setting',array(
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices',
));
$wp_customize->add_control('multipurpose_lawyer_practice_setting',array(
'type' => 'select',
'choices' => $pst1,
'label' => __('Select post','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_practice',
));
$wp_customize->add_setting('multipurpose_lawyer_phone_text',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_phone_text',array(
'label' => __('Add Call Text','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_practice',
'setting' => 'multipurpose_lawyer_phone_text',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_phone_no',array(
'default' => '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_phone_number'
));
$wp_customize->add_control('multipurpose_lawyer_phone_no',array(
'label' => __('Add Phone No.','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_practice',
'setting' => 'multipurpose_lawyer_phone_no',
'type' => 'text'
));
//About Section
$wp_customize->add_section('multipurpose_lawyer_about',array(
'title' => __('About Section','multipurpose-lawyer'),
'description' => __('Add About sections below.','multipurpose-lawyer'),
'panel' => 'multipurpose_lawyer_panel_id',
));
$args = array('numberposts' => -1);
$post_list = get_posts($args);
$i = 0;
$pst2[]='Select';
foreach($post_list as $post){
$pst2[$post->post_title] = $post->post_title;
}
$wp_customize->add_setting('multipurpose_lawyer_about_setting',array(
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices',
));
$wp_customize->add_control('multipurpose_lawyer_about_setting',array(
'type' => 'select',
'choices' => $pst2,
'label' => __('Select post','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_about',
));
//layout setting
$wp_customize->add_section( 'multipurpose_lawyer_theme_layout', array(
'title' => __( 'Blog Settings', 'multipurpose-lawyer' ),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id'
) );
// Add Settings and Controls for Layout
$wp_customize->add_setting('multipurpose_lawyer_layout',array(
'default' => 'Right Sidebar',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
) );
$wp_customize->add_control(new Multipurpose_Lawyer_Image_Radio_Control($wp_customize, 'multipurpose_lawyer_layout', array(
'type' => 'radio',
'label' => esc_html__('Select Sidebar layout', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout',
'settings' => 'multipurpose_lawyer_layout',
'choices' => array(
'Right Sidebar' => esc_url(get_template_directory_uri()) . '/images/layout3.png',
'Left Sidebar' => esc_url(get_template_directory_uri()) . '/images/layout2.png',
'One Column' => esc_url(get_template_directory_uri()) . '/images/layout1.png',
'Three Columns' => esc_url(get_template_directory_uri()) . '/images/layout4.png',
'Four Columns' => esc_url(get_template_directory_uri()) . '/images/layout5.png',
'Grid Layout' => esc_url(get_template_directory_uri()) . '/images/layout6.png'
))));
$wp_customize->add_setting('multipurpose_lawyer_blog_post_display_type',array(
'default' => 'blocks',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_blog_post_display_type', array(
'type' => 'select',
'label' => __( 'Blog Page Display Type', 'multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_theme_layout',
'choices' => array(
'blocks' => __('Blocks','multipurpose-lawyer'),
'without blocks' => __('Without Blocks','multipurpose-lawyer'),
),
));
$wp_customize->add_setting('multipurpose_lawyer_metafields_date',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_metafields_date',array(
'type' => 'checkbox',
'label' => __('Show / Hide Date ','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_metafields_author',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_metafields_author',array(
'type' => 'checkbox',
'label' => __('Show / Hide Author','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_metafields_comment',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_metafields_comment',array(
'type' => 'checkbox',
'label' => __('Show / Hide Comments','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_metafields_time',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_metafields_time',array(
'type' => 'checkbox',
'label' => __('Show / Hide Time','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_featured_image',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_featured_image',array(
'type' => 'checkbox',
'label' => __('Show / Hide Featured Image','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_post_navigation',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_post_navigation',array(
'type' => 'checkbox',
'label' => __('Show / Hide Post Navigation','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_metabox_seperator',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_metabox_seperator',array(
'type' => 'text',
'label' => __('Metabox Seperator','multipurpose-lawyer'),
'description' => __('Ex: "/", "|", "-", ...','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout'
));
$wp_customize->add_setting('multipurpose_lawyer_blog_post_content',array(
'default' => 'Excerpt Content',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_blog_post_content',array(
'type' => 'radio',
'label' => __('Blog Post Content Type','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout',
'choices' => array(
'No Content' => __('No Content','multipurpose-lawyer'),
'Full Content' => __('Full Content','multipurpose-lawyer'),
'Excerpt Content' => __('Excerpt Content','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_post_excerpt_number', array(
'default' => 20,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_post_excerpt_number', array(
'label' => esc_html__( 'Blog Post Excerpt Number (Max 50)','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_theme_layout',
'type' => 'number',
'settings' => 'multipurpose_lawyer_post_excerpt_number',
'input_attrs' => array(
'step' => 2,
'min' => 0,
'max' => 50,
),
'active_callback' => 'multipurpose_lawyer_excerpt_enabled'
) );
$wp_customize->add_setting( 'multipurpose_lawyer_button_excerpt_suffix', array(
'default' => '...',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( 'multipurpose_lawyer_button_excerpt_suffix', array(
'label' => esc_html__( 'Post Excerpt Suffix','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_theme_layout',
'type' => 'text',
'settings' => 'multipurpose_lawyer_button_excerpt_suffix',
'active_callback' => 'multipurpose_lawyer_excerpt_enabled'
) );
$wp_customize->add_setting( 'multipurpose_lawyer_feature_image_border_radius', array(
'default'=> '0',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_feature_image_border_radius', array(
'label' => __('Featured Image Border Radius','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
),
)));
$wp_customize->add_setting( 'multipurpose_lawyer_feature_image_shadow', array(
'default'=> '0',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_feature_image_shadow', array(
'label' => __('Featured Image Shadow','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_theme_layout',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
),
)));
$wp_customize->add_setting( 'multipurpose_lawyer_pagination_type', array(
'default' => 'page-numbers',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( 'multipurpose_lawyer_pagination_type', array(
'section' => 'multipurpose_lawyer_theme_layout',
'type' => 'select',
'label' => __( 'Blog Pagination Style', 'multipurpose-lawyer' ),
'choices' => array(
'page-numbers' => __( 'Number', 'multipurpose-lawyer' ),
'next-prev' => __( 'Next/Prev', 'multipurpose-lawyer' ),
)));
$wp_customize->add_setting('multipurpose_lawyer_blog_nav_position',array(
'default' => 'bottom',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_blog_nav_position', array(
'type' => 'select',
'label' => __( 'Blog Post Navigation Position', 'multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_theme_layout',
'choices' => array(
'top' => __('Top','multipurpose-lawyer'),
'bottom' => __('Bottom','multipurpose-lawyer'),
'both' => __('Both','multipurpose-lawyer')
),
));
$wp_customize->add_section( 'multipurpose_lawyer_single_post_settings', array(
'title' => __( 'Single Post Options', 'multipurpose-lawyer' ),
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_breadcrumb',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_breadcrumb',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Breadcrumb','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_date',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_date',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Date','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_author',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_author',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Author','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_comment_no',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_comment_no',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Comment Number','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_time',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_time',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Time','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_metafields_tags',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_metafields_tags',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Tags','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_image',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_image',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Featured Image','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting( 'multipurpose_lawyer_post_featured_image', array(
'default' => 'in-content',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( 'multipurpose_lawyer_post_featured_image', array(
'section' => 'multipurpose_lawyer_single_post_settings',
'type' => 'radio',
'label' => __( 'Featured Image Display Type', 'multipurpose-lawyer' ),
'choices' => array(
'banner' => __('as Banner Image', 'multipurpose-lawyer'),
'in-content' => __( 'as Featured Image', 'multipurpose-lawyer' ),
)));
$wp_customize->add_setting('multipurpose_lawyer_single_post_nav',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_nav',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post Navigation','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting( 'multipurpose_lawyer_single_post_prev_nav_text', array(
'default' => __('Previous','multipurpose-lawyer' ),
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( 'multipurpose_lawyer_single_post_prev_nav_text', array(
'label' => esc_html__( 'Single Post Previous Nav text','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_single_post_settings',
'type' => 'text',
'settings' => 'multipurpose_lawyer_single_post_prev_nav_text'
) );
$wp_customize->add_setting( 'multipurpose_lawyer_single_post_next_nav_text', array(
'default' => __('Next','multipurpose-lawyer' ),
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( 'multipurpose_lawyer_single_post_next_nav_text', array(
'label' => esc_html__( 'Single Post Next Nav text','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_single_post_settings',
'type' => 'text',
'settings' => 'multipurpose_lawyer_single_post_next_nav_text'
) );
$wp_customize->add_setting('multipurpose_lawyer_single_post_comment',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_comment',array(
'type' => 'checkbox',
'label' => __('Show / Hide Single Post comment','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting( 'multipurpose_lawyer_comment_width', array(
'default'=> '100',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_comment_width', array(
'label' => __('Comment textarea width','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings',
'description' => __('Measurement is in %.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 100,
),
)));
$wp_customize->add_setting('multipurpose_lawyer_comment_title',array(
'default' => __('Leave a Reply','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_comment_title',array(
'type' => 'text',
'label' => __('Comment form Title','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_comment_submit_text',array(
'default' => __('Post Comment','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_comment_submit_text',array(
'type' => 'text',
'label' => __('Comment Submit Button Label','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_related_posts',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_related_posts',array(
'type' => 'checkbox',
'label' => __('Show / Hide Related Posts','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting('multipurpose_lawyer_related_posts_title',array(
'default' => __('You May Also Like','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_related_posts_title',array(
'type' => 'text',
'label' => __('Related Posts Title','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_single_post_settings'
));
$wp_customize->add_setting( 'multipurpose_lawyer_related_post_count', array(
'default' => 3,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
) );
$wp_customize->add_control( 'multipurpose_lawyer_related_post_count', array(
'label' => esc_html__( 'Related Posts Count','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_single_post_settings',
'type' => 'number',
'settings' => 'multipurpose_lawyer_related_post_count',
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 6,
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_post_shown_by', array(
'default' => 'categories',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( 'multipurpose_lawyer_post_shown_by', array(
'section' => 'multipurpose_lawyer_single_post_settings',
'type' => 'radio',
'label' => __( 'Related Posts must be shown:', 'multipurpose-lawyer' ),
'choices' => array(
'categories' => __('By Categories', 'multipurpose-lawyer'),
'tags' => __( 'By Tags', 'multipurpose-lawyer' ),
)));
// Button option
$wp_customize->add_section( 'multipurpose_lawyer_button_options', array(
'title' => __( 'Button Options', 'multipurpose-lawyer' ),
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting( 'multipurpose_lawyer_blog_button_text', array(
'default' => __('Read Full','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( 'multipurpose_lawyer_blog_button_text', array(
'label' => esc_html__( 'Blog Post Button Label','multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_button_options',
'type' => 'text',
'settings' => 'multipurpose_lawyer_blog_button_text'
) );
$wp_customize->add_setting('multipurpose_lawyer_button_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_button_padding',array(
'label' => esc_html__('Button Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_button_options',
'active_callback' => 'multipurpose_lawyer_button_enabled'
));
$wp_customize->add_setting('multipurpose_lawyer_top_button_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_top_button_padding',array(
'label' => __('Top','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_button_options',
'type'=> 'number',
'active_callback' => 'multipurpose_lawyer_button_enabled'
));
$wp_customize->add_setting('multipurpose_lawyer_bottom_button_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_bottom_button_padding',array(
'label' => __('Bottom','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_button_options',
'type'=> 'number',
'active_callback' => 'multipurpose_lawyer_button_enabled'
));
$wp_customize->add_setting('multipurpose_lawyer_left_button_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_left_button_padding',array(
'label' => __('Left','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_button_options',
'type'=> 'number',
'active_callback' => 'multipurpose_lawyer_button_enabled'
));
$wp_customize->add_setting('multipurpose_lawyer_right_button_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_right_button_padding',array(
'label' => __('Right','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_button_options',
'type'=> 'number',
'active_callback' => 'multipurpose_lawyer_button_enabled'
));
$wp_customize->add_setting( 'multipurpose_lawyer_button_border_radius', array(
'default'=> 4,
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_button_border_radius', array(
'label' => __('Border Radius','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_button_options',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
),
'active_callback' => 'multipurpose_lawyer_button_enabled'
)));
//Sidebar setting
$wp_customize->add_section( 'multipurpose_lawyer_sidebar_options', array(
'title' => __( 'Sidebar options', 'multipurpose-lawyer' ),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id'
) );
$wp_customize->add_setting('multipurpose_lawyer_single_page_layout',array(
'default' => 'One Column',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_single_page_layout', array(
'type' => 'select',
'label' => __( 'Single Page Layout', 'multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_sidebar_options',
'choices' => array(
'Left Sidebar' => __('Left Sidebar','multipurpose-lawyer'),
'Right Sidebar' => __('Right Sidebar','multipurpose-lawyer'),
'One Column' => __('One Column','multipurpose-lawyer')
),
));
$wp_customize->add_setting('multipurpose_lawyer_single_post_layout',array(
'default' => 'Right Sidebar',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_single_post_layout', array(
'type' => 'select',
'label' => __( 'Single Post Layout', 'multipurpose-lawyer' ),
'section' => 'multipurpose_lawyer_sidebar_options',
'choices' => array(
'Left Sidebar' => __('Left Sidebar','multipurpose-lawyer'),
'Right Sidebar' => __('Right Sidebar','multipurpose-lawyer'),
'One Column' => __('One Column','multipurpose-lawyer')
),
));
//Advance Options
$wp_customize->add_section( 'multipurpose_lawyer_advance_options', array(
'title' => __( 'Advance Options', 'multipurpose-lawyer' ),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id'
) );
$wp_customize->add_setting('multipurpose_lawyer_preloader',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_preloader',array(
'type' => 'checkbox',
'label' => __('Enable / Disable Preloader','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_advance_options'
));
$wp_customize->add_setting( 'multipurpose_lawyer_preloader_color', array(
'default' => '#333333',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_preloader_color', array(
'label' => __('Preloader Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_advance_options',
'settings' => 'multipurpose_lawyer_preloader_color',
)));
$wp_customize->add_setting( 'multipurpose_lawyer_preloader_bg_color', array(
'default' => '#ffffff',
'sanitize_callback' => 'sanitize_hex_color'
));
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'multipurpose_lawyer_preloader_bg_color', array(
'label' => __('Preloader Background Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_advance_options',
'settings' => 'multipurpose_lawyer_preloader_bg_color',
)));
$wp_customize->add_setting('multipurpose_lawyer_preloader_type',array(
'default' => 'Square',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_preloader_type',array(
'type' => 'radio',
'label' => __('Preloader Type','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_advance_options',
'choices' => array(
'Square' => __('Square','multipurpose-lawyer'),
'Circle' => __('Circle','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting('multipurpose_lawyer_theme_layout_options',array(
'default' => 'Default Theme',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_theme_layout_options',array(
'type' => 'radio',
'label' => __('Theme Layout','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_advance_options',
'choices' => array(
'Default Theme' => __('Default Theme','multipurpose-lawyer'),
'Container Theme' => __('Container Theme','multipurpose-lawyer'),
'Box Container Theme' => __('Box Container Theme','multipurpose-lawyer'),
),
) );
//404 Page Option
$wp_customize->add_section('multipurpose_lawyer_404_settings',array(
'title' => __('404 Page & Search Result Settings','multipurpose-lawyer'),
'priority' => null,
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_404_title',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_404_title',array(
'label' => __('404 Title','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_404_settings',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_404_button_label',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_404_button_label',array(
'label' => __('404 button Label','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_404_settings',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_search_result_title',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_search_result_title',array(
'label' => __('No Search Result Title','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_404_settings',
'type' => 'text'
));
$wp_customize->add_setting('multipurpose_lawyer_search_result_text',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_search_result_text',array(
'label' => __('No Search Result Text','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_404_settings',
'type' => 'text'
));
//Responsive Settings
$wp_customize->add_section('multipurpose_lawyer_responsive_options',array(
'title' => __('Responsive Options','multipurpose-lawyer'),
'panel' => 'multipurpose_lawyer_panel_id'
));
$wp_customize->add_setting('multipurpose_lawyer_menu_open_icon',array(
'default' => 'fas fa-bars',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control(new Multipurpose_Lawyer_Icon_Selector(
$wp_customize,'multipurpose_lawyer_menu_open_icon',array(
'label' => __('Mobile Menu Icon','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
'type' => 'icon',
)));
$wp_customize->add_setting('multipurpose_lawyer_mobile_menu_label',array(
'default' => __('Menu','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_mobile_menu_label',array(
'type' => 'text',
'label' => __('Mobile Menu Label','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options'
));
$wp_customize->add_setting('multipurpose_lawyer_menu_close_icon',array(
'default' => 'fas fa-times-circle',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control(new Multipurpose_Lawyer_Icon_Selector(
$wp_customize,'multipurpose_lawyer_menu_close_icon',array(
'label' => __('Menu Close Icon','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
'type' => 'icon',
)));
$wp_customize->add_setting('multipurpose_lawyer_close_menu_label',array(
'default' => __('Close Menu','multipurpose-lawyer'),
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_close_menu_label',array(
'type' => 'text',
'label' => __('Close Menu Label','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options'
));
$wp_customize->add_setting('multipurpose_lawyer_sticky_header_responsive',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_sticky_header_responsive',array(
'type' => 'checkbox',
'label' => __('Enable Sticky Header','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
));
$wp_customize->add_setting('multipurpose_lawyer_hide_topbar_responsive',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_hide_topbar_responsive',array(
'type' => 'checkbox',
'label' => __('Enable Top Header','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
));
$wp_customize->add_setting('multipurpose_lawyer_preloader_responsive',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_preloader_responsive',array(
'type' => 'checkbox',
'label' => __('Enable Preloader','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
));
$wp_customize->add_setting('multipurpose_lawyer_backtotop_responsive',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_backtotop_responsive',array(
'type' => 'checkbox',
'label' => __('Enable Back to Top','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_responsive_options',
));
//Woocommerce Options
$wp_customize->add_section('multipurpose_lawyer_woocommerce',array(
'title' => __('WooCommerce Options','multipurpose-lawyer'),
'panel' => 'multipurpose_lawyer_panel_id',
));
$wp_customize->add_setting('multipurpose_lawyer_shop_page_sidebar',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_shop_page_sidebar',array(
'type' => 'checkbox',
'label' => __('Enable Shop Page Sidebar','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce'
));
$wp_customize->add_setting('multipurpose_lawyer_shop_page_navigation',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_shop_page_navigation',array(
'type' => 'checkbox',
'label' => __('Enable Shop Page Pagination','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce'
));
$wp_customize->add_setting('multipurpose_lawyer_single_product_sidebar',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_product_sidebar',array(
'type' => 'checkbox',
'label' => __('Enable Single Product Page Sidebar','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce'
));
$wp_customize->add_setting('multipurpose_lawyer_single_related_products',array(
'default' => true,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_single_related_products',array(
'type' => 'checkbox',
'label' => __('Enable related Products','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce'
));
$wp_customize->add_setting('multipurpose_lawyer_products_per_page',array(
'default'=> '9',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_products_per_page',array(
'label' => __('Products Per Page','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_woocommerce',
'type'=> 'number',
));
$wp_customize->add_setting('multipurpose_lawyer_products_per_row',array(
'default'=> '3',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_products_per_row',array(
'label' => __('Products Per Row','multipurpose-lawyer'),
'choices' => array(
'2' => '2',
'3' => '3',
'4' => '4',
),
'section'=> 'multipurpose_lawyer_woocommerce',
'type'=> 'select',
));
$wp_customize->add_setting('multipurpose_lawyer_product_border',array(
'default' => false,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_product_border',array(
'type' => 'checkbox',
'label' => __('Show / Hide product border','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
));
$wp_customize->add_setting('multipurpose_lawyer_product_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_product_padding',array(
'label' => esc_html__('Product Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_woocommerce',
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_top_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_top_padding', array(
'label' => esc_html__( 'Top','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_bottom_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_bottom_padding', array(
'label' => esc_html__( 'Bottom','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_left_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_left_padding', array(
'label' => esc_html__( 'Left','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_right_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_right_padding', array(
'label' => esc_html__( 'Right','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_border_radius',array(
'default' => '0',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_product_border_radius', array(
'label' => __('Product Border Radius','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
$wp_customize->add_setting('multipurpose_lawyer_product_button_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_product_button_padding',array(
'label' => esc_html__('Product Button Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_woocommerce',
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_button_top_padding',array(
'default' => 10,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_button_top_padding', array(
'label' => esc_html__( 'Top','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_button_bottom_padding',array(
'default' => 10,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_button_bottom_padding', array(
'label' => esc_html__( 'Bottom','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_button_left_padding',array(
'default' => 15,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_button_left_padding', array(
'label' => esc_html__( 'Left','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_button_right_padding',array(
'default' => 15,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_button_right_padding', array(
'label' => esc_html__( 'Right','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_button_border_radius',array(
'default' => '0',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_product_button_border_radius', array(
'label' => __('Product Button Border Radius','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
$wp_customize->add_setting('multipurpose_lawyer_product_sale_position',array(
'default' => 'Right',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_position',array(
'type' => 'radio',
'label' => __('Product Sale Position','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
'choices' => array(
'Left' => __('Left','multipurpose-lawyer'),
'Right' => __('Right','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_product_sale_font_size',array(
'default' => '13',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_product_sale_font_size', array(
'label' => __('Product Sale Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
$wp_customize->add_setting('multipurpose_lawyer_product_sale_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_padding',array(
'label' => esc_html__('Product Sale Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_woocommerce',
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_sale_top_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_top_padding', array(
'label' => esc_html__( 'Top','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_sale_bottom_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_bottom_padding', array(
'label' => esc_html__( 'Bottom','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_sale_left_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_left_padding', array(
'label' => esc_html__( 'Left','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting('multipurpose_lawyer_product_sale_right_padding',array(
'default' => 0,
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_product_sale_right_padding', array(
'label' => esc_html__( 'Right','multipurpose-lawyer' ),
'type' => 'number',
'section' => 'multipurpose_lawyer_woocommerce',
'input_attrs' => array(
'min' => 0,
'max' => 50,
'step' => 1,
),
));
$wp_customize->add_setting( 'multipurpose_lawyer_product_sale_border_radius',array(
'default' => '50',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_product_sale_border_radius', array(
'label' => __('Product Sale Border Radius','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_woocommerce',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
//footer text
$wp_customize->add_section('multipurpose_lawyer_footer_section',array(
'title' => __('Footer Section','multipurpose-lawyer'),
'panel' => 'multipurpose_lawyer_panel_id'
));
$wp_customize->add_setting('multipurpose_lawyer_hide_scroll',array(
'default' => 'true',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_checkbox'
));
$wp_customize->add_control('multipurpose_lawyer_hide_scroll',array(
'type' => 'checkbox',
'label' => __('Show / Hide Back To Top','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
));
$wp_customize->add_setting('multipurpose_lawyer_back_to_top',array(
'default' => 'Right',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_back_to_top',array(
'type' => 'radio',
'label' => __('Back to Top Alignment','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
'choices' => array(
'Left' => __('Left','multipurpose-lawyer'),
'Right' => __('Right','multipurpose-lawyer'),
'Center' => __('Center','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting('multipurpose_lawyer_footer_bg_color', array(
'default' => '',
'sanitize_callback' => 'sanitize_hex_color',
));
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'multipurpose_lawyer_footer_bg_color', array(
'label' => __('Footer Background Color', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
)));
$wp_customize->add_setting('multipurpose_lawyer_footer_bg_image',array(
'default' => '',
'sanitize_callback' => 'esc_url_raw',
));
$wp_customize->add_control( new WP_Customize_Image_Control($wp_customize,'multipurpose_lawyer_footer_bg_image',array(
'label' => __('Footer Background Image','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section'
)));
$wp_customize->add_setting('multipurpose_lawyer_footer_widget',array(
'default' => '4',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices',
));
$wp_customize->add_control('multipurpose_lawyer_footer_widget',array(
'type' => 'radio',
'label' => __('No. of Footer columns', 'multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
'description' => __('Select the number of footer columns and add your widgets in the footer.', 'multipurpose-lawyer'),
'choices' => array(
'1' => __('One column', 'multipurpose-lawyer'),
'2' => __('Two columns', 'multipurpose-lawyer'),
'3' => __('Three columns', 'multipurpose-lawyer'),
'4' => __('Four columns', 'multipurpose-lawyer')
),
));
$wp_customize->add_setting('multipurpose_lawyer_copyright_padding',array(
'sanitize_callback' => 'esc_html'
));
$wp_customize->add_control('multipurpose_lawyer_copyright_padding',array(
'label' => esc_html__('Copyright Padding','multipurpose-lawyer'),
'section'=> 'multipurpose_lawyer_footer_section',
));
$wp_customize->add_setting('multipurpose_lawyer_top_copyright_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_top_copyright_padding',array(
'description' => __('Top','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_footer_section',
'type'=> 'number'
));
$wp_customize->add_setting('multipurpose_lawyer_bottom_copyright_padding',array(
'default'=> '',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_float'
));
$wp_customize->add_control('multipurpose_lawyer_bottom_copyright_padding',array(
'description' => __('Bottom','multipurpose-lawyer'),
'input_attrs' => array(
'step' => 1,
'min' => 0,
'max' => 50,
),
'section'=> 'multipurpose_lawyer_footer_section',
'type'=> 'number'
));
$wp_customize->add_setting('multipurpose_lawyer_copyright_alignment',array(
'default' => 'center',
'sanitize_callback' => 'multipurpose_lawyer_sanitize_choices'
));
$wp_customize->add_control('multipurpose_lawyer_copyright_alignment',array(
'type' => 'radio',
'label' => __('Copyright Alignment','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
'choices' => array(
'left' => __('Left','multipurpose-lawyer'),
'right' => __('Right','multipurpose-lawyer'),
'center' => __('Center','multipurpose-lawyer'),
),
) );
$wp_customize->add_setting( 'multipurpose_lawyer_copyright_font_size', array(
'default'=> '15',
'sanitize_callback' => 'sanitize_text_field'
) );
$wp_customize->add_control( new Multipurpose_Lawyer_WP_Customize_Range_Control( $wp_customize, 'multipurpose_lawyer_copyright_font_size', array(
'label' => __('Copyright Font Size','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
'description' => __('Measurement is in pixel.','multipurpose-lawyer'),
'input_attrs' => array(
'min' => 0,
'max' => 50,
)
)));
$wp_customize->add_setting('multipurpose_lawyer_text',array(
'default' => '',
'sanitize_callback' => 'sanitize_text_field'
));
$wp_customize->add_control('multipurpose_lawyer_text',array(
'label' => __('Copyright Text','multipurpose-lawyer'),
'description' => __('Add some text for footer like copyright etc.','multipurpose-lawyer'),
'section' => 'multipurpose_lawyer_footer_section',
'type' => 'text'
));
}
add_action( 'customize_register', 'multipurpose_lawyer_customize_register' );
load_template( ABSPATH . 'wp-includes/class-wp-customize-control.php' );
// logo resize
load_template( trailingslashit( get_template_directory() ) . '/inc/logo/logo-resizer.php' );
class Multipurpose_Lawyer_Image_Radio_Control extends WP_Customize_Control {
public function render_content() {
if (empty($this->choices))
return;
$name = '_customize-radio-' . $this->id;
?>
label); ?>
setup_actions();
}
return $instance;
}
/**
* Constructor method.
*
* @since 1.0.0
* @access private
* @return void
*/
private function __construct() {}
/**
* Sets up initial actions.
*
* @since 1.0.0
* @access private
* @return void
*/
private function setup_actions() {
// Register panels, sections, settings, controls, and partials.
add_action( 'customize_register', array( $this, 'sections' ) );
// Register scripts and styles for the controls.
add_action( 'customize_controls_enqueue_scripts', array( $this, 'enqueue_control_scripts' ), 0 );
}
/**
* Sets up the customizer sections.
*
* @since 1.0.0
* @access public
* @param object $manager
* @return void
*/
public function sections( $manager ) {
// Load custom sections.
load_template( trailingslashit( get_template_directory() ) . '/inc/section-pro.php' );
// Register custom section types.
$manager->register_section_type( 'Multipurpose_Lawyer_Customize_Section_Pro' );
// Register sections.
$manager->add_section(
new Multipurpose_Lawyer_Customize_Section_Pro(
$manager,
'multipurpose_lawyer_pro_link',
array(
'priority' => 9,
'title' => esc_html__( 'Multipurpose Lawyer Pro', 'multipurpose-lawyer' ),
'pro_text' => esc_html__( 'Go Pro', 'multipurpose-lawyer' ),
'pro_url' => esc_url('https://www.themesglance.com/themes/lawyer-wordpress-theme/')
)
)
);
}
/**
* Loads theme customizer CSS.
*
* @since 1.0.0
* @access public
* @return void
*/
public function enqueue_control_scripts() {
wp_enqueue_script( 'multipurpose-lawyer-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/js/customize-controls.js', array( 'customize-controls' ) );
wp_enqueue_style( 'multipurpose-lawyer-customize-controls', trailingslashit( esc_url(get_template_directory_uri()) ) . '/css/customize-controls.css' );
}
}
// Doing this customizer thang!
Multipurpose_Lawyer_Customize::get_instance();