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.../plugins/wordpres.../src/integrat.../admin
File: indexables-exclude-taxonomy-integration.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Integrations\Admin;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Conditionals\No_Conditionals;
[4] Fix | Delete
use Yoast\WP\SEO\Helpers\Options_Helper;
[5] Fix | Delete
use Yoast\WP\SEO\Integrations\Integration_Interface;
[6] Fix | Delete
[7] Fix | Delete
/**
[8] Fix | Delete
* Indexables_Exclude_Taxonomy_Integration class
[9] Fix | Delete
*/
[10] Fix | Delete
class Indexables_Exclude_Taxonomy_Integration implements Integration_Interface {
[11] Fix | Delete
[12] Fix | Delete
use No_Conditionals;
[13] Fix | Delete
[14] Fix | Delete
/**
[15] Fix | Delete
* The options helper.
[16] Fix | Delete
*
[17] Fix | Delete
* @var Options_Helper
[18] Fix | Delete
*/
[19] Fix | Delete
private $options_helper;
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Indexables_Exclude_Taxonomy_Integration constructor.
[23] Fix | Delete
*
[24] Fix | Delete
* @param Options_Helper $options_helper The options helper.
[25] Fix | Delete
*/
[26] Fix | Delete
public function __construct( Options_Helper $options_helper ) {
[27] Fix | Delete
$this->options_helper = $options_helper;
[28] Fix | Delete
}
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* {@inheritDoc}
[32] Fix | Delete
*/
[33] Fix | Delete
public function register_hooks() {
[34] Fix | Delete
\add_filter( 'wpseo_indexable_excluded_taxonomies', [ $this, 'exclude_taxonomies_for_indexation' ] );
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
/**
[38] Fix | Delete
* Exclude the taxonomy from the indexable table.
[39] Fix | Delete
*
[40] Fix | Delete
* @param array $excluded_taxonomies The excluded taxonomies.
[41] Fix | Delete
*
[42] Fix | Delete
* @return array The excluded taxonomies, including specific taxonomies.
[43] Fix | Delete
*/
[44] Fix | Delete
public function exclude_taxonomies_for_indexation( $excluded_taxonomies ) {
[45] Fix | Delete
$taxonomies_to_exclude = \array_merge( $excluded_taxonomies, [ 'wp_pattern_category' ] );
[46] Fix | Delete
[47] Fix | Delete
if ( $this->options_helper->get( 'disable-post_format', false ) ) {
[48] Fix | Delete
return \array_merge( $taxonomies_to_exclude, [ 'post_format' ] );
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
return $taxonomies_to_exclude;
[52] Fix | Delete
}
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function