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

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* Compatibility for Popup Maker plugin.
*
* @since ??
* @since 4.13.0
*
* @link https://wordpress.org/plugins/popup-maker/
*/
@ -22,7 +22,7 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
/**
* Constructor.
*
* @since ??
* @since 4.13.0
*/
public function __construct() {
$this->plugin_id = 'popup-maker/popup-maker.php';
@ -32,7 +32,7 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
/**
* Hook methods to WordPress.
*
* @since ??
* @since 4.13.0
*
* @return void
*/
@ -52,12 +52,15 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
// Disable Cache in Feature Manager.
add_filter( 'et_builder_post_feature_cache_enabled', array( $this, 'et_builder_disable_dynamic_features' ), 10, 4 );
// Override Waypoint context.
add_filter( 'et_builder_waypoints_options', array( $this, 'maybe_override_waypoints_options' ) );
}
/**
* Return false if Popup Maker is active to disable dynamic assets feature.
*
* @since ??
* @since 4.13.0
*
* @param bool $current_state Current state of the feature.
*
@ -76,7 +79,7 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
* Update Divi Builder selector for Popup Maker plugin.
* The purpose of this update is to make sure custom module styles applied to the content inside Popup Maker which placed outside the main page content and `#page-container` container
*
* @since ??
* @since 4.13.0
*
* @param string $selector Selector to modify.
*
@ -102,7 +105,7 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
* Update Divi Builder selector for Popup Maker plugin.
* The purpose of this update is to make sure custom module styles applied to the content inside Popup Maker which placed outside the main page content and `#et-boc` container
*
* @since ??
* @since 4.13.0
*
* @param string $selector Selector to modify.
*
@ -129,7 +132,7 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
* The purpose of this update is to make sure Divi main style is loaded along with the CPT style
* Otherwise Content inside Popup Maker plugin loses styles because it's placed outside the main page content and `#et-boc` container
*
* @since ??
* @since 4.13.0
*
* @param string $handle Handle to modify.
*
@ -144,6 +147,29 @@ class ET_Builder_Plugin_Compat_Popup_Maker extends ET_Builder_Plugin_Compat_Base
// Add suffix to make sure not prefixed divi-style won't be dequeued.
return $handle . '-pum';
}
/**
* Override Waypoints context for modules inside Popup Maker overlay.
*
* @since 4.15.0
*
* @param array $options Waypoints options.
*
* @return array Filtered Waypoints options.
*/
public function maybe_override_waypoints_options( $options ) {
// Check whether `context` property exists or not.
if ( ! isset( $options['context'] ) ) {
$options['context'] = array();
}
// Make sure the existing `context` is already on array format. Then add Popup Maker
// overlay selector to the list.
$options['context'] = (array) $options['context'];
$options['context'][] = '.pum-overlay';
return $options;
}
}
new ET_Builder_Plugin_Compat_Popup_Maker();