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/services/health-c...
File: postname-permalink-check.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Services\Health_Check;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Paasses when permalinks are set to contain the post name.
[5] Fix | Delete
*/
[6] Fix | Delete
class Postname_Permalink_Check extends Health_Check {
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Runs the health check.
[10] Fix | Delete
*
[11] Fix | Delete
* @var Postname_Permalink_Runner
[12] Fix | Delete
*/
[13] Fix | Delete
private $runner;
[14] Fix | Delete
[15] Fix | Delete
/**
[16] Fix | Delete
* Generates WordPress-friendly health check results.
[17] Fix | Delete
*
[18] Fix | Delete
* @var Postname_Permalink_Reports
[19] Fix | Delete
*/
[20] Fix | Delete
private $reports;
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Constructor.
[24] Fix | Delete
*
[25] Fix | Delete
* @param Postname_Permalink_Runner $runner The object that implements the actual health check.
[26] Fix | Delete
* @param Postname_Permalink_Reports $reports The object that generates WordPress-friendly results.
[27] Fix | Delete
*/
[28] Fix | Delete
public function __construct(
[29] Fix | Delete
Postname_Permalink_Runner $runner,
[30] Fix | Delete
Postname_Permalink_Reports $reports
[31] Fix | Delete
) {
[32] Fix | Delete
$this->runner = $runner;
[33] Fix | Delete
$this->reports = $reports;
[34] Fix | Delete
$this->reports->set_test_identifier( $this->get_test_identifier() );
[35] Fix | Delete
[36] Fix | Delete
$this->set_runner( $this->runner );
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Returns a human-readable label for this health check.
[41] Fix | Delete
*
[42] Fix | Delete
* @return string The human-readable label.
[43] Fix | Delete
*/
[44] Fix | Delete
public function get_test_label() {
[45] Fix | Delete
return \__( 'Postname permalink', 'wordpress-seo' );
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Returns the WordPress-friendly health check result.
[50] Fix | Delete
*
[51] Fix | Delete
* @return string[] The WordPress-friendly health check result.
[52] Fix | Delete
*/
[53] Fix | Delete
protected function get_result() {
[54] Fix | Delete
if ( $this->runner->is_successful() ) {
[55] Fix | Delete
return $this->reports->get_success_result();
[56] Fix | Delete
}
[57] Fix | Delete
[58] Fix | Delete
return $this->reports->get_has_no_postname_in_permalink_result();
[59] Fix | Delete
}
[60] Fix | Delete
}
[61] Fix | Delete
[62] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function