@@ -74,10 +74,10 @@ public function __construct() {
74
74
75
75
add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_typography_sizes ' ), 30 , 2 );
76
76
add_action ( 'elementor/element/after_section_end ' , array ( $ this , 'register_styling_settings ' ), 20 , 2 );
77
+ add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_buttons ' ), 40 , 2 );
77
78
add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_tools ' ), 270 , 2 );
78
79
79
- // Legacy features ( Button Sizes, Outer Section Padding and Column Gaps ) - deprecated to be removed.
80
- add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_buttons ' ), 275 , 2 );
80
+ // Legacy features ( Outer Section Padding and Column Gaps ) - deprecated to be removed.
81
81
add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_outer_section_padding ' ), 280 , 2 );
82
82
add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_columns_gap ' ), 290 , 2 );
83
83
@@ -104,9 +104,7 @@ public function __construct() {
104
104
105
105
add_action ( 'elementor/element/heading/section_title/after_section_end ' , array ( $ this , 'add_typo_helper_link ' ), 999 , 2 );
106
106
107
- if ( Utils::is_elementor_pre ( '3.20.0 ' ) ) {
108
- add_action ( 'elementor/element/button/section_button/after_section_end ' , array ( $ this , 'add_btn_sizes_helper_link ' ), 999 , 2 );
109
- }
107
+ add_action ( 'elementor/element/button/section_button/after_section_end ' , array ( $ this , 'add_btn_sizes_helper_link ' ), 999 , 2 );
110
108
111
109
add_action ( 'elementor/element/kit/section_buttons/after_section_end ' , array ( $ this , 'register_shadows ' ), 47 , 2 );
112
110
@@ -822,8 +820,7 @@ public function register_buttons( Controls_Stack $element, $section_id ) {
822
820
'ang_buttons_description ' ,
823
821
array (
824
822
'raw ' => sprintf (
825
- '%1$s<br/>%2$s <a href="%3$s" target="_blank">%4$s</a> ' ,
826
- __ ( 'Heads-up! This is a legacy feature, no longer supported in Elementor. ' , 'ang ' ),
823
+ '%1$s <a href="%2$s" target="_blank">%3$s</a> ' ,
827
824
__ ( 'Define the default styles for every button size. ' , 'ang ' ),
828
825
'https://analogwp.com/docs/button-sizes/ ' ,
829
826
__ ( 'Learn more. ' , 'ang ' )
@@ -2413,6 +2410,17 @@ public function tweak_container_borders( Element_Base $element ) {
2413
2410
* @param Element_Base $element Element_Base Class.
2414
2411
*/
2415
2412
public function add_typo_helper_link ( Element_Base $ element ) {
2413
+ // Check and reset the condition to none at size control.
2414
+ $ size_control = $ element ->get_controls ( 'size ' );
2415
+ if ( $ size_control ) {
2416
+ $ element ->update_control (
2417
+ 'size ' ,
2418
+ [
2419
+ 'condition ' => [],
2420
+ ]
2421
+ );
2422
+ };
2423
+
2416
2424
$ element ->start_injection (
2417
2425
array (
2418
2426
'of ' => 'size ' ,
@@ -2442,6 +2450,17 @@ public function add_typo_helper_link( Element_Base $element ) {
2442
2450
* @param Element_Base $element Element_Base Class.
2443
2451
*/
2444
2452
public function add_btn_sizes_helper_link ( Element_Base $ element ) {
2453
+ // Check and reset the condition to none at size control.
2454
+ $ size_control = $ element ->get_controls ( 'size ' );
2455
+ if ( $ size_control ) {
2456
+ $ element ->update_control (
2457
+ 'size ' ,
2458
+ [
2459
+ 'condition ' => [],
2460
+ ]
2461
+ );
2462
+ };
2463
+
2445
2464
$ element ->start_injection (
2446
2465
array (
2447
2466
'of ' => 'size ' ,
0 commit comments