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.../public_h.../wp-conte.../plugins/themify-.../includes/plugin-c...
File: rankmath.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Builder Plugin Compatibility Code
[2] Fix | Delete
*
[3] Fix | Delete
* @package Themify_Builder
[4] Fix | Delete
* @subpackage Themify_Builder/classes
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
class Themify_Builder_Plugin_Compat_RankMath {
[8] Fix | Delete
[9] Fix | Delete
static function init() {
[10] Fix | Delete
if(is_admin()){
[11] Fix | Delete
add_filter( 'rank_math/video/content', [ __CLASS__, 'scan_builder_content' ], 10, 2 );
[12] Fix | Delete
add_filter( 'rank_math/links/content', [ __CLASS__, 'scan_builder_content' ], 10, 2 );
[13] Fix | Delete
add_filter( 'rank_math/metabox/values', [ __CLASS__, 'has_toc_filter' ] );
[14] Fix | Delete
}
[15] Fix | Delete
add_filter( 'rank_math/sitemap/content_before_parse_html_images', array( __CLASS__, 'sitemap' ), 10, 2 );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Themify Builder has built-in Table of Content support, let RankMath know
[20] Fix | Delete
*/
[21] Fix | Delete
public static function has_toc_filter(array $values ):array {
[22] Fix | Delete
$values['assessor']['hasTOCPlugin'] = true;
[23] Fix | Delete
[24] Fix | Delete
return $values;
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Fix the image counter in Rank Math site map.
[29] Fix | Delete
*
[30] Fix | Delete
* Append a plain text version of Builder output, before Rank Math
[31] Fix | Delete
* searches for images in the post content.
[32] Fix | Delete
*/
[33] Fix | Delete
public static function sitemap(string $content,int $post_id ):string {
[34] Fix | Delete
$builder_data = ThemifyBuilder_Data_Manager::get_data( $post_id );
[35] Fix | Delete
$plain_text = ThemifyBuilder_Data_Manager::_get_all_builder_text_content( $builder_data );
[36] Fix | Delete
$plain_text = do_shortcode( $plain_text ); // render shortcodes that might be in the Themify_Builder_Component_Module::get_plain_text()
[37] Fix | Delete
[38] Fix | Delete
return $content . $plain_text;
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Enable RankMath to scan Builder's contents
[43] Fix | Delete
*/
[44] Fix | Delete
public static function scan_builder_content(string $content, int $object_id ):string {
[45] Fix | Delete
return $content . ' ' . Themify_Builder::render( $object_id );
[46] Fix | Delete
}
[47] Fix | Delete
}
[48] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function