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: wordpress-seo.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
exit; // Exit if accessed directly
[2] Fix | Delete
}
[3] Fix | Delete
[4] Fix | Delete
/**
[5] Fix | Delete
* Plugin compatibility for Yoast SEO
[6] Fix | Delete
*
[7] Fix | Delete
* @since 3.0.76 (builder version)
[8] Fix | Delete
* @link https://wordpress.org/plugins/wordpress-seo/
[9] Fix | Delete
*/
[10] Fix | Delete
class ET_Builder_Plugin_Compat_WordPress_SEO 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 = 'wordpress-seo/wp-seo.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
* Latest plugin version: 3.1.1
[22] Fix | Delete
* @return void
[23] Fix | Delete
*/
[24] Fix | Delete
public function init_hooks() {
[25] Fix | Delete
// Bail if there's no version found
[26] Fix | Delete
if ( ! $this->get_plugin_version() ) {
[27] Fix | Delete
return;
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
// Enable Sitemap Cache
[31] Fix | Delete
add_filter( 'wpseo_enable_xml_sitemap_transient_caching', '__return_true' );
[32] Fix | Delete
add_filter( 'pre_get_posts', array( $this, 'maybe_load_builder_modules_early' ), 0 );
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
/**
[36] Fix | Delete
* Checks to see if the current request is for a sitemap and if so, loads the builder's
[37] Fix | Delete
* modules so that they are loaded before Yoast generates the sitemap.
[38] Fix | Delete
* {@see 'pre_get_posts' (0) Must run before Yoast's callback which has priority of 1.}
[39] Fix | Delete
*
[40] Fix | Delete
* @param WP_Query $query
[41] Fix | Delete
*/
[42] Fix | Delete
public function maybe_load_builder_modules_early( $query ) {
[43] Fix | Delete
if ( ! $query->is_main_query() ) {
[44] Fix | Delete
return;
[45] Fix | Delete
}
[46] Fix | Delete
[47] Fix | Delete
if ( ! get_query_var( 'xsl' ) && ! get_query_var( 'sitemap' ) ) {
[48] Fix | Delete
return;
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
remove_action( 'wp', 'et_builder_init_global_settings', 9 );
[52] Fix | Delete
remove_action( 'wp', 'et_builder_add_main_elements' );
[53] Fix | Delete
[54] Fix | Delete
add_filter( 'wpseo_sitemap_content_before_parse_html_images', array( $this, 'do_shortcode' ) );
[55] Fix | Delete
}
[56] Fix | Delete
[57] Fix | Delete
public function do_shortcode( $content ) {
[58] Fix | Delete
// Check if content includes ET shortcode.
[59] Fix | Delete
if ( false === strpos( $content, '[et_pb_section' ) ) {
[60] Fix | Delete
// None found, bye.
[61] Fix | Delete
return $content;
[62] Fix | Delete
}
[63] Fix | Delete
[64] Fix | Delete
// Load modules (only once).
[65] Fix | Delete
if ( ! did_action( 'et_builder_ready' ) ) {
[66] Fix | Delete
et_builder_init_global_settings();
[67] Fix | Delete
et_builder_add_main_elements();
[68] Fix | Delete
}
[69] Fix | Delete
[70] Fix | Delete
// Render the shortcode.
[71] Fix | Delete
return apply_filters( 'the_content', $content );
[72] Fix | Delete
}
[73] Fix | Delete
}
[74] Fix | Delete
[75] Fix | Delete
new ET_Builder_Plugin_Compat_WordPress_SEO;
[76] Fix | Delete
[77] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function