Plugin Directory

Changeset 3144596


Ignore:
Timestamp:
08/31/2024 08:48:14 AM (17 months ago)
Author:
Md. Jahidul Islam
Message:

Release version 3.1.2

Location:
x-scroll-to-top-responsive
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • x-scroll-to-top-responsive/tags/3.1.2/Class/Assets.php

    r3115646 r3144596  
    6262        $xscroll_icon_hover_bg_color = Core::get_xstr_option('icon_hover_bg_color', '#000000');
    6363        $xscroll_icon_position = Core::get_xstr_option('icon_position', 98);
     64        $xscroll_icon_position_y = Core::get_xstr_option('icon_position_y', 4);
     65        $xscroll_size_mobile = Core::get_xstr_option('size_mobile', 30);
     66        $xscroll_icon_size_mobile = $xscroll_size_mobile/2;
    6467        $xscroll_icon_position_tablet_mobile = Core::get_xstr_option('icon_position_tablet_mobile', 96);
    65         $xscroll_icon_show_tablet_mobile = Core::get_xstr_option('icon_show_tablet_mobile', 1);
    66         $show_hide = $xscroll_icon_show_tablet_mobile == 1 ? 'block' : 'none';     
     68        $xscroll_icon_position_tablet_mobile_y = Core::get_xstr_option('icon_position_tablet_mobile_y', 4);
     69        $xscroll_icon_show_tablet_mobile = Core::get_xstr_option('icon_show_tablet_mobile', 0);
     70        $show_hide = $xscroll_icon_show_tablet_mobile == 1 ? 'block' : 'none';
     71
     72        error_log($xscroll_icon_show_tablet_mobile);
     73       
     74       
    6775
    6876       
     
    8795                left: {$xscroll_icon_position}%;
    8896            }
     97
     98            .scroll-to-top {
     99                bottom: {$xscroll_icon_position_y}%;
     100            }
    89101   
    90102            @media (max-width: 991px) {
     
    96108           
    97109            @media (max-width: 767px) {
     110                .scroll-to-top a{
     111
     112                    width: {$xscroll_size_mobile}px;
     113                    height: {$xscroll_size_mobile}px;
     114                    font-size: {$xscroll_icon_size_mobile}px;
     115                    margin-left: -{$xscroll_icon_size_mobile}px;
     116                }
    98117                .scroll-to-top {
    99118                    left: {$xscroll_icon_position_tablet_mobile}%;
     119                    bottom: {$xscroll_icon_position_tablet_mobile_y}%;
    100120                    display: {$show_hide} !important;
    101121
    102122                }
     123                   
    103124            }   
    104125        ";
  • x-scroll-to-top-responsive/tags/3.1.2/Class/Customizer.php

    r3115646 r3144596  
    127127        'transport' => 'postMessage'
    128128    ));
     129
    129130    $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_color]', array(
    130131        'label' => __('Icon color','x-scroll-to-top-responsive'),
     
    153154        'transport' => 'refresh'
    154155    ));
     156
    155157    $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_hover_color]', array(
    156158        'label' => __('Hover Icon color','x-scroll-to-top-responsive'),
     
    192194        ),
    193195    ));
     196
     197    $wp_customize->add_setting('xstr_option[icon_position_y]', array(
     198        'type'  => 'option',
     199        'default' => __('4', 'x-scroll-to-top-responsive'),
     200        'transport' => 'postMessage'
     201    ));
     202
     203    $wp_customize->add_control('xstr_option[icon_position_y]', array(
     204        'label' => __('Scroll Up Y Position','x-scroll-to-top-responsive'),
     205        'type' => 'range',
     206        'section' => 'xscroll_general_settings',
     207        'setting' => 'xstr_option[icon_position]',
     208        'input_attrs' => array(
     209            'min' => 1,
     210            'max' => 99,
     211            'step' => 1,
     212        ),
     213    ));
     214   
    194215
    195216    // Marketing Customization
     
    216237        'panel' => 'xscroll_customize_setting',
    217238    ));
     239
     240     // ================ Mobile cion size  ====================
     241     $wp_customize->add_setting('xstr_option[size_mobile]', array(
     242        'type'  => 'option',
     243        'default' => 30,
     244        'transport' => 'postMessage',
     245    ));
     246    $wp_customize->add_control('xstr_option[size_mobile]', array(
     247        'label' => __('Icon Size','x-scroll-to-top-responsive'),
     248        'type' => 'range',
     249        'section' => 'xscroll_responsive_settings',
     250        'setting' => 'xstr_option[size]',
     251        'input_attrs' => array(
     252            'min' => 20,
     253            'max' => 100,
     254            'step' => 1,
     255        ),
     256    ));
    218257   
    219258    // ================ Icon Position  In Tablet ====================
     
    221260        'type'  => 'option',
    222261        'default' => __('96', 'x-scroll-to-top-responsive'),
    223         'transport' => 'refresh'
     262        'transport' => 'postMessage'
    224263    ));
    225264
     
    235274        ),
    236275    ));
     276
     277    $wp_customize->add_setting('xstr_option[icon_position_tablet_mobile_y]', array(
     278        'type'  => 'option',
     279        'default' => __('4', 'x-scroll-to-top-responsive'),
     280        'transport' => 'postMessage'
     281    ));
     282
     283    $wp_customize->add_control('xstr_option[icon_position_tablet_mobile_y]', array(
     284        'label' => __('Position In Tablet and Mobile Y','x-scroll-to-top-responsive'),
     285        'type' => 'range',
     286        'section' => 'xscroll_responsive_settings',
     287        'setting' => 'xstr_option[icon_position_tablet_mobile_y]',
     288        'input_attrs' => array(
     289            'min' => 1,
     290            'max' => 99,
     291            'step' => 1,
     292        ),
     293    ));
    237294   
    238295    // ================ Show Hide Icon  Mobile and Tablet ====================
    239296    $wp_customize->add_setting('xstr_option[icon_show_tablet_mobile]', array(
    240297        'type'  => 'option',
    241         'default' => __(1, 'x-scroll-to-top-responsive'),
     298        'default' => 1,
    242299        'transport' => 'refresh'
    243300    ));
  • x-scroll-to-top-responsive/tags/3.1.2/assets/js/xscroll-customizer-live-preview.js

    r2238460 r3144596  
    8585    });
    8686
     87     /**
     88     * Icon position Y
     89     */
     90     wp.customize('xstr_option[icon_position_y]', function (value) {
     91        value.bind(function (newval) {
     92            $('.scroll-to-top').css('bottom', newval + '%');
     93        });
     94    });
     95
     96    /**
     97     * Incon size and postion in mobile & tablet X & Y
     98     *
     99     */
     100
     101    wp.customize('xstr_option[size_mobile]', function (value) {
     102        value.bind(function (newval) {
     103            $('.scroll-to-top a').css('width', newval);
     104        });
     105    });
     106
     107    wp.customize('xstr_option[size_mobile]', function (value) {
     108        value.bind(function (newval) {
     109            $('.scroll-to-top a').css('height', newval);
     110        });
     111    });
     112    wp.customize('xstr_option[size_mobile]', function (value) {
     113        value.bind(function (newval) {
     114            $('.scroll-to-top a').css('margin-left', -(newval/2));
     115        });
     116    });
     117    wp.customize('xstr_option[size_mobile]', function (value) {
     118        value.bind(function (newval) {
     119            $('.scroll-to-top a').css('font-size', newval/2);
     120        });
     121    });
     122
     123    wp.customize('xstr_option[icon_position_tablet_mobile]', function (value) {
     124        value.bind(function (newval) {
     125            $('.scroll-to-top').css('left', newval + '%');
     126        });
     127    });
     128    wp.customize('xstr_option[icon_position_tablet_mobile_y]', function (value) {
     129        value.bind(function (newval) {
     130            $('.scroll-to-top').css('bottom', newval + '%');
     131        });
     132    });
     133
     134   
     135
    87136   
    88137
  • x-scroll-to-top-responsive/tags/3.1.2/plugin-hook.php

    r3115673 r3144596  
    88Text Domain: x-scroll-to-top-responsive
    99Domain Path: /i18n/languages
    10 Version: 3.1.1
     10Version: 3.1.2
    1111*/
    1212
  • x-scroll-to-top-responsive/tags/3.1.2/readme.txt

    r3120179 r3144596  
    44Requires at least: 5
    55Tested up to: 6.6
    6 Stable tag: 3.1.1
     6Stable tag: 3.1.2
    77Requires PHP: 5.4
    88License: GPLv2 or later
     
    9292== Changelog ==
    9393
     94=3.1.2 - 31. Aug 2024=
     95
     96**Fix the responsive issue and ensure it can be disabled on mobile devices.
     97**Add an option to change the icon's location from the bottom to the top. You can now adjust its position both vertically and horizontally.
     98**Added new option to control icon size in the mobile version
     99
    94100=3.1.1 - 10. Jul 2024=
    95101
  • x-scroll-to-top-responsive/trunk/Class/Assets.php

    r3115646 r3144596  
    6262        $xscroll_icon_hover_bg_color = Core::get_xstr_option('icon_hover_bg_color', '#000000');
    6363        $xscroll_icon_position = Core::get_xstr_option('icon_position', 98);
     64        $xscroll_icon_position_y = Core::get_xstr_option('icon_position_y', 4);
     65        $xscroll_size_mobile = Core::get_xstr_option('size_mobile', 30);
     66        $xscroll_icon_size_mobile = $xscroll_size_mobile/2;
    6467        $xscroll_icon_position_tablet_mobile = Core::get_xstr_option('icon_position_tablet_mobile', 96);
    65         $xscroll_icon_show_tablet_mobile = Core::get_xstr_option('icon_show_tablet_mobile', 1);
    66         $show_hide = $xscroll_icon_show_tablet_mobile == 1 ? 'block' : 'none';     
     68        $xscroll_icon_position_tablet_mobile_y = Core::get_xstr_option('icon_position_tablet_mobile_y', 4);
     69        $xscroll_icon_show_tablet_mobile = Core::get_xstr_option('icon_show_tablet_mobile', 0);
     70        $show_hide = $xscroll_icon_show_tablet_mobile == 1 ? 'block' : 'none';
     71
     72        error_log($xscroll_icon_show_tablet_mobile);
     73       
     74       
    6775
    6876       
     
    8795                left: {$xscroll_icon_position}%;
    8896            }
     97
     98            .scroll-to-top {
     99                bottom: {$xscroll_icon_position_y}%;
     100            }
    89101   
    90102            @media (max-width: 991px) {
     
    96108           
    97109            @media (max-width: 767px) {
     110                .scroll-to-top a{
     111
     112                    width: {$xscroll_size_mobile}px;
     113                    height: {$xscroll_size_mobile}px;
     114                    font-size: {$xscroll_icon_size_mobile}px;
     115                    margin-left: -{$xscroll_icon_size_mobile}px;
     116                }
    98117                .scroll-to-top {
    99118                    left: {$xscroll_icon_position_tablet_mobile}%;
     119                    bottom: {$xscroll_icon_position_tablet_mobile_y}%;
    100120                    display: {$show_hide} !important;
    101121
    102122                }
     123                   
    103124            }   
    104125        ";
  • x-scroll-to-top-responsive/trunk/Class/Customizer.php

    r3115646 r3144596  
    127127        'transport' => 'postMessage'
    128128    ));
     129
    129130    $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_color]', array(
    130131        'label' => __('Icon color','x-scroll-to-top-responsive'),
     
    153154        'transport' => 'refresh'
    154155    ));
     156
    155157    $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_hover_color]', array(
    156158        'label' => __('Hover Icon color','x-scroll-to-top-responsive'),
     
    192194        ),
    193195    ));
     196
     197    $wp_customize->add_setting('xstr_option[icon_position_y]', array(
     198        'type'  => 'option',
     199        'default' => __('4', 'x-scroll-to-top-responsive'),
     200        'transport' => 'postMessage'
     201    ));
     202
     203    $wp_customize->add_control('xstr_option[icon_position_y]', array(
     204        'label' => __('Scroll Up Y Position','x-scroll-to-top-responsive'),
     205        'type' => 'range',
     206        'section' => 'xscroll_general_settings',
     207        'setting' => 'xstr_option[icon_position]',
     208        'input_attrs' => array(
     209            'min' => 1,
     210            'max' => 99,
     211            'step' => 1,
     212        ),
     213    ));
     214   
    194215
    195216    // Marketing Customization
     
    216237        'panel' => 'xscroll_customize_setting',
    217238    ));
     239
     240     // ================ Mobile cion size  ====================
     241     $wp_customize->add_setting('xstr_option[size_mobile]', array(
     242        'type'  => 'option',
     243        'default' => 30,
     244        'transport' => 'postMessage',
     245    ));
     246    $wp_customize->add_control('xstr_option[size_mobile]', array(
     247        'label' => __('Icon Size','x-scroll-to-top-responsive'),
     248        'type' => 'range',
     249        'section' => 'xscroll_responsive_settings',
     250        'setting' => 'xstr_option[size]',
     251        'input_attrs' => array(
     252            'min' => 20,
     253            'max' => 100,
     254            'step' => 1,
     255        ),
     256    ));
    218257   
    219258    // ================ Icon Position  In Tablet ====================
     
    221260        'type'  => 'option',
    222261        'default' => __('96', 'x-scroll-to-top-responsive'),
    223         'transport' => 'refresh'
     262        'transport' => 'postMessage'
    224263    ));
    225264
     
    235274        ),
    236275    ));
     276
     277    $wp_customize->add_setting('xstr_option[icon_position_tablet_mobile_y]', array(
     278        'type'  => 'option',
     279        'default' => __('4', 'x-scroll-to-top-responsive'),
     280        'transport' => 'postMessage'
     281    ));
     282
     283    $wp_customize->add_control('xstr_option[icon_position_tablet_mobile_y]', array(
     284        'label' => __('Position In Tablet and Mobile Y','x-scroll-to-top-responsive'),
     285        'type' => 'range',
     286        'section' => 'xscroll_responsive_settings',
     287        'setting' => 'xstr_option[icon_position_tablet_mobile_y]',
     288        'input_attrs' => array(
     289            'min' => 1,
     290            'max' => 99,
     291            'step' => 1,
     292        ),
     293    ));
    237294   
    238295    // ================ Show Hide Icon  Mobile and Tablet ====================
    239296    $wp_customize->add_setting('xstr_option[icon_show_tablet_mobile]', array(
    240297        'type'  => 'option',
    241         'default' => __(1, 'x-scroll-to-top-responsive'),
     298        'default' => 1,
    242299        'transport' => 'refresh'
    243300    ));
  • x-scroll-to-top-responsive/trunk/assets/js/xscroll-customizer-live-preview.js

    r2238460 r3144596  
    8585    });
    8686
     87     /**
     88     * Icon position Y
     89     */
     90     wp.customize('xstr_option[icon_position_y]', function (value) {
     91        value.bind(function (newval) {
     92            $('.scroll-to-top').css('bottom', newval + '%');
     93        });
     94    });
     95
     96    /**
     97     * Incon size and postion in mobile & tablet X & Y
     98     *
     99     */
     100
     101    wp.customize('xstr_option[size_mobile]', function (value) {
     102        value.bind(function (newval) {
     103            $('.scroll-to-top a').css('width', newval);
     104        });
     105    });
     106
     107    wp.customize('xstr_option[size_mobile]', function (value) {
     108        value.bind(function (newval) {
     109            $('.scroll-to-top a').css('height', newval);
     110        });
     111    });
     112    wp.customize('xstr_option[size_mobile]', function (value) {
     113        value.bind(function (newval) {
     114            $('.scroll-to-top a').css('margin-left', -(newval/2));
     115        });
     116    });
     117    wp.customize('xstr_option[size_mobile]', function (value) {
     118        value.bind(function (newval) {
     119            $('.scroll-to-top a').css('font-size', newval/2);
     120        });
     121    });
     122
     123    wp.customize('xstr_option[icon_position_tablet_mobile]', function (value) {
     124        value.bind(function (newval) {
     125            $('.scroll-to-top').css('left', newval + '%');
     126        });
     127    });
     128    wp.customize('xstr_option[icon_position_tablet_mobile_y]', function (value) {
     129        value.bind(function (newval) {
     130            $('.scroll-to-top').css('bottom', newval + '%');
     131        });
     132    });
     133
     134   
     135
    87136   
    88137
  • x-scroll-to-top-responsive/trunk/plugin-hook.php

    r3115673 r3144596  
    88Text Domain: x-scroll-to-top-responsive
    99Domain Path: /i18n/languages
    10 Version: 3.1.1
     10Version: 3.1.2
    1111*/
    1212
  • x-scroll-to-top-responsive/trunk/readme.txt

    r3120179 r3144596  
    44Requires at least: 5
    55Tested up to: 6.6
    6 Stable tag: 3.1.1
     6Stable tag: 3.1.2
    77Requires PHP: 5.4
    88License: GPLv2 or later
     
    9292== Changelog ==
    9393
     94=3.1.2 - 31. Aug 2024=
     95
     96**Fix the responsive issue and ensure it can be disabled on mobile devices.
     97**Add an option to change the icon's location from the bottom to the top. You can now adjust its position both vertically and horizontally.
     98**Added new option to control icon size in the mobile version
     99
    94100=3.1.1 - 10. Jul 2024=
    95101
Note: See TracChangeset for help on using the changeset viewer.