Upgarded to 4.17.4

This commit is contained in:
2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -288,15 +288,20 @@ class ET_Builder_Module_Helper_Sticky_Options {
*/
public function add_sticky_to_order_class( $selector, $is_sticky = true ) {
$selectors = explode( ',', $selector );
$selectors = array_map( 'trim', $selectors );
$selectors = array_map(
function( $selector ) use ( $is_sticky ) {
$selector = trim( $selector );
// If current selector is sticky module, sticky selector is directly attached; if it isn't
// it is safe to assume that the sticky selector is one of its parent DOM, hence the space.
if ( $is_sticky ) {
$selectors = preg_replace( '/(%%order_class%%)/i', '.et_pb_sticky$1', $selectors, 1 );
} else {
$selectors = preg_replace( '/(%%order_class%%)/i', '.et_pb_sticky $1', $selectors, 1 );
}
// If current selector is sticky module, sticky selector is directly attached; if it isn't
// it is safe to assume that the sticky selector is one of its parent DOM, hence the space.
if ( ! $is_sticky ) {
$selector = ' ' . $selector;
}
return '.et_pb_sticky' . $selector;
},
$selectors
);
return implode( ', ', $selectors );
}