Changeset 3144596
- Timestamp:
- 08/31/2024 08:48:14 AM (17 months ago)
- Location:
- x-scroll-to-top-responsive
- Files:
-
- 10 edited
- 1 copied
-
tags/3.1.2 (copied) (copied from x-scroll-to-top-responsive/trunk)
-
tags/3.1.2/Class/Assets.php (modified) (3 diffs)
-
tags/3.1.2/Class/Customizer.php (modified) (6 diffs)
-
tags/3.1.2/assets/js/xscroll-customizer-live-preview.js (modified) (1 diff)
-
tags/3.1.2/plugin-hook.php (modified) (1 diff)
-
tags/3.1.2/readme.txt (modified) (2 diffs)
-
trunk/Class/Assets.php (modified) (3 diffs)
-
trunk/Class/Customizer.php (modified) (6 diffs)
-
trunk/assets/js/xscroll-customizer-live-preview.js (modified) (1 diff)
-
trunk/plugin-hook.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
x-scroll-to-top-responsive/tags/3.1.2/Class/Assets.php
r3115646 r3144596 62 62 $xscroll_icon_hover_bg_color = Core::get_xstr_option('icon_hover_bg_color', '#000000'); 63 63 $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; 64 67 $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 67 75 68 76 … … 87 95 left: {$xscroll_icon_position}%; 88 96 } 97 98 .scroll-to-top { 99 bottom: {$xscroll_icon_position_y}%; 100 } 89 101 90 102 @media (max-width: 991px) { … … 96 108 97 109 @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 } 98 117 .scroll-to-top { 99 118 left: {$xscroll_icon_position_tablet_mobile}%; 119 bottom: {$xscroll_icon_position_tablet_mobile_y}%; 100 120 display: {$show_hide} !important; 101 121 102 122 } 123 103 124 } 104 125 "; -
x-scroll-to-top-responsive/tags/3.1.2/Class/Customizer.php
r3115646 r3144596 127 127 'transport' => 'postMessage' 128 128 )); 129 129 130 $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_color]', array( 130 131 'label' => __('Icon color','x-scroll-to-top-responsive'), … … 153 154 'transport' => 'refresh' 154 155 )); 156 155 157 $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_hover_color]', array( 156 158 'label' => __('Hover Icon color','x-scroll-to-top-responsive'), … … 192 194 ), 193 195 )); 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 194 215 195 216 // Marketing Customization … … 216 237 'panel' => 'xscroll_customize_setting', 217 238 )); 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 )); 218 257 219 258 // ================ Icon Position In Tablet ==================== … … 221 260 'type' => 'option', 222 261 'default' => __('96', 'x-scroll-to-top-responsive'), 223 'transport' => ' refresh'262 'transport' => 'postMessage' 224 263 )); 225 264 … … 235 274 ), 236 275 )); 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 )); 237 294 238 295 // ================ Show Hide Icon Mobile and Tablet ==================== 239 296 $wp_customize->add_setting('xstr_option[icon_show_tablet_mobile]', array( 240 297 'type' => 'option', 241 'default' => __(1, 'x-scroll-to-top-responsive'),298 'default' => 1, 242 299 'transport' => 'refresh' 243 300 )); -
x-scroll-to-top-responsive/tags/3.1.2/assets/js/xscroll-customizer-live-preview.js
r2238460 r3144596 85 85 }); 86 86 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 87 136 88 137 -
x-scroll-to-top-responsive/tags/3.1.2/plugin-hook.php
r3115673 r3144596 8 8 Text Domain: x-scroll-to-top-responsive 9 9 Domain Path: /i18n/languages 10 Version: 3.1. 110 Version: 3.1.2 11 11 */ 12 12 -
x-scroll-to-top-responsive/tags/3.1.2/readme.txt
r3120179 r3144596 4 4 Requires at least: 5 5 5 Tested up to: 6.6 6 Stable tag: 3.1. 16 Stable tag: 3.1.2 7 7 Requires PHP: 5.4 8 8 License: GPLv2 or later … … 92 92 == Changelog == 93 93 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 94 100 =3.1.1 - 10. Jul 2024= 95 101 -
x-scroll-to-top-responsive/trunk/Class/Assets.php
r3115646 r3144596 62 62 $xscroll_icon_hover_bg_color = Core::get_xstr_option('icon_hover_bg_color', '#000000'); 63 63 $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; 64 67 $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 67 75 68 76 … … 87 95 left: {$xscroll_icon_position}%; 88 96 } 97 98 .scroll-to-top { 99 bottom: {$xscroll_icon_position_y}%; 100 } 89 101 90 102 @media (max-width: 991px) { … … 96 108 97 109 @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 } 98 117 .scroll-to-top { 99 118 left: {$xscroll_icon_position_tablet_mobile}%; 119 bottom: {$xscroll_icon_position_tablet_mobile_y}%; 100 120 display: {$show_hide} !important; 101 121 102 122 } 123 103 124 } 104 125 "; -
x-scroll-to-top-responsive/trunk/Class/Customizer.php
r3115646 r3144596 127 127 'transport' => 'postMessage' 128 128 )); 129 129 130 $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_color]', array( 130 131 'label' => __('Icon color','x-scroll-to-top-responsive'), … … 153 154 'transport' => 'refresh' 154 155 )); 156 155 157 $wp_customize->add_control(new \WP_Customize_Color_Control($wp_customize,'xstr_option[icon_hover_color]', array( 156 158 'label' => __('Hover Icon color','x-scroll-to-top-responsive'), … … 192 194 ), 193 195 )); 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 194 215 195 216 // Marketing Customization … … 216 237 'panel' => 'xscroll_customize_setting', 217 238 )); 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 )); 218 257 219 258 // ================ Icon Position In Tablet ==================== … … 221 260 'type' => 'option', 222 261 'default' => __('96', 'x-scroll-to-top-responsive'), 223 'transport' => ' refresh'262 'transport' => 'postMessage' 224 263 )); 225 264 … … 235 274 ), 236 275 )); 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 )); 237 294 238 295 // ================ Show Hide Icon Mobile and Tablet ==================== 239 296 $wp_customize->add_setting('xstr_option[icon_show_tablet_mobile]', array( 240 297 'type' => 'option', 241 'default' => __(1, 'x-scroll-to-top-responsive'),298 'default' => 1, 242 299 'transport' => 'refresh' 243 300 )); -
x-scroll-to-top-responsive/trunk/assets/js/xscroll-customizer-live-preview.js
r2238460 r3144596 85 85 }); 86 86 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 87 136 88 137 -
x-scroll-to-top-responsive/trunk/plugin-hook.php
r3115673 r3144596 8 8 Text Domain: x-scroll-to-top-responsive 9 9 Domain Path: /i18n/languages 10 Version: 3.1. 110 Version: 3.1.2 11 11 */ 12 12 -
x-scroll-to-top-responsive/trunk/readme.txt
r3120179 r3144596 4 4 Requires at least: 5 5 5 Tested up to: 6.6 6 Stable tag: 3.1. 16 Stable tag: 3.1.2 7 7 Requires PHP: 5.4 8 8 License: GPLv2 or later … … 92 92 == Changelog == 93 93 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 94 100 =3.1.1 - 10. Jul 2024= 95 101
Note: See TracChangeset
for help on using the changeset viewer.