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: photo-gallery.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 Photo Gallery
[7] Fix | Delete
*
[8] Fix | Delete
* @since 3.21.3
[9] Fix | Delete
*/
[10] Fix | Delete
class ET_Builder_Plugin_Compat_PhotoGallery extends ET_Builder_Plugin_Compat_Base {
[11] Fix | Delete
/**
[12] Fix | Delete
* Constructor
[13] Fix | Delete
*/
[14] Fix | Delete
public function __construct() {
[15] Fix | Delete
$this->plugin_id = 'photo-gallery/photo-gallery.php';
[16] Fix | Delete
$this->init_hooks();
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
/**
[20] Fix | Delete
* Hook methods to WordPress
[21] Fix | Delete
*
[22] Fix | Delete
* @return void
[23] Fix | Delete
*/
[24] Fix | Delete
public function init_hooks() {
[25] Fix | Delete
if ( ! method_exists( 'BWG', 'instance' ) ) {
[26] Fix | Delete
return;
[27] Fix | Delete
}
[28] Fix | Delete
[29] Fix | Delete
$enabled = array(
[30] Fix | Delete
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
[31] Fix | Delete
'vb' => et_()->array_get( $_GET, 'et_fb' ),
[32] Fix | Delete
'bfb' => et_()->array_get( $_GET, 'et_bfb' ),
[33] Fix | Delete
// phpcs:enable
[34] Fix | Delete
);
[35] Fix | Delete
[36] Fix | Delete
// I know what you're thinking .... can't check for 'edit_post' because too early
[37] Fix | Delete
// and don't have a post ID yet but will do inside the filter.
[38] Fix | Delete
if ( $enabled['vb'] && ! $enabled['bfb'] && current_user_can( 'edit_posts' ) ) {
[39] Fix | Delete
add_action( 'wp', array( $this, 'wp' ) );
[40] Fix | Delete
}
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
/**
[44] Fix | Delete
* Disable plugin's TinyMCE custom button because it doesn't work in VB
[45] Fix | Delete
*
[46] Fix | Delete
* @access public.
[47] Fix | Delete
* @return void
[48] Fix | Delete
*/
[49] Fix | Delete
public function wp() {
[50] Fix | Delete
global $post;
[51] Fix | Delete
if ( $post && current_user_can( 'edit_post', $post->ID ) ) {
[52] Fix | Delete
remove_filter( 'media_buttons_context', array( BWG::instance(), 'media_button' ) );
[53] Fix | Delete
}
[54] Fix | Delete
}
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
new ET_Builder_Plugin_Compat_PhotoGallery();
[58] Fix | Delete
[59] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function