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/wp-conte.../plugins/wordpres.../admin
File: class-plugin-conflict.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* WPSEO plugin file.
[2] Fix | Delete
*
[3] Fix | Delete
* @package WPSEO\Admin
[4] Fix | Delete
* @since 1.7.0
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
use Yoast\WP\SEO\Config\Conflicting_Plugins;
[8] Fix | Delete
[9] Fix | Delete
/**
[10] Fix | Delete
* Contains list of conflicting plugins.
[11] Fix | Delete
*/
[12] Fix | Delete
class WPSEO_Plugin_Conflict extends Yoast_Plugin_Conflict {
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* The plugins must be grouped per section.
[16] Fix | Delete
*
[17] Fix | Delete
* It's possible to check for each section if there are conflicting plugin.
[18] Fix | Delete
*
[19] Fix | Delete
* NOTE: when changing this array, be sure to update the array in Conflicting_Plugins_Service too.
[20] Fix | Delete
*
[21] Fix | Delete
* @var array<string, array<string>>
[22] Fix | Delete
*/
[23] Fix | Delete
protected $plugins = [
[24] Fix | Delete
// The plugin which are writing OG metadata.
[25] Fix | Delete
'open_graph' => Conflicting_Plugins::OPEN_GRAPH_PLUGINS,
[26] Fix | Delete
'xml_sitemaps' => Conflicting_Plugins::XML_SITEMAPS_PLUGINS,
[27] Fix | Delete
'cloaking' => Conflicting_Plugins::CLOAKING_PLUGINS,
[28] Fix | Delete
'seo' => Conflicting_Plugins::SEO_PLUGINS,
[29] Fix | Delete
];
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Overrides instance to set with this class as class.
[33] Fix | Delete
*
[34] Fix | Delete
* @param string $class_name Optional class name.
[35] Fix | Delete
*
[36] Fix | Delete
* @return Yoast_Plugin_Conflict
[37] Fix | Delete
*/
[38] Fix | Delete
public static function get_instance( $class_name = self::class ) {
[39] Fix | Delete
return parent::get_instance( $class_name );
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
/**
[43] Fix | Delete
* After activating any plugin, this method will be executed by a hook.
[44] Fix | Delete
*
[45] Fix | Delete
* If the activated plugin is conflicting with ours a notice will be shown.
[46] Fix | Delete
*
[47] Fix | Delete
* @param string|bool $plugin Optional plugin basename to check.
[48] Fix | Delete
*
[49] Fix | Delete
* @return void
[50] Fix | Delete
*/
[51] Fix | Delete
public static function hook_check_for_plugin_conflicts( $plugin = false ) {
[52] Fix | Delete
// The instance of the plugin.
[53] Fix | Delete
$instance = self::get_instance();
[54] Fix | Delete
[55] Fix | Delete
// Only add the plugin as an active plugin if $plugin isn't false.
[56] Fix | Delete
if ( $plugin && is_string( $plugin ) ) {
[57] Fix | Delete
$instance->add_active_plugin( $instance->find_plugin_category( $plugin ), $plugin );
[58] Fix | Delete
}
[59] Fix | Delete
[60] Fix | Delete
$plugin_sections = [];
[61] Fix | Delete
[62] Fix | Delete
// Only check for open graph problems when they are enabled.
[63] Fix | Delete
if ( WPSEO_Options::get( 'opengraph' ) ) {
[64] Fix | Delete
/* translators: %1$s expands to Yoast SEO, %2$s: 'Facebook' plugin name of possibly conflicting plugin with regard to creating OpenGraph output. */
[65] Fix | Delete
$plugin_sections['open_graph'] = __( 'Both %1$s and %2$s create Open Graph output, which might make Facebook, X, LinkedIn and other social networks use the wrong texts and images when your pages are being shared.', 'wordpress-seo' )
[66] Fix | Delete
. '<br/><br/>'
[67] Fix | Delete
. '<a class="button" href="' . admin_url( 'admin.php?page=wpseo_page_settings#/site-features#card-wpseo_social-opengraph' ) . '">'
[68] Fix | Delete
/* translators: %1$s expands to Yoast SEO. */
[69] Fix | Delete
. sprintf( __( 'Configure %1$s\'s Open Graph settings', 'wordpress-seo' ), 'Yoast SEO' )
[70] Fix | Delete
. '</a>';
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
// Only check for XML conflicts if sitemaps are enabled.
[74] Fix | Delete
if ( WPSEO_Options::get( 'enable_xml_sitemap' ) ) {
[75] Fix | Delete
/* translators: %1$s expands to Yoast SEO, %2$s: 'Google XML Sitemaps' plugin name of possibly conflicting plugin with regard to the creation of sitemaps. */
[76] Fix | Delete
$plugin_sections['xml_sitemaps'] = __( 'Both %1$s and %2$s can create XML sitemaps. Having two XML sitemaps is not beneficial for search engines and might slow down your site.', 'wordpress-seo' )
[77] Fix | Delete
. '<br/><br/>'
[78] Fix | Delete
. '<a class="button" href="' . admin_url( 'admin.php?page=wpseo_page_settings#/site-features#card-wpseo-enable_xml_sitemap' ) . '">'
[79] Fix | Delete
/* translators: %1$s expands to Yoast SEO. */
[80] Fix | Delete
. sprintf( __( 'Toggle %1$s\'s XML Sitemap', 'wordpress-seo' ), 'Yoast SEO' )
[81] Fix | Delete
. '</a>';
[82] Fix | Delete
}
[83] Fix | Delete
[84] Fix | Delete
/* translators: %2$s expands to 'RS Head Cleaner' plugin name of possibly conflicting plugin with regard to differentiating output between search engines and normal users. */
[85] Fix | Delete
$plugin_sections['cloaking'] = __( 'The plugin %2$s changes your site\'s output and in doing that differentiates between search engines and normal users, a process that\'s called cloaking. We highly recommend that you disable it.', 'wordpress-seo' );
[86] Fix | Delete
[87] Fix | Delete
/* translators: %1$s expands to Yoast SEO, %2$s: 'SEO' plugin name of possibly conflicting plugin with regard to the creation of duplicate SEO meta. */
[88] Fix | Delete
$plugin_sections['seo'] = __( 'Both %1$s and %2$s manage the SEO of your site. Running two SEO plugins at the same time is detrimental.', 'wordpress-seo' );
[89] Fix | Delete
[90] Fix | Delete
$instance->check_plugin_conflicts( $plugin_sections );
[91] Fix | Delete
}
[92] Fix | Delete
}
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function