: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! defined( 'ABSPATH' ) ) {
// Exit if accessed directly.
* Compatibility for Events Manager plugin.
* @link https://wordpress.org/plugins/events-manager/
class ET_Builder_Plugin_Compat_Events_Manager extends ET_Builder_Plugin_Compat_Base {
public function __construct() {
$this->plugin_id = 'events-manager/events-manager.php';
* Hook methods to WordPress.
public function init_hooks() {
// Bail if there's no version found.
if ( ! $this->get_plugin_version() ) {
add_filter( 'em_event_output_placeholder', array( $this, 'maybe_filter_content' ), 10, 4 );
add_filter( 'em_location_output_placeholder', array( $this, 'maybe_filter_content' ), 10, 4 );
* Pass the single event content through et_fb_app_boot() since Events Manager skips usual
* @param string $full_result
public function maybe_filter_content( $replace, $event, $full_result, $target ) {
$content_placeholders = array(
if ( ! function_exists( 'et_fb_app_boot' ) || ! in_array( $full_result, $content_placeholders ) ) {
return et_fb_app_boot( $replace );
new ET_Builder_Plugin_Compat_Events_Manager;