: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
* Plugin compatibility for Divi Code Snippet Module
class ET_Builder_Plugin_Compat_Divi_Code_Snippet_Module extends ET_Builder_Plugin_Compat_Base {
public function __construct() {
$this->plugin_id = 'divi-module-code-snippet/divi-module-code-snippet.php';
* Hook methods to WordPress
public function init_hooks() {
// Bail if there's no version found
if ( ! $this->get_plugin_version() ) {
if ( function_exists( 'load_DMB_Module_Code_Snippet' ) && function_exists( 'load_db_cs_ET_Builder_Module' ) ) {
remove_action( 'wp_loaded', 'load_db_cs_ET_Builder_Module' );
remove_action( 'wp_loaded', 'load_DMB_Module_Code_Snippet' );
add_action( 'et_builder_ready', array( $this, 'et_builder_ready' ) );
add_filter( 'the_posts', array( $this, 'the_posts' ) );
* Saves filter value for later use.
public function the_posts( $posts ) {
* Runs when the builder is ready.
public function et_builder_ready() {
load_db_cs_ET_Builder_Module();
load_DMB_Module_Code_Snippet();
$instance = et_()->array_get( ET_Builder_Module::get_modules(), 'et_pb_dmb_code_snippet', false );
$instance->module_used_in_post( $this->posts );
new ET_Builder_Plugin_Compat_Divi_Code_Snippet_Module();