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: megamenu.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 Max Mega Menu
[7] Fix | Delete
*
[8] Fix | Delete
* @since 4.4.5
[9] Fix | Delete
*
[10] Fix | Delete
* @link https://wordpress.org/plugins/megamenu/
[11] Fix | Delete
*/
[12] Fix | Delete
class ET_Builder_Plugin_Compat_Megamenu extends ET_Builder_Plugin_Compat_Base {
[13] Fix | Delete
/**
[14] Fix | Delete
* Constructor
[15] Fix | Delete
*/
[16] Fix | Delete
public function __construct() {
[17] Fix | Delete
$this->plugin_id = 'megamenu/megamenu.php';
[18] Fix | Delete
$this->init_hooks();
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Hook methods to WordPress
[23] Fix | Delete
*
[24] Fix | Delete
* @return void
[25] Fix | Delete
*/
[26] Fix | Delete
public function init_hooks() {
[27] Fix | Delete
// Bail if there's no version found
[28] Fix | Delete
if ( ! $this->get_plugin_version() ) {
[29] Fix | Delete
return;
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
add_filter( 'et_builder_get_widget_areas_list', array( $this, 'remove_sidebar' ) );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Remove Mega Menu sidebar from Builders widget areas list.
[37] Fix | Delete
*
[38] Fix | Delete
* @since 4.4.5
[39] Fix | Delete
*
[40] Fix | Delete
* @return void
[41] Fix | Delete
*/
[42] Fix | Delete
public function remove_sidebar( $list ) {
[43] Fix | Delete
// This plugin creates a custom sidebar for convenience: widgets added
[44] Fix | Delete
// to menus are also listed in Widgets WP Admin page and can be edited
[45] Fix | Delete
// there.
[46] Fix | Delete
[47] Fix | Delete
// Such area can't be used by the Sidebar Module because only added
[48] Fix | Delete
// when `is_admin() === true`, hence it would always show as empty when
[49] Fix | Delete
// rendered by the FE.
[50] Fix | Delete
[51] Fix | Delete
// Additionally, it causes Builder to reload when cache is deleted
[52] Fix | Delete
// ( eg due to enabling/disabling a plugin ).
[53] Fix | Delete
[54] Fix | Delete
// This is due to widget areas being included in static helpers and the
[55] Fix | Delete
// list being different when generated inline (when the page is
[56] Fix | Delete
// loading) or via the AJAX call: `is_admin` would be `false` in the
[57] Fix | Delete
// first case and `true` in the latter.
[58] Fix | Delete
unset( $list['mega-menu'] );
[59] Fix | Delete
return $list;
[60] Fix | Delete
}
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
new ET_Builder_Plugin_Compat_Megamenu();
[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