Make WordPress Themes

Changeset 192632


Ignore:
Timestamp:
05/26/2023 11:22:59 AM (3 years ago)
Author:
themedropbox
Message:

New version of Motivational Speaker - 2.2

Location:
motivational-speaker/2.2
Files:
4 added
2 deleted
19 edited
1 copied

Legend:

Unmodified
Added
Removed
  • motivational-speaker/2.2/archive.php

    r159615 r192632  
    1010
    1111<?php
    12     $post_sidebar = get_theme_mod( 'motivational_speaker_post_sidebar' );
    13     if ( 'false' == $post_sidebar ) {
     12    $motivational_speaker_post_sidebar = get_option( 'motivational_speaker_post_sidebar' );
     13    if ( '1' == $motivational_speaker_post_sidebar ) {
    1414    $column = 'col-lg-12 col-md-12';
    1515    } else {
     
    7171                        </section>
    7272                    </div>
    73                     <?php if ( 'false' != $post_sidebar ) {?>
     73                    <?php if ( '1' != $motivational_speaker_post_sidebar ) {?>
    7474                        <div id="sidebar" class="col-lg-4 col-md-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
    7575                    <?php } ?>
  • motivational-speaker/2.2/assets/css/customizer.css

    r159615 r192632  
    3838  font-weight: bold;
    3939}
     40/*Custom head*/
     41span.title.head-customize-control-title {
     42  padding: 10px;
     43    background-color: #EFF9FF;
     44    border: 1px solid #D6F0FF;
     45    border-radius: 0;
     46    display: block;
     47    font-size: 14px;
     48    font-weight: bold;
     49    line-height: 30px;
     50    margin-bottom:5px;
     51}
     52li.customize-control {
     53    border-bottom: 1px solid #ddd;
     54    padding-top: 15px;
     55    padding-bottom: 20px;
     56    margin-bottom: 0 !important;
     57}
     58li.customize-control-section {
     59    padding: 0 !important;
     60    border: none !important;
     61}
     62.head-customize-section-description.cus-head{
     63  margin-top: 22px;
     64}
     65li.customize-section-description-container.section-meta {
     66    margin-bottom: 0;
     67}
     68.customize-control-title{
     69  font-weight: bold;
     70}
  • motivational-speaker/2.2/footer.php

    r185958 r192632  
    1515        </div>
    1616        <?php get_template_part( 'template-parts/footer/site', 'info' ); ?>
    17         <?php if( get_theme_mod( 'motivational_speaker_scroll_enable',true) != '') { ?>
     17        <?php if( get_option( 'motivational_speaker_scroll_enable',true) != 'off') { ?>
    1818        <div class="scroll-top">
    1919        <button type=button id="motivational-speaker-scroll-to-top" class="scrollup">
  • motivational-speaker/2.2/functions.php

    r185958 r192632  
    4040        return $setting->default;
    4141    }
     42}
     43
     44function motivational_speaker_callback_sanitize_switch( $value ) {
     45   
     46    // Switch values must be equal to 1 of off. Off is indicator and should not be translated.
     47    return ( ( isset( $value ) && $value == 1 ) ? 1 : 'off' );
     48
    4249}
    4350
     
    312319// Customiser Sections Dropdown
    313320
    314 function motivational_speaker_header_dropdown(){
    315     if(get_theme_mod('motivational_speaker_header_enable') == true ) {
     321
     322function motivational_speaker_social_dropdown(){
     323    if(get_option('motivational_speaker_social_enable') == true ) {
    316324        return true;
    317325    }
    318326    return false;
    319327}
    320 function motivational_speaker_social_dropdown(){
    321     if(get_theme_mod('motivational_speaker_social_enable') == true ) {
    322         return true;
    323     }
    324     return false;
    325 }
    326328function motivational_speaker_slider_dropdown(){
    327     if(get_theme_mod('motivational_speaker_slider_arrows') == true ) {
     329    if(get_option('motivational_speaker_slider_arrows') == true ) {
    328330        return true;
    329331    }
  • motivational-speaker/2.2/header.php

    r185958 r192632  
    2525?>
    2626    <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'motivational-speaker' ); ?></a>
    27     <?php if( get_theme_mod('motivational_speaker_theme_loader','') != ''){ ?>
     27    <?php if( get_option('motivational_speaker_theme_loader') == '1'){ ?>
    2828        <div class="preloader">
    2929            <div class="load">
     
    4545                                        <?php endif; ?>
    4646                                        <?php $blog_info = get_bloginfo( 'name' ); ?>
    47                                         <?php if( get_theme_mod('motivational_speaker_logo_title',true) != '' ){ ?>
     47                                        <?php if( get_option('motivational_speaker_logo_title','') != 'off' ){ ?>
    4848                                            <?php if ( ! empty( $blog_info ) ) : ?>
    4949                                                <?php if ( is_front_page() && is_home() ) : ?>
     
    5858                                                if ( $description || is_customize_preview() ) :
    5959                                            ?>
    60                                             <?php if( get_theme_mod('motivational_speaker_logo_text',false) != '' ){ ?>
     60                                            <?php if( get_option('motivational_speaker_logo_text','') != 'off' ){ ?>
    6161                                            <p class="site-description">
    6262                                                <?php echo esc_html($description); ?>
     
    8484                                    </div>
    8585                                </div>
    86                                     <?php
    87                                     $header_social_icon_enable = esc_attr(get_theme_mod('header_social_icon_enable','true'));
    88                                     $motivational_speaker_header_fb_target = esc_attr(get_theme_mod('motivational_speaker_header_fb_target','true'));
    89                                     $motivational_speaker_header_twt_target = esc_attr(get_theme_mod('motivational_speaker_header_twt_target','true'));             
    90                                     $motivational_speaker_header_ut_target = esc_attr(get_theme_mod('motivational_speaker_header_ut_target','true'));
    91                                     $motivational_speaker_header_ins_target = esc_attr(get_theme_mod('motivational_speaker_header_ins_target','true'));
    92                                  ?>
    93                                 <?php if( get_theme_mod('motivational_speaker_social_enable') != ''){ ?>
     86                                <?php if( get_option('motivational_speaker_social_enable',false) != 'off'){ ?>
     87                                    <?php                                   
     88                                    $motivational_speaker_header_fb_target = esc_attr(get_option('motivational_speaker_header_fb_target','true'));
     89                                    $motivational_speaker_header_twt_target = esc_attr(get_option('motivational_speaker_header_twt_target','true'));               
     90                                    $motivational_speaker_header_ut_target = esc_attr(get_option('motivational_speaker_header_ut_target','true'));
     91                                    $motivational_speaker_header_ins_target = esc_attr(get_option('motivational_speaker_header_ins_target','true'));
     92                                 ?>                             
    9493                                    <div class="col-lg-2 col-md-6 col-sm-6 align-self-center media-box">
    9594                                        <?php if( get_theme_mod('motivational_speaker_social_facebook') != '' ){ ?>
    96                                             <a <?php if($motivational_speaker_header_fb_target) { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_facebook','')); ?>"class="mb-0">
     95                                            <a <?php if($motivational_speaker_header_fb_target !='off') { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_facebook','')); ?>"class="mb-0">
    9796                                            <i class="<?php echo esc_html(get_theme_mod('motivational_speaker_facebook_icon','fab fa-facebook-f')); ?>"></i>                   
    9897                                            </a>   
    9998                                        <?php }?>
    10099                                        <?php if( get_theme_mod('motivational_speaker_social_twitter') != '' ){ ?>
    101                                             <a <?php if($motivational_speaker_header_twt_target) { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_twitter','')); ?>" class="mb-0">
     100                                            <a <?php if($motivational_speaker_header_twt_target !='off') { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_twitter','')); ?>" class="mb-0">
    102101                                            <i class="<?php echo esc_html(get_theme_mod('motivational_speaker_twitter_icon','fab fa-twitter')); ?>"></i>
    103102                                            </a>
    104103                                        <?php }?>
    105104                                        <?php if( get_theme_mod('motivational_speaker_social_youtube') != '' ){ ?>
    106                                             <a <?php if($motivational_speaker_header_ut_target) { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_youtube','')); ?>" class="mb-0">
     105                                            <a <?php if($motivational_speaker_header_ut_target !='off') { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_youtube','')); ?>" class="mb-0">
    107106                                            <i class="<?php echo esc_html(get_theme_mod('motivational_speaker_youtube_icon','fab fa-youtube')); ?>"></i>
    108107                                            </a>
    109108                                        <?php }?>
    110109                                        <?php if( get_theme_mod('motivational_speaker_social_instagram') != '' ){ ?>
    111                                             <a <?php if($motivational_speaker_header_ins_target) { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_instagram','')); ?>"  class="mb-0">
     110                                            <a <?php if($motivational_speaker_header_ins_target !='off') { ?>target="_blank" <?php } ?>href="<?php echo esc_url(get_theme_mod('motivational_speaker_social_instagram','')); ?>"  class="mb-0">
    112111                                            <i class="<?php echo esc_html(get_theme_mod('motivational_speaker_instagram_icon','fab fa-instagram')); ?>"></i>
    113112                                            </a>
  • motivational-speaker/2.2/inc/custom-header.php

    r175673 r192632  
    3636}
    3737endif;
     38
     39
     40// Heading
     41
     42if( class_exists( 'WP_Customize_Control' ) ) {
     43    class Motivational_Speaker_Customizer_Customcontrol_Section_Heading extends WP_Customize_Control {
     44 
     45        // Declare the control type.
     46        public $type = 'section';
     47
     48        // Render the control to be displayed in the Customizer.
     49        public function render_content() {
     50        ?>
     51            <div class="head-customize-section-description cus-head">
     52                <span class="title head-customize-control-title"><?php echo esc_html( $this->label ); ?></span>
     53                <?php if ( !empty( $this->description ) ) : ?>
     54                <span class="description-customize-control-description"><?php echo esc_html( $this->description ); ?></span>
     55            <?php endif; ?>
     56            </div>
     57        <?php
     58        }
     59    }
     60}
  • motivational-speaker/2.2/inc/customizer.php

    r190420 r192632  
    1616
    1717    // Add custom control.
    18     require get_parent_theme_file_path( 'inc/customize/customize_toggle.php' );
    19 
    20     // Register the custom control type.
    21     $wp_customize->register_control_type( 'motivational_speaker_Toggle_Control' );
     18    require get_parent_theme_file_path( 'inc/switch/control_switch.php' );
    2219
    2320    $wp_customize->add_section( 'motivational_speaker_typography_settings', array(
     
    6057        );
    6158
     59    $wp_customize->add_setting( 'motivational_speaker_section_typo_heading', array(
     60            'default'           => '',
     61            'transport'         => 'refresh',
     62            'sanitize_callback' => 'sanitize_text_field',
     63        ) );
     64        $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_typo_heading', array(
     65            'label'       => esc_html__( 'Typography Settings', 'motivational-speaker' ),
     66            'section'     => 'motivational_speaker_typography_settings',
     67            'settings'    => 'motivational_speaker_section_typo_heading',
     68        ) ) );
     69
    6270
    6371    $wp_customize->add_setting( 'motivational_speaker_headings_text', array(
     
    108116        ));
    109117
    110     $wp_customize->add_setting( 'motivational_speaker_logo_title', array(
    111         'default'           => true,
    112         'transport'         => 'refresh',
    113         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    114     ) );
    115     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_logo_title', array(
    116         'label'       => esc_html__( 'Show Site Title', 'motivational-speaker' ),
    117         'section'     => 'title_tagline',
    118         'type'        => 'toggle',
    119         'settings'    => 'motivational_speaker_logo_title',
    120     ) ) );
    121 
    122     $wp_customize->add_setting( 'motivational_speaker_logo_text', array(
    123         'default'           => false,
    124         'transport'         => 'refresh',
    125         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    126     ) );
    127     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_logo_text', array(
    128         'label'       => esc_html__( 'Show Site Tagline', 'motivational-speaker' ),
    129         'section'     => 'title_tagline',
    130         'type'        => 'toggle',
    131         'settings'    => 'motivational_speaker_logo_text',
    132     ) ) );
     118        $wp_customize->add_setting('motivational_speaker_logo_title',
     119        array(
     120            'type'                 => 'option',
     121            'capability'           => 'edit_theme_options',
     122            'theme_supports'       => '',
     123            'default'              => '1',
     124            'transport'            => 'refresh',
     125            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     126        )
     127    );
     128    $wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
     129            $wp_customize,
     130            'motivational_speaker_logo_title',
     131            array(
     132                'settings'        => 'motivational_speaker_logo_title',
     133                'section'         => 'title_tagline',
     134                'label'           => __( 'Show Site Title', 'motivational-speaker' ),               
     135                'choices'         => array(
     136                    '1'      => __( 'On', 'motivational-speaker' ),
     137                    'off'    => __( 'Off', 'motivational-speaker' ),
     138                ),
     139                'active_callback' => '',
     140            )
     141        )
     142    );
     143
     144    $wp_customize->add_setting('motivational_speaker_logo_text',
     145        array(
     146            'type'                 => 'option',
     147            'capability'           => 'edit_theme_options',
     148            'theme_supports'       => '',
     149            'default'              => '1',
     150            'transport'            => 'refresh',
     151            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     152        )
     153    );
     154    $wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
     155            $wp_customize,
     156            'motivational_speaker_logo_text',
     157            array(
     158                'settings'        => 'motivational_speaker_logo_text',
     159                'section'         => 'title_tagline',
     160                'label'           => __( 'Show Site Tagline', 'motivational-speaker' ),             
     161                'choices'         => array(
     162                    '1'      => __( 'On', 'motivational-speaker' ),
     163                    'off'    => __( 'Off', 'motivational-speaker' ),
     164                ),
     165                'active_callback' => '',
     166            )
     167        )
     168    );
    133169
    134170    // Theme General Settings
     
    138174    ) );
    139175
    140     $wp_customize->add_setting( 'motivational_speaker_sticky_header', array(
    141         'default'           => false,
     176    $wp_customize->add_setting(
     177        'motivational_speaker_sticky_header',
     178        array(
     179            'type'                 => 'option',
     180            'capability'           => 'edit_theme_options',
     181            'theme_supports'       => '',
     182            'default'              => '1',
     183            'transport'            => 'refresh',
     184            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     185        )
     186    );
     187    $wp_customize->add_control(
     188        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     189            $wp_customize,
     190            'motivational_speaker_sticky_header',
     191            array(
     192                'settings'        => 'motivational_speaker_sticky_header',
     193                'section'         => 'motivational_speaker_theme_settings',
     194                'label'           => __( 'Show Sticky Header', 'motivational-speaker' ),               
     195                'choices'         => array(
     196                    '1'      => __( 'On', 'motivational-speaker' ),
     197                    'off'    => __( 'Off', 'motivational-speaker' ),
     198                ),
     199                'active_callback' => '',
     200            )
     201        )
     202    );
     203
     204    $wp_customize->add_setting(
     205        'motivational_speaker_theme_loader',
     206        array(
     207            'type'                 => 'option',
     208            'capability'           => 'edit_theme_options',
     209            'theme_supports'       => '',
     210            'default'              => '',
     211            'transport'            => 'refresh',
     212            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     213        )
     214    );
     215    $wp_customize->add_control(
     216        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     217            $wp_customize,
     218            'motivational_speaker_theme_loader',
     219            array(
     220                'settings'        => 'motivational_speaker_theme_loader',
     221                'section'         => 'motivational_speaker_theme_settings',
     222                'label'           => __( 'Show Site Loader', 'motivational-speaker' ),             
     223                'choices'         => array(
     224                    '1'      => __( 'On', 'motivational-speaker' ),
     225                    'off'    => __( 'Off', 'motivational-speaker' ),
     226                ),
     227                'active_callback' => '',
     228            )
     229        )
     230    );
     231
     232    $wp_customize->add_setting('motivational_speaker_menu_text_transform',array(
     233        'default' => 'CAPITALISE',
     234        'sanitize_callback' => 'motivational_speaker_sanitize_choices'
     235    ));
     236    $wp_customize->add_control('motivational_speaker_menu_text_transform',array(
     237        'type' => 'select',
     238        'label' => __('Menus Text Transform','motivational-speaker'),
     239        'section' => 'motivational_speaker_theme_settings',
     240        'choices' => array(
     241            'CAPITALISE' => __('CAPITALISE','motivational-speaker'),
     242            'UPPERCASE' => __('UPPERCASE','motivational-speaker'),
     243            'LOWERCASE' => __('LOWERCASE','motivational-speaker'),
     244        ),
     245    ) );
     246
     247    $wp_customize->add_setting( 'motivational_speaker_section_scroll_heading', array(
     248        'default'           => '',
    142249        'transport'         => 'refresh',
    143         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    144     ) );
    145     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_sticky_header', array(
    146         'label'       => esc_html__( 'Show Sticky Header', 'motivational-speaker' ),
     250        'sanitize_callback' => 'sanitize_text_field',
     251    ) );
     252    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_scroll_heading', array(
     253        'label'       => esc_html__( 'Scroll Top Settings', 'motivational-speaker' ),
    147254        'section'     => 'motivational_speaker_theme_settings',
    148         'type'        => 'toggle',
    149         'settings'    => 'motivational_speaker_sticky_header',
     255        'settings'    => 'motivational_speaker_section_scroll_heading',
    150256    ) ) );
    151257
    152     $wp_customize->add_setting( 'motivational_speaker_theme_loader', array(
    153         'default'           => true,
    154         'transport'         => 'refresh',
    155         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    156     ) );
    157     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_theme_loader', array(
    158         'label'       => esc_html__( 'Show Site Loader', 'motivational-speaker' ),
    159         'section'     => 'motivational_speaker_theme_settings',
    160         'type'        => 'toggle',
    161         'settings'    => 'motivational_speaker_theme_loader',
    162     ) ) );
    163 
    164     $wp_customize->add_setting( 'motivational_speaker_scroll_enable', array(
    165         'default'           => false,
    166         'transport'         => 'refresh',
    167         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    168     ) );
    169     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_scroll_enable', array(
    170         'label'       => esc_html__( 'Show Scroll Top', 'motivational-speaker' ),
    171         'section'     => 'motivational_speaker_theme_settings',
    172         'type'        => 'toggle',
    173         'settings'    => 'motivational_speaker_scroll_enable',
    174     ) ) );
     258    $wp_customize->add_setting(
     259        'motivational_speaker_scroll_enable',
     260        array(
     261            'type'                 => 'option',
     262            'capability'           => 'edit_theme_options',
     263            'theme_supports'       => '',
     264            'default'              => '1',
     265            'transport'            => 'refresh',
     266            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     267        )
     268    );
     269    $wp_customize->add_control(
     270        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     271            $wp_customize,
     272            'motivational_speaker_scroll_enable',
     273            array(
     274                'settings'        => 'motivational_speaker_scroll_enable',
     275                'section'         => 'motivational_speaker_theme_settings',
     276                'label'           => __( 'Show Scroll Top', 'motivational-speaker' ),               
     277                'choices'         => array(
     278                    '1'      => __( 'On', 'motivational-speaker' ),
     279                    'off'    => __( 'Off', 'motivational-speaker' ),
     280                ),
     281                'active_callback' => '',
     282            )
     283        )
     284    );
    175285
    176286    $wp_customize->add_setting('motivational_speaker_scroll_options',array(
     
    202312    )));
    203313
    204     $wp_customize->add_setting('motivational_speaker_menu_text_transform',array(
    205         'default' => 'CAPITALISE',
    206         'sanitize_callback' => 'motivational_speaker_sanitize_choices'
    207     ));
    208     $wp_customize->add_control('motivational_speaker_menu_text_transform',array(
    209         'type' => 'select',
    210         'label' => __('Menus Text Transform','motivational-speaker'),
    211         'section' => 'motivational_speaker_theme_settings',
    212         'choices' => array(
    213             'CAPITALISE' => __('CAPITALISE','motivational-speaker'),
    214             'UPPERCASE' => __('UPPERCASE','motivational-speaker'),
    215             'LOWERCASE' => __('LOWERCASE','motivational-speaker'),
    216         ),
    217     ) );
    218 
    219     $wp_customize->add_setting( 'motivational_speaker_shop_page_sidebar', array(
    220         'default'           => true,
     314    $wp_customize->add_setting( 'motivational_speaker_section_shoppage_heading', array(
     315        'default'           => '',
    221316        'transport'         => 'refresh',
    222         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    223     ) );
    224     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_shop_page_sidebar', array(
    225         'label'       => esc_html__( 'Show Shop Page Sidebar', 'motivational-speaker' ),
     317        'sanitize_callback' => 'sanitize_text_field',
     318    ) );
     319    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_shoppage_heading', array(
     320        'label'       => esc_html__( 'Shop Page Settings', 'motivational-speaker' ),
    226321        'section'     => 'motivational_speaker_theme_settings',
    227         'type'        => 'toggle',
    228         'settings'    => 'motivational_speaker_shop_page_sidebar',
     322        'settings'    => 'motivational_speaker_section_shoppage_heading',
    229323    ) ) );
    230324
    231     $wp_customize->add_setting( 'motivational_speaker_wocommerce_single_page_sidebar', array(
    232         'default'           => true,
    233         'transport'         => 'refresh',
    234         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    235     ) );
    236     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_wocommerce_single_page_sidebar', array(
    237         'label'       => esc_html__( 'Show Single Product Page Sidebar', 'motivational-speaker' ),
    238         'section'     => 'motivational_speaker_theme_settings',
    239         'type'        => 'toggle',
    240         'settings'    => 'motivational_speaker_wocommerce_single_page_sidebar',
    241     ) ) );
     325    $wp_customize->add_setting(
     326        'motivational_speaker_shop_page_sidebar',
     327        array(
     328            'type'                 => 'option',
     329            'capability'           => 'edit_theme_options',
     330            'theme_supports'       => '',
     331            'default'              => '1',
     332            'transport'            => 'refresh',
     333            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     334        )
     335    );
     336    $wp_customize->add_control(
     337        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     338            $wp_customize,
     339            'motivational_speaker_shop_page_sidebar',
     340            array(
     341                'settings'        => 'motivational_speaker_shop_page_sidebar',
     342                'section'         => 'motivational_speaker_theme_settings',
     343                'label'           => __( 'Show Shop Page Sidebar', 'motivational-speaker' ),               
     344                'choices'         => array(
     345                    '1'      => __( 'On', 'motivational-speaker' ),
     346                    'off'    => __( 'Off', 'motivational-speaker' ),
     347                ),
     348                'active_callback' => '',
     349            )
     350        )
     351    );
     352
     353    $wp_customize->add_setting(
     354        'motivational_speaker_wocommerce_single_page_sidebar',
     355        array(
     356            'type'                 => 'option',
     357            'capability'           => 'edit_theme_options',
     358            'theme_supports'       => '',
     359            'default'              => '1',
     360            'transport'            => 'refresh',
     361            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     362        )
     363    );
     364    $wp_customize->add_control(
     365        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     366            $wp_customize,
     367            'motivational_speaker_wocommerce_single_page_sidebar',
     368            array(
     369                'settings'        => 'motivational_speaker_wocommerce_single_page_sidebar',
     370                'section'         => 'motivational_speaker_theme_settings',
     371                'label'           => __( 'Show Single Product Page Sidebar', 'motivational-speaker' ),             
     372                'choices'         => array(
     373                    '1'      => __( 'On', 'motivational-speaker' ),
     374                    'off'    => __( 'Off', 'motivational-speaker' ),
     375                ),
     376                'active_callback' => '',
     377            )
     378        )
     379    );
    242380
    243381    //theme width
     
    265403    $wp_customize->add_section('motivational_speaker_layout',array(
    266404        'title' => __('Post Layout', 'motivational-speaker'),
    267         'description' => __( 'Change the post layout from below options', 'motivational-speaker' ),
    268405        'priority' => 1
    269406    ) );
    270407
    271     $wp_customize->add_setting( 'motivational_speaker_post_sidebar', array(
    272         'default'           => false,
     408    $wp_customize->add_setting( 'motivational_speaker_section_post_heading', array(
     409        'default'           => '',
    273410        'transport'         => 'refresh',
    274         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    275     ) );
    276     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_post_sidebar', array(
    277         'label'       => esc_html__( 'Show Fullwidth', 'motivational-speaker' ),
     411        'sanitize_callback' => 'sanitize_text_field',
     412    ) );
     413    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_post_heading', array(
     414        'label'       => esc_html__( 'Page Structure', 'motivational-speaker' ),
     415         'description' => __( 'Change the post layout from below options', 'motivational-speaker' ),
    278416        'section'     => 'motivational_speaker_layout',
    279         'type'        => 'toggle',
    280         'settings'    => 'motivational_speaker_post_sidebar',
     417        'settings'    => 'motivational_speaker_section_post_heading',
    281418    ) ) );
    282419
    283     $wp_customize->add_setting( 'motivational_speaker_single_post_sidebar', array(
    284         'default'           => false,
    285         'transport'         => 'refresh',
    286         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    287     ) );
    288     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_single_post_sidebar', array(
    289         'label'       => esc_html__( 'Show Single Post Fullwidth', 'motivational-speaker' ),
    290         'section'     => 'motivational_speaker_layout',
    291         'type'        => 'toggle',
    292         'settings'    => 'motivational_speaker_single_post_sidebar',
    293     ) ) );
     420    $wp_customize->add_setting(
     421        'motivational_speaker_post_sidebar',
     422        array(
     423            'type'                 => 'option',
     424            'capability'           => 'edit_theme_options',
     425            'theme_supports'       => '',
     426            'default'              => '',
     427            'transport'            => 'refresh',
     428            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     429        )
     430    );
     431    $wp_customize->add_control(
     432        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     433            $wp_customize,
     434            'motivational_speaker_post_sidebar',
     435            array(
     436                'settings'        => 'motivational_speaker_post_sidebar',
     437                'section'         => 'motivational_speaker_layout',
     438                'label'           => __( 'Show Fullwidth', 'motivational-speaker' ),               
     439                'choices'         => array(
     440                    '1'      => __( 'On', 'motivational-speaker' ),
     441                    'off'    => __( 'Off', 'motivational-speaker' ),
     442                ),
     443                'active_callback' => '',
     444            )
     445        )
     446    );
     447
     448    $wp_customize->add_setting(
     449        'motivational_speaker_single_post_sidebar',
     450        array(
     451            'type'                 => 'option',
     452            'capability'           => 'edit_theme_options',
     453            'theme_supports'       => '',
     454            'default'              => '',
     455            'transport'            => 'refresh',
     456            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     457        )
     458    );
     459    $wp_customize->add_control(
     460        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     461            $wp_customize,
     462            'motivational_speaker_single_post_sidebar',
     463            array(
     464                'settings'        => 'motivational_speaker_single_post_sidebar',
     465                'section'         => 'motivational_speaker_layout',
     466                'label'           => __( 'Show Single Post Fullwidth', 'motivational-speaker' ),               
     467                'choices'         => array(
     468                    '1'      => __( 'On', 'motivational-speaker' ),
     469                    'off'    => __( 'Off', 'motivational-speaker' ),
     470                ),
     471                'active_callback' => '',
     472            )
     473        )
     474    );
    294475
    295476    $wp_customize->add_setting('motivational_speaker_post_option',array(
     
    326507    ));
    327508
    328     $wp_customize->add_setting( 'motivational_speaker_date', array(
    329         'default'           => true,
    330         'transport'         => 'refresh',
    331         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    332     ) );
    333     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_date', array(
    334         'label'       => esc_html__( 'Hide Date', 'motivational-speaker' ),
    335         'section'     => 'motivational_speaker_layout',
    336         'type'        => 'toggle',
    337         'settings'    => 'motivational_speaker_date',
    338     ) ) );
    339 
    340     $wp_customize->add_setting( 'motivational_speaker_admin', array(
    341         'default'           => true,
    342         'transport'         => 'refresh',
    343         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    344     ) );
    345     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_admin', array(
    346         'label'       => esc_html__( 'Hide Author/Admin', 'motivational-speaker' ),
    347         'section'     => 'motivational_speaker_layout',
    348         'type'        => 'toggle',
    349         'settings'    => 'motivational_speaker_admin',
    350     ) ) );
    351 
    352     $wp_customize->add_setting( 'motivational_speaker_comment', array(
    353         'default'           => true,
    354         'transport'         => 'refresh',
    355         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    356     ) );
    357     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_comment', array(
    358         'label'       => esc_html__( 'Hide Comment', 'motivational-speaker' ),
    359         'section'     => 'motivational_speaker_layout',
    360         'type'        => 'toggle',
    361         'settings'    => 'motivational_speaker_comment',
    362     ) ) );
     509    $wp_customize->add_setting('motivational_speaker_date',
     510        array(
     511            'type'                 => 'option',
     512            'capability'           => 'edit_theme_options',
     513            'theme_supports'       => '',
     514            'default'              => '1',
     515            'transport'            => 'refresh',
     516            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     517        )
     518    );
     519    $wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
     520            $wp_customize,
     521            'motivational_speaker_date',
     522            array(
     523                'settings'        => 'motivational_speaker_date',
     524                'section'         => 'motivational_speaker_layout',
     525                'label'           => __( 'Show Date', 'motivational-speaker' ),             
     526                'choices'         => array(
     527                    '1'      => __( 'On', 'motivational-speaker' ),
     528                    'off'    => __( 'Off', 'motivational-speaker' ),
     529                ),
     530                'active_callback' => '',
     531            )
     532        )
     533    );
     534
     535    $wp_customize->selective_refresh->add_partial( 'motivational_speaker_date', array(
     536        'selector' => '.date-box',
     537        'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_date',
     538    ) );
     539
     540    $wp_customize->add_setting('motivational_speaker_admin',
     541        array(
     542            'type'                 => 'option',
     543            'capability'           => 'edit_theme_options',
     544            'theme_supports'       => '',
     545            'default'              => '1',
     546            'transport'            => 'refresh',
     547            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     548        )
     549    );
     550    $wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
     551            $wp_customize,
     552            'motivational_speaker_admin',
     553            array(
     554                'settings'        => 'motivational_speaker_admin',
     555                'section'         => 'motivational_speaker_layout',
     556                'label'           => __( 'Show Author/Admin', 'motivational-speaker' ),             
     557                'choices'         => array(
     558                    '1'      => __( 'On', 'motivational-speaker' ),
     559                    'off'    => __( 'Off', 'motivational-speaker' ),
     560                ),
     561                'active_callback' => '',
     562            )
     563        )
     564    );
     565
     566    $wp_customize->selective_refresh->add_partial( 'motivational_speaker_admin', array(
     567        'selector' => '.entry-author',
     568        'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_admin',
     569    ) );
     570
     571    $wp_customize->add_setting('motivational_speaker_comment',
     572        array(
     573            'type'                 => 'option',
     574            'capability'           => 'edit_theme_options',
     575            'theme_supports'       => '',
     576            'default'              => '1',
     577            'transport'            => 'refresh',
     578            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     579        )
     580    );
     581    $wp_customize->add_control(new Motivational_Speaker_Customizer_Customcontrol_Switch(
     582            $wp_customize,
     583            'motivational_speaker_comment',
     584            array(
     585                'settings'        => 'motivational_speaker_comment',
     586                'section'         => 'motivational_speaker_layout',
     587                'label'           => __( 'Show Comment', 'motivational-speaker' ),             
     588                'choices'         => array(
     589                    '1'      => __( 'On', 'motivational-speaker' ),
     590                    'off'    => __( 'Off', 'motivational-speaker' ),
     591                ),
     592                'active_callback' => '',
     593            )
     594        )
     595    );
     596
     597    $wp_customize->selective_refresh->add_partial( 'motivational_speaker_comment', array(
     598        'selector' => '.entry-comments',
     599        'render_callback' => 'motivational_speaker_customize_partial_motivational_speaker_comment',
     600    ) );
    363601
    364602    // Top Header
     
    368606    ) );
    369607
     608    $wp_customize->add_setting( 'motivational_speaker_section_contact_heading', array(
     609            'default'           => '',
     610            'transport'         => 'refresh',
     611            'sanitize_callback' => 'sanitize_text_field',
     612    ) );
     613    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_contact_heading', array(
     614        'label'       => esc_html__( 'Contact Settings', 'motivational-speaker' ), 
     615        'description' => __( 'Add contact info in the below feilds', 'motivational-speaker' ),     
     616        'section'     => 'motivational_speaker_top',
     617        'settings'    => 'motivational_speaker_section_contact_heading',
     618    ) ) );
     619
    370620    $wp_customize->add_setting('motivational_speaker_call_text',array(
    371621        'default' => '',
     
    418668    ) );
    419669
    420     $wp_customize->add_setting( 'motivational_speaker_social_enable', array(
    421         'default'           => false,
    422         'transport'         => 'refresh',
    423         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    424     ) );
    425     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_social_enable', array(
    426         'label'       => esc_html__( 'Check to show social links', 'motivational-speaker' ),
    427         'section'     => 'motivational_speaker_social_media',
    428         'type'        => 'toggle',
    429         'settings'    => 'motivational_speaker_social_enable',
     670    $wp_customize->add_setting( 'motivational_speaker_section_social_heading', array(
     671            'default'           => '',
     672            'transport'         => 'refresh',
     673            'sanitize_callback' => 'sanitize_text_field',
     674        ) );
     675    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_social_heading', array(
     676        'label'       => esc_html__( 'Social Media Settings', 'motivational-speaker' ),
     677        'description' => __( 'Add social media links in the below feilds', 'motivational-speaker' ),           
     678        'section'     => 'motivational_speaker_urls',
     679        'settings'    => 'motivational_speaker_section_social_heading',
    430680    ) ) );
     681
     682    $wp_customize->add_setting(
     683        'motivational_speaker_social_enable',
     684        array(
     685            'type'                 => 'option',
     686            'capability'           => 'edit_theme_options',
     687            'theme_supports'       => '',
     688            'default'              => '1',
     689            'transport'            => 'refresh',
     690            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     691        )
     692    );
     693    $wp_customize->add_control(
     694        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     695            $wp_customize,
     696            'motivational_speaker_social_enable',
     697            array(
     698                'settings'        => 'motivational_speaker_social_enable',
     699                'section'         => 'motivational_speaker_social_media',
     700                'label'           => __( 'Check to show social fields', 'motivational-speaker' ),               
     701                'choices'         => array(
     702                    '1'      => __( 'On', 'motivational-speaker' ),
     703                    'off'    => __( 'Off', 'motivational-speaker' ),
     704                ),
     705                'active_callback' => '',
     706            )
     707        )
     708    );
    431709
    432710    $wp_customize->add_setting('motivational_speaker_facebook_icon',array(
     
    456734    ));
    457735
    458 
    459     $wp_customize->add_setting('motivational_speaker_header_fb_target',
    460     array(
    461         'default' => true,
    462         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    463     )
    464     );
    465     $wp_customize->add_control(new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_header_fb_target',
    466         array(
    467             'label' => esc_html__('Open link in a new tab', 'motivational-speaker'),
    468             'type' => 'toggle',
    469             'section' => 'motivational_speaker_social_media',
    470             'active_callback' => 'motivational_speaker_social_dropdown'
    471         )
    472     )); 
     736    $wp_customize->add_setting(
     737        'motivational_speaker_header_fb_target',
     738        array(
     739            'type'                 => 'option',
     740            'capability'           => 'edit_theme_options',
     741            'theme_supports'       => '',
     742            'default'              => '1',
     743            'transport'            => 'refresh',
     744            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     745        )
     746    );
     747    $wp_customize->add_control(
     748        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     749            $wp_customize,
     750            'motivational_speaker_header_fb_target',
     751            array(
     752                'settings'        => 'motivational_speaker_header_fb_target',
     753                'section'         => 'motivational_speaker_social_media',
     754                'label'           => __( 'Open link in a new tab', 'motivational-speaker' ),               
     755                'choices'         => array(
     756                    '1'      => __( 'On', 'motivational-speaker' ),
     757                    'off'    => __( 'Off', 'motivational-speaker' ),
     758                ),
     759                'active_callback' => 'motivational_speaker_social_dropdown',
     760            )
     761        )
     762    );
    473763
    474764    $wp_customize->add_setting('motivational_speaker_twitter_icon',array(
     
    498788    ));
    499789
    500     $wp_customize->add_setting('motivational_speaker_header_twt_target',
    501     array(
    502         'default' => true,
    503         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    504     )
    505     );
    506     $wp_customize->add_control(new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_header_twt_target',
    507         array(
    508             'label' => esc_html__('Open link in a new tab', 'motivational-speaker'),
    509             'type' => 'toggle',
    510             'section' => 'motivational_speaker_social_media',
    511             'active_callback' => 'motivational_speaker_social_dropdown'
    512         )
    513     ));
     790    $wp_customize->add_setting(
     791        'motivational_speaker_header_twt_target',
     792        array(
     793            'type'                 => 'option',
     794            'capability'           => 'edit_theme_options',
     795            'theme_supports'       => '',
     796            'default'              => '1',
     797            'transport'            => 'refresh',
     798            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     799        )
     800    );
     801    $wp_customize->add_control(
     802        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     803            $wp_customize,
     804            'motivational_speaker_header_twt_target',
     805            array(
     806                'settings'        => 'motivational_speaker_header_twt_target',
     807                'section'         => 'motivational_speaker_social_media',
     808                'label'           => __( 'Open link in a new tab', 'motivational-speaker' ),               
     809                'choices'         => array(
     810                    '1'      => __( 'On', 'motivational-speaker' ),
     811                    'off'    => __( 'Off', 'motivational-speaker' ),
     812                ),
     813                'active_callback' => 'motivational_speaker_social_dropdown',
     814            )
     815        )
     816    );
    514817
    515818    $wp_customize->add_setting('motivational_speaker_youtube_icon',array(
     
    539842    ));
    540843
    541     $wp_customize->add_setting('motivational_speaker_header_ut_target',
    542     array(
    543         'default' => true,
    544         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    545     )
    546     );
    547     $wp_customize->add_control(new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_header_ut_target',
    548         array(
    549             'label' => esc_html__('Open link in a new tab', 'motivational-speaker'),
    550             'type' => 'toggle',
    551             'section' => 'motivational_speaker_social_media',
    552             'active_callback' => 'motivational_speaker_social_dropdown'
    553         )
    554     ));
     844    $wp_customize->add_setting(
     845        'motivational_speaker_header_ut_target',
     846        array(
     847            'type'                 => 'option',
     848            'capability'           => 'edit_theme_options',
     849            'theme_supports'       => '',
     850            'default'              => '1',
     851            'transport'            => 'refresh',
     852            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     853        )
     854    );
     855    $wp_customize->add_control(
     856        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     857            $wp_customize,
     858            'motivational_speaker_header_ut_target',
     859            array(
     860                'settings'        => 'motivational_speaker_header_ut_target',
     861                'section'         => 'motivational_speaker_social_media',
     862                'label'           => __( 'Open link in a new tab', 'motivational-speaker' ),               
     863                'choices'         => array(
     864                    '1'      => __( 'On', 'motivational-speaker' ),
     865                    'off'    => __( 'Off', 'motivational-speaker' ),
     866                ),
     867                'active_callback' => 'motivational_speaker_social_dropdown',
     868            )
     869        )
     870    );
    555871
    556872    $wp_customize->add_setting('motivational_speaker_instagram_icon',array(
     
    580896    ));
    581897
    582     $wp_customize->add_setting('motivational_speaker_header_ins_target',
    583     array(
    584         'default' => true,
    585         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    586     )
    587     );
    588     $wp_customize->add_control(new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_header_ins_target',
    589         array(
    590             'label' => esc_html__('Open link in a new tab', 'motivational-speaker'),
    591             'type' => 'toggle',
    592             'section' => 'motivational_speaker_social_media',
    593             'active_callback' => 'motivational_speaker_social_dropdown'
    594         )
    595     ));
     898    $wp_customize->add_setting(
     899        'motivational_speaker_header_ins_target',
     900        array(
     901            'type'                 => 'option',
     902            'capability'           => 'edit_theme_options',
     903            'theme_supports'       => '',
     904            'default'              => '1',
     905            'transport'            => 'refresh',
     906            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     907        )
     908    );
     909    $wp_customize->add_control(
     910        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     911            $wp_customize,
     912            'motivational_speaker_header_ins_target',
     913            array(
     914                'settings'        => 'motivational_speaker_header_ins_target',
     915                'section'         => 'motivational_speaker_social_media',
     916                'label'           => __( 'Open link in a new tab', 'motivational-speaker' ),               
     917                'choices'         => array(
     918                    '1'      => __( 'On', 'motivational-speaker' ),
     919                    'off'    => __( 'Off', 'motivational-speaker' ),
     920                ),
     921                'active_callback' => 'motivational_speaker_social_dropdown',
     922            )
     923        )
     924    );
    596925
    597926    //Slider
    598927    $wp_customize->add_section( 'motivational_speaker_slider_section' , array(
    599928        'title'      => __( 'Slider Settings', 'motivational-speaker' ),
    600         'description' => __('Slider Image Dimension ( 600px x 700px )','motivational-speaker'),
    601         'priority'   => 3,
    602     ) );
    603 
    604     $wp_customize->add_setting( 'motivational_speaker_slider_arrows', array(
    605         'default'           => false,
    606         'transport'         => 'refresh',
    607         'sanitize_callback' => 'motivational_speaker_sanitize_checkbox',
    608     ) );
    609     $wp_customize->add_control( new motivational_speaker_Toggle_Control( $wp_customize, 'motivational_speaker_slider_arrows', array(
    610         'label'       => esc_html__( 'Check to show slider', 'motivational-speaker' ),
     929        'priority'   => 3,
     930    ) );
     931
     932    $wp_customize->add_setting( 'motivational_speaker_section_slide_heading', array(
     933            'default'           => '',
     934            'transport'         => 'refresh',
     935            'sanitize_callback' => 'sanitize_text_field',
     936    ) );
     937    $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_slide_heading', array(
     938        'label'       => esc_html__( 'Slider Settings', 'motivational-speaker' ),
     939        'description' => __( 'Slider Image Dimension ( 600px x 700px )', 'motivational-speaker' ),     
    611940        'section'     => 'motivational_speaker_slider_section',
    612         'type'        => 'toggle',
    613         'settings'    => 'motivational_speaker_slider_arrows',
     941        'settings'    => 'motivational_speaker_section_slide_heading',
    614942    ) ) );
     943
     944    $wp_customize->add_setting(
     945        'motivational_speaker_slider_arrows',
     946        array(
     947            'type'                 => 'option',
     948            'capability'           => 'edit_theme_options',
     949            'theme_supports'       => '',
     950            'default'              => '',
     951            'transport'            => 'refresh',
     952            'sanitize_callback'    => 'motivational_speaker_callback_sanitize_switch',
     953        )
     954    );
     955    $wp_customize->add_control(
     956        new Motivational_Speaker_Customizer_Customcontrol_Switch(
     957            $wp_customize,
     958            'motivational_speaker_slider_arrows',
     959            array(
     960                'settings'        => 'motivational_speaker_slider_arrows',
     961                'section'         => 'motivational_speaker_slider_section',
     962                'label'           => __( 'Check To Show Slider', 'motivational-speaker' ),             
     963                'choices'         => array(
     964                    '1'      => __( 'On', 'motivational-speaker' ),
     965                    'off'    => __( 'Off', 'motivational-speaker' ),
     966                ),
     967                'active_callback' => '',
     968            )
     969        )
     970    );
    615971
    616972    $args = array('numberposts' => -1);
     
    6951051        'priority' => 6
    6961052    ) );
     1053
     1054    $wp_customize->add_setting( 'motivational_speaker_section_footer_heading', array(
     1055            'default'           => '',
     1056            'transport'         => 'refresh',
     1057            'sanitize_callback' => 'sanitize_text_field',
     1058        ) );
     1059        $wp_customize->add_control( new Motivational_Speaker_Customizer_Customcontrol_Section_Heading( $wp_customize, 'motivational_speaker_section_footer_heading', array(
     1060            'label'       => esc_html__( 'Footer Settings', 'motivational-speaker' ),       
     1061            'section'     => 'motivational_speaker_footer_copyright',
     1062            'settings'    => 'motivational_speaker_section_footer_heading',
     1063        ) ) );
     1064
    6971065
    6981066    $wp_customize->add_setting('motivational_speaker_footer_text',array(
  • motivational-speaker/2.2/inc/extra_customization.php

    r190420 r192632  
    3131        $motivational_speaker_custom_style .='}';
    3232    }
     33// ==========sticky header============
     34   
     35    $motivational_speaker_custom_style= "";
    3336
    34     /*----------------------------------------------*/
    35 
    36     $motivational_speaker_sticky_header = get_theme_mod('motivational_speaker_sticky_header');
    37 
    38     if($motivational_speaker_sticky_header != true){
     37    if( get_option( 'motivational_speaker_sticky_header',true) != 'on') {
    3938
    4039        $motivational_speaker_custom_style .='.menu_header.fixed{';
    4140
    4241            $motivational_speaker_custom_style .='position: static;';
     42           
     43        $motivational_speaker_custom_style .='}';
     44    }
    4345
     46    if( get_option( 'motivational_speaker_sticky_header',true) != 'off') {
     47
     48        $motivational_speaker_custom_style .='.menu_header.fixed{';
     49
     50            $motivational_speaker_custom_style .='position: fixed;';
     51           
    4452        $motivational_speaker_custom_style .='}';
    4553    }
  • motivational-speaker/2.2/index.php

    r159615 r192632  
    1010
    1111<?php
    12     $post_sidebar = get_theme_mod( 'motivational_speaker_post_sidebar' );
    13     if ( 'false' == $post_sidebar ) {
     12    $motivational_speaker_post_sidebar = get_option( 'motivational_speaker_post_sidebar' );
     13    if ( '1' == $motivational_speaker_post_sidebar ) {
    1414    $column = 'col-lg-12 col-md-12';
    1515    } else {
     
    7070                        </section>
    7171                    </div>
    72                     <?php if ( 'false' != $post_sidebar ) {?>
     72                    <?php if ( '1' != $motivational_speaker_post_sidebar ) {?>
    7373                        <div id="sidebar" class="col-lg-4 col-md-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
    7474                    <?php } ?>
  • motivational-speaker/2.2/page-template/custom-home-page.php

    r190420 r192632  
    66
    77<main id="content">
    8   <?php if( get_theme_mod('motivational_speaker_slider_arrows') != ''){ ?>
     8  <?php if( get_option('motivational_speaker_slider_arrows') == '1'){ ?>
    99    <section id="slider">
    1010      <span class="design-right"></span>
  • motivational-speaker/2.2/readme.txt

    r190420 r192632  
    44Requires at least: 5.0
    55Requires PHP: 7.2
    6 Tested up to: 6.1
    7 Stable tag: 2.1
     6Tested up to: 6.2
     7Stable tag: 2.2
    88License: GNU General Public License v3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    6565    -- Footer link error resolved.
    6666
     67= 2.2 =
     68    -- Customizer headings Added.
     69    -- Toggle Css Updated.
     70
    6771== Resources ==
    6872
  • motivational-speaker/2.2/search.php

    r159615 r192632  
    1010
    1111<?php
    12     $post_sidebar = get_theme_mod( 'motivational_speaker_post_sidebar' );
    13     if ( 'false' == $post_sidebar ) {
     12    $motivational_speaker_post_sidebar = get_option( 'motivational_speaker_post_sidebar' );
     13    if ( '1' == $motivational_speaker_post_sidebar ) {
    1414    $column = 'col-lg-12 col-md-12';
    1515    } else {
     
    7272                        </section>
    7373                    </div>
    74                     <?php if ( 'false' != $post_sidebar ) {?>
     74                    <?php if ( '1' != $motivational_speaker_post_sidebar ) {?>
    7575                        <div id="sidebar" class="col-lg-4 col-md-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
    7676                    <?php } ?>
  • motivational-speaker/2.2/single.php

    r159615 r192632  
    1010
    1111<?php
    12     $post_sidebar = get_theme_mod( 'motivational_speaker_single_post_sidebar' );
    13     if ( 'false' == $post_sidebar ) {
     12    $motivational_speaker_post_sidebar = get_option( 'motivational_speaker_single_post_sidebar' );
     13    if ( '1' == $motivational_speaker_post_sidebar ) {
    1414    $column = 'col-lg-12 col-md-12';
    1515    } else {
     
    4545                        </section>
    4646                    </div>
    47                     <?php if ( 'false' != $post_sidebar ) {?>
     47                    <?php if ( '1' != $motivational_speaker_post_sidebar ) {?>
    4848                        <div id="sidebar" class="col-lg-4 col-md-4"><?php dynamic_sidebar('sidebar-1'); ?></div>
    4949                    <?php } ?>
  • motivational-speaker/2.2/style.css

    r190420 r192632  
    55Author URI: https://www.ovationthemes.com/
    66Description: Motivational Speaker is a multipurpose WordPress theme suitable to create a fabulous website for health coach, fitness, life coach, pep talks, mentor, dietitian, wellness, yoga, business coach or consulting, therapist, psychologist, personal development, motivational speaker, political party or event, and such related websites. The theme is based on the powerful bootstrap framework which makes it highly functional and easy to operate. Using various layouts and widgets you can show your missions, priorities, skills and achievements. Also, you can showcase your services and portfolio in a professional manner. The translation option allows translating the theme into any language with ease. With our theme, you may use Instagram and Events Calendar on your website (e.g to inform readers and your clients about your master classes and seminars). It is SEO-friendly as well as has a responsive layout. It is optimized for speed and the codes used are clean and secure. It comes with complete documentation.
    7 Version: 2.1
     7Version: 2.2
    88Requires at least: 5.0
    9 Tested up to: 6.1
     9Tested up to: 6.2
    1010Requires PHP: 7.2
    1111License: GNU General Public License v3 or later
  • motivational-speaker/2.2/template-parts/post/content.php

    r159615 r192632  
    2020            <div class="overlay pt-2 text-center">
    2121                <div class="date-box mb-2">
    22                     <?php if( get_theme_mod('motivational_speaker_date',true) != ''){ ?>
     22                    <?php if( get_option('motivational_speaker_date',false) != 'off'){ ?>
    2323                        <span class="mr-2"><i class="far fa-calendar-alt mr-2"></i><?php the_time( get_option( 'date_format' ) ); ?></span>
    2424                    <?php } ?>
    25                     <?php if( get_theme_mod('motivational_speaker_admin',true) != ''){ ?>
     25                    <?php if( get_option('motivational_speaker_admin',false) != 'off'){ ?>
    2626                        <span class="entry-author mr-2"><i class="far fa-user mr-2"></i><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' )) ); ?>"><?php the_author(); ?></a></span>
    2727                    <?php }?>
    28                     <?php if( get_theme_mod('motivational_speaker_comment',true) != ''){ ?>
     28                    <?php if( get_option('motivational_speaker_comment',false) != 'off'){ ?>
    2929                        <span class="entry-comments"><i class="fas fa-comments mr-2"></i> <?php comments_number( __('0 Comments','motivational-speaker'), __('0 Comments','motivational-speaker'), __('% Comments','motivational-speaker')); ?></span>
    3030                    <?php }?>
  • motivational-speaker/2.2/template-parts/post/grid-content.php

    r159615 r192632  
    3333                <div class="overlay pt-2 text-center">
    3434                    <div class="date-box mb-2">
    35                         <?php if( get_theme_mod('motivational_speaker_date',true) != ''){ ?>
     35                        <?php if( get_option('motivational_speaker_date',false) != 'off'){ ?>
    3636                            <span class="mr-2"><i class="far fa-calendar-alt mr-2"></i><?php the_time( get_option( 'date_format' ) ); ?></span>
    3737                        <?php } ?>
    38                         <?php if( get_theme_mod('motivational_speaker_admin',true) != ''){ ?>
     38                        <?php if( get_option('motivational_speaker_admin',false) != 'off'){ ?>
    3939                            <span class="entry-author mr-2"><i class="far fa-user mr-2"></i><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' )) ); ?>"><?php the_author(); ?></a></span>
    4040                        <?php }?>
    41                         <?php if( get_theme_mod('motivational_speaker_comment',true) != ''){ ?>
     41                        <?php if( get_option('motivational_speaker_comment',false) != 'off'){ ?>
    4242                            <span class="entry-comments"><i class="fas fa-comments mr-2"></i> <?php comments_number( __('0 Comments','motivational-speaker'), __('0 Comments','motivational-speaker'), __('% Comments','motivational-speaker')); ?></span>
    4343                        <?php }?>
  • motivational-speaker/2.2/template-parts/post/single-page.php

    r159615 r192632  
    1515                <?php the_post_thumbnail(); ?>
    1616                <div class="date-box my-3">
    17                     <?php if( get_theme_mod('motivational_speaker_date',true) != ''){ ?>
     17                    <?php if( get_option('motivational_speaker_date',false) != 'off'){ ?>
    1818                        <span class="mr-2"><i class="far fa-calendar-alt mr-2"></i><?php the_time( get_option( 'date_format' ) ); ?></span>
    1919                    <?php } ?>
    20                     <?php if( get_theme_mod('motivational_speaker_admin',true) != ''){ ?>
     20                    <?php if( get_option('motivational_speaker_admin',false) != 'off'){ ?>
    2121                        <span class="entry-author mr-2"><i class="far fa-user mr-2"></i><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' )) ); ?>"><?php the_author(); ?></a></span>
    2222                    <?php }?>
    23                     <?php if( get_theme_mod('motivational_speaker_comment',true) != ''){ ?>
     23                    <?php if( get_option('motivational_speaker_comment',false) != 'off'){ ?>
    2424                        <span class="entry-comments"><i class="fas fa-comments mr-2"></i> <?php comments_number( __('0 Comments','motivational-speaker'), __('0 Comments','motivational-speaker'), __('% Comments','motivational-speaker')); ?></span>
    2525                    <?php }?>
  • motivational-speaker/2.2/woocommerce/archive-product.php

    r169060 r192632  
    2121
    2222<?php
    23  $motivational_speaker_shop_page_sidebar = get_theme_mod( 'motivational_speaker_shop_page_sidebar',true );
    24  if ( false == $motivational_speaker_shop_page_sidebar ) {
     23    $motivational_speaker_shop_page_sidebar = get_option( 'motivational_speaker_shop_page_sidebar',true );
     24 if ( 'off' == $motivational_speaker_shop_page_sidebar ) {
    2525   $colmd = 'col-lg-12 col-md-12';
    2626 } else {
     
    111111                do_action( 'woocommerce_after_main_content' );?>
    112112            </div>
    113             <?php if ( false != $motivational_speaker_shop_page_sidebar ) {?>
     113            <?php if ( 'off' != $motivational_speaker_shop_page_sidebar ) {?>
    114114            <div class="col-lg-4 col-md-4">
    115115                <?php
  • motivational-speaker/2.2/woocommerce/single-product.php

    r169060 r192632  
    2424
    2525<?php
    26  $motivational_speaker_wocommerce_single_page_sidebar = get_theme_mod( 'motivational_speaker_wocommerce_single_page_sidebar',true );
    27  if ( false == $motivational_speaker_wocommerce_single_page_sidebar ) {
     26    $motivational_speaker_wocommerce_single_page_sidebar = get_option( 'motivational_speaker_wocommerce_single_page_sidebar',true );
     27 if ( 'off' == $motivational_speaker_wocommerce_single_page_sidebar ) {
    2828   $colmd = 'col-lg-12 col-md-12';
    2929 } else {
     
    6161                ?>
    6262            </div>
    63             <?php if ( false != $motivational_speaker_wocommerce_single_page_sidebar ) {?>
     63            <?php if ( 'off' != $motivational_speaker_wocommerce_single_page_sidebar ) {?>
    6464            <div class="col-lg-4 col-md-4">
    6565                <?php
Note: See TracChangeset for help on using the changeset viewer.