Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPS-1056: Removed deprecated class .elementor-button-wrapper #1062

Open
wants to merge 10 commits into
base: release-candidate
Choose a base branch
from
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ To access the advanced features and premium widgets, you’ll need to upgrade to
- Fix: "Function map_meta_cap called incorrectly" notice appearing for logged out users when shortcode executed manually.
- Fix: Deprecated constant FILTER_SANITIZE_STRING replaced to ensure compatibility with PHP.
- Fix: Resolved PHP error with NPS library.
- Improvement: Removed 'elementor-button-wrapper' to enhance performance and optimize the DOM structure.

### 2.1.0 ###
- New: Added NPS Survey to gather your valuable feedback for Ultimate Addons for Elementor.
Expand Down
14 changes: 7 additions & 7 deletions inc/js/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
});

if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );
}

Expand Down Expand Up @@ -529,14 +529,14 @@

$( '.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );
}
}else{

$( '.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );
}
}
Expand All @@ -546,30 +546,30 @@

$( '.elementor-element-' + id + ' nav').addClass('hfe-dropdown');
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );
}
}else{

$( '.elementor-element-' + id + ' nav').removeClass('hfe-dropdown');
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );
}
}
}else {
var $parent_element = $( '.elementor-element-' + id );
$parent_element.find( 'nav').removeClass( 'hfe-dropdown' );
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$parent_element.find( 'li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'elementor-button-wrapper' );
$parent_element.find( 'li.menu-item:last-child a.hfe-menu-item' ).parent().addClass( 'hfe-button-wrapper' );
$parent_element.find( 'li.menu-item:last-child a.hfe-menu-item' ).addClass( 'elementor-button' );
}
}

var layout = $( '.elementor-element-' + id + ' .hfe-nav-menu' ).data( 'layout' );
if( 'expandible' == layout ){
if( ( 'cta' == last_item || 'cta' == last_item_flyout ) && 'expandible' != layout ){
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'elementor-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).parent().removeClass( 'hfe-button-wrapper' );
$( '.elementor-element-' + id + ' li.menu-item:last-child a.hfe-menu-item' ).removeClass( 'elementor-button' );
}
}
Expand Down
28 changes: 14 additions & 14 deletions inc/widgets-css/frontend.css
Original file line number Diff line number Diff line change
Expand Up @@ -138,20 +138,20 @@ div.hfe-nav-menu,
-moz-box-pack: end;
justify-content: flex-end; }

.hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-has-submenu .elementor-button-wrapper,
.rtl .hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-has-submenu .elementor-button-wrapper,
.hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.elementor-button-wrapper,
.rtl .hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.elementor-button-wrapper{
.hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-has-submenu .hfe-button-wrapper,
.rtl .hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-has-submenu .hfe-button-wrapper,
.hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-button-wrapper,
.rtl .hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-button-wrapper{
text-align: right;
}
.hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-has-submenu .elementor-button-wrapper,
.rtl .hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-has-submenu .elementor-button-wrapper,
.hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.elementor-button-wrapper,
.rtl .hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.elementor-button-wrapper{
.hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-has-submenu .hfe-button-wrapper,
.rtl .hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-has-submenu .hfe-button-wrapper,
.hfe-nav-menu__align-left .hfe-nav-menu__layout-vertical li.hfe-button-wrapper,
.rtl .hfe-nav-menu__align-right .hfe-nav-menu__layout-vertical li.hfe-button-wrapper{
text-align: left;
}
.hfe-nav-menu__align-center .hfe-nav-menu__layout-vertical li.hfe-has-submenu .elementor-button-wrapper,
.hfe-nav-menu__align-center .hfe-nav-menu__layout-vertical li.elementor-button-wrapper{
.hfe-nav-menu__align-center .hfe-nav-menu__layout-vertical li.hfe-has-submenu .hfe-button-wrapper,
.hfe-nav-menu__align-center .hfe-nav-menu__layout-vertical li.hfe-button-wrapper{
text-align: center;
}
.hfe-nav-menu__align-left .hfe-nav-menu {
Expand Down Expand Up @@ -1120,7 +1120,7 @@ div.hfe-nav-menu,
display: inline-flex;
}

.hfe-nav-menu li.elementor-button-wrapper {
.hfe-nav-menu li.hfe-button-wrapper {
align-self: center;
}

Expand Down Expand Up @@ -1313,7 +1313,7 @@ div.hfe-nav-menu,

.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li a.hfe-menu-item,
.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li a.hfe-sub-menu-item,
.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li.elementor-button-wrapper {
.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li.hfe-button-wrapper {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-moz-box-pack: justify;
Expand All @@ -1327,7 +1327,7 @@ div.hfe-nav-menu,

.hfe-nav-menu__breakpoint-mobile.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li a.hfe-menu-item,
.hfe-nav-menu__breakpoint-mobile.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li a.hfe-sub-menu-item
.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li.elementor-button-wrapper {
.hfe-nav-menu__breakpoint-tablet.hfe-nav-menu__align-justify .hfe-nav-menu__layout-horizontal .hfe-nav-menu li.hfe-button-wrapper {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-moz-box-pack: justify;
Expand Down Expand Up @@ -1761,7 +1761,7 @@ div.hfe-nav-menu,
order: 15;
}

.hfe-menu-cart__toggle.elementor-button-wrapper .elementor-button {
.hfe-menu-cart__toggle.hfe-button-wrapper .elementor-button {
color:#4d4848;
}

Expand Down
2 changes: 1 addition & 1 deletion inc/widgets-manager/widgets/cart/cart.php
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ protected function render() {
<?php
} else {
?>
<div class="hfe-menu-cart__toggle elementor-button-wrapper">
<div class="hfe-menu-cart__toggle">
<a id="hfe-menu-cart__toggle_button" href="<?php echo esc_url( wc_get_cart_url() ); ?>" class="elementor-button hfe-cart-container" aria-label="<?php esc_attr_e( 'Cart', 'header-footer-elementor' ); ?>">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add "hfe-button-wrapper" class here, it is not showing the cart button when we click on it and go to the cart page.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<?php if ( null !== WC()->cart ) { ?>
<span class="elementor-button-text hfe-subtotal">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ protected function register_general_content_controls() {
],
'selectors' => [
'{{WRAPPER}} li.menu-item a' => 'justify-content: {{VALUE}};',
'{{WRAPPER}} li .elementor-button-wrapper' => 'text-align: {{VALUE}};',
'{{WRAPPER}}.hfe-menu-item-flex-end li .elementor-button-wrapper' => 'text-align: right;',
'{{WRAPPER}} li.hfe-button-wrapper' => 'text-align: {{VALUE}};',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a space after li
li .elementor-button-wrapper
confirm if we are replacing .hfe-button-wrapper exactly with .elementor-button-wrapper then space should be addedhere too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are replacing it, checked here - https://prnt.sc/-_kSOsgmCQ8-
It doesn't affect either way, I will add space wrt older ref

'{{WRAPPER}}.hfe-menu-item-flex-end li.hfe-button-wrapper' => 'text-align: right;',
],
'prefix_class' => 'hfe-menu-item-',
'frontend_available' => true,
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ To access the advanced features and premium widgets, you’ll need to upgrade to
- Fix: "Function map_meta_cap called incorrectly" notice appearing for logged out users when shortcode executed manually.
- Fix: Deprecated constant FILTER_SANITIZE_STRING replaced to ensure compatibility with PHP.
- Fix: Resolved PHP error with NPS library.
- Improvement: Removed 'elementor-button-wrapper' to enhance performance and optimize the DOM structure.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement should be added at the top

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in new dev version


= 2.1.0 =
- New: Added NPS Survey to gather your valuable feedback for Ultimate Addons for Elementor.
Expand Down
Loading