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: pilotpress.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 PilotPress Views
[7] Fix | Delete
*
[8] Fix | Delete
* @since 3.21.1
[9] Fix | Delete
*
[10] Fix | Delete
* @link https://wordpress.org/plugins/pilotpress/
[11] Fix | Delete
*/
[12] Fix | Delete
class ET_Builder_Plugin_Compat_PilotPress extends ET_Builder_Plugin_Compat_Base {
[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 = 'pilotpress/pilotpress.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
$enabled = array(
[34] Fix | Delete
// phpcs:disable WordPress.Security.NonceVerification.NoNonceVerification
[35] Fix | Delete
'vb' => et_()->array_get( $_GET, 'et_fb' ),
[36] Fix | Delete
'bfb' => et_()->array_get( $_GET, 'et_bfb' ),
[37] Fix | Delete
// phpcs:enable
[38] Fix | Delete
);
[39] Fix | Delete
[40] Fix | Delete
// I know what you're thinking .... can't check for 'edit_post' because too early
[41] Fix | Delete
// and don't have a post ID yet but will do inside the filter.
[42] Fix | Delete
if ( ( $enabled['vb'] || $enabled['bfb'] ) && current_user_can( 'edit_posts' ) ) {
[43] Fix | Delete
// Plugin's content filter breaks VB / BFB, disable it
[44] Fix | Delete
add_action( 'pilotpress_content_hiding', array( $this, 'pilotpress_content_hiding' ) );
[45] Fix | Delete
}
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Remove plugin's custom content filter.
[50] Fix | Delete
*
[51] Fix | Delete
* @return void
[52] Fix | Delete
*/
[53] Fix | Delete
public function pilotpress_content_hiding() {
[54] Fix | Delete
global $pilotpress, $post;
[55] Fix | Delete
[56] Fix | Delete
if ( $pilotpress && $post && current_user_can( 'edit_post', $post->ID ) ) {
[57] Fix | Delete
remove_filter( 'the_content', array( $pilotpress, 'content_process' ) );
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
new ET_Builder_Plugin_Compat_PilotPress();
[64] Fix | Delete
[65] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function