Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/clone/wp-conte.../themes/Divi/includes/builder/plugin-c...
File: divi-module-code-snippet.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit; // Exit if accessed directly
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Plugin compatibility for Divi Code Snippet Module
[7] Fix | Delete
*
[8] Fix | Delete
* @since 3.17.3
[9] Fix | Delete
*/
[10] Fix | Delete
class ET_Builder_Plugin_Compat_Divi_Code_Snippet_Module extends ET_Builder_Plugin_Compat_Base {
[11] Fix | Delete
[12] Fix | Delete
protected $posts = '';
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* Constructor
[16] Fix | Delete
*/
[17] Fix | Delete
public function __construct() {
[18] Fix | Delete
$this->plugin_id = 'divi-module-code-snippet/divi-module-code-snippet.php';
[19] Fix | Delete
$this->init_hooks();
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Hook methods to WordPress
[24] Fix | Delete
*
[25] Fix | Delete
* @return void
[26] Fix | Delete
*/
[27] Fix | Delete
public function init_hooks() {
[28] Fix | Delete
// Bail if there's no version found
[29] Fix | Delete
if ( ! $this->get_plugin_version() ) {
[30] Fix | Delete
return;
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
if ( function_exists( 'load_DMB_Module_Code_Snippet' ) && function_exists( 'load_db_cs_ET_Builder_Module' ) ) {
[34] Fix | Delete
remove_action( 'wp_loaded', 'load_db_cs_ET_Builder_Module' );
[35] Fix | Delete
remove_action( 'wp_loaded', 'load_DMB_Module_Code_Snippet' );
[36] Fix | Delete
[37] Fix | Delete
add_action( 'et_builder_ready', array( $this, 'et_builder_ready' ) );
[38] Fix | Delete
add_filter( 'the_posts', array( $this, 'the_posts' ) );
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* Saves filter value for later use.
[44] Fix | Delete
*
[45] Fix | Delete
* @return array
[46] Fix | Delete
*/
[47] Fix | Delete
public function the_posts( $posts ) {
[48] Fix | Delete
$this->posts = $posts;
[49] Fix | Delete
return $posts;
[50] Fix | Delete
}
[51] Fix | Delete
[52] Fix | Delete
/**
[53] Fix | Delete
* Runs when the builder is ready.
[54] Fix | Delete
*
[55] Fix | Delete
* @return void
[56] Fix | Delete
*/
[57] Fix | Delete
public function et_builder_ready() {
[58] Fix | Delete
load_db_cs_ET_Builder_Module();
[59] Fix | Delete
load_DMB_Module_Code_Snippet();
[60] Fix | Delete
[61] Fix | Delete
$instance = et_()->array_get( ET_Builder_Module::get_modules(), 'et_pb_dmb_code_snippet', false );
[62] Fix | Delete
[63] Fix | Delete
if ( $instance ) {
[64] Fix | Delete
$instance->module_used_in_post( $this->posts );
[65] Fix | Delete
}
[66] Fix | Delete
}
[67] Fix | Delete
}
[68] Fix | Delete
[69] Fix | Delete
new ET_Builder_Plugin_Compat_Divi_Code_Snippet_Module();
[70] Fix | Delete
[71] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function