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.../src/conditio...
File: primary-category-conditional.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Conditionals;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Helpers\Current_Page_Helper;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Conditional that is only met when in frontend or page is a post overview or post add/edit form.
[7] Fix | Delete
*/
[8] Fix | Delete
class Primary_Category_Conditional implements Conditional {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* The current page helper.
[12] Fix | Delete
*
[13] Fix | Delete
* @var Current_Page_Helper
[14] Fix | Delete
*/
[15] Fix | Delete
private $current_page;
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* Primary_Category_Conditional constructor.
[19] Fix | Delete
*
[20] Fix | Delete
* @param Current_Page_Helper $current_page The current page helper.
[21] Fix | Delete
*/
[22] Fix | Delete
public function __construct( Current_Page_Helper $current_page ) {
[23] Fix | Delete
$this->current_page = $current_page;
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
/**
[27] Fix | Delete
* Returns `true` when on the frontend,
[28] Fix | Delete
* or when on the post overview, post edit or new post admin page,
[29] Fix | Delete
* or when on additional admin pages, allowed by filter.
[30] Fix | Delete
*
[31] Fix | Delete
* @return bool `true` when on the frontend, or when on the post overview,
[32] Fix | Delete
* post edit, new post admin page or additional admin pages, allowed by filter.
[33] Fix | Delete
*/
[34] Fix | Delete
public function is_met() {
[35] Fix | Delete
if ( ! \is_admin() ) {
[36] Fix | Delete
return true;
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Filter: Adds the possibility to use primary category at additional admin pages.
[41] Fix | Delete
*
[42] Fix | Delete
* @param array $admin_pages List of additional admin pages.
[43] Fix | Delete
*/
[44] Fix | Delete
$additional_pages = \apply_filters( 'wpseo_primary_category_admin_pages', [] );
[45] Fix | Delete
return \in_array( $this->current_page->get_current_admin_page(), \array_merge( [ 'edit.php', 'post.php', 'post-new.php' ], $additional_pages ), true );
[46] Fix | Delete
}
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function