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-reports.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Services\Health_Check;
[2] Fix | Delete
[3] Fix | Delete
/**
[4] Fix | Delete
* Presents a set of different messages for the Postname_Permalink health check.
[5] Fix | Delete
*/
[6] Fix | Delete
class Postname_Permalink_Reports {
[7] Fix | Delete
[8] Fix | Delete
use Reports_Trait;
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* Constructor.
[12] Fix | Delete
*
[13] Fix | Delete
* @param Report_Builder_Factory $report_builder_factory The factory for result builder objects.
[14] Fix | Delete
* This class uses the report builder to generate WordPress-friendly
[15] Fix | Delete
* health check results.
[16] Fix | Delete
*/
[17] Fix | Delete
public function __construct( Report_Builder_Factory $report_builder_factory ) {
[18] Fix | Delete
$this->report_builder_factory = $report_builder_factory;
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* Returns the report for when permalinks are set to contain the post name.
[23] Fix | Delete
*
[24] Fix | Delete
* @return string[] The message as a WordPress site status report.
[25] Fix | Delete
*/
[26] Fix | Delete
public function get_success_result() {
[27] Fix | Delete
return $this->get_report_builder()
[28] Fix | Delete
->set_label( \esc_html__( 'Your permalink structure includes the post name', 'wordpress-seo' ) )
[29] Fix | Delete
->set_status_good()
[30] Fix | Delete
->set_description( \__( 'You do have your postname in the URL of your posts and pages.', 'wordpress-seo' ) )
[31] Fix | Delete
->build();
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
/**
[35] Fix | Delete
* Returns the report for when permalinks are not set to contain the post name.
[36] Fix | Delete
*
[37] Fix | Delete
* @return string[] The message as a WordPress site status report.
[38] Fix | Delete
*/
[39] Fix | Delete
public function get_has_no_postname_in_permalink_result() {
[40] Fix | Delete
return $this->get_report_builder()
[41] Fix | Delete
->set_label( \__( 'You do not have your postname in the URL of your posts and pages', 'wordpress-seo' ) )
[42] Fix | Delete
->set_status_recommended()
[43] Fix | Delete
->set_description( $this->get_has_no_postname_in_permalink_description() )
[44] Fix | Delete
->set_actions( $this->get_has_no_postname_in_permalink_actions() )
[45] Fix | Delete
->build();
[46] Fix | Delete
}
[47] Fix | Delete
[48] Fix | Delete
/**
[49] Fix | Delete
* Returns the description for when permalinks are not set to contain the post name.
[50] Fix | Delete
*
[51] Fix | Delete
* @return string The description as a string.
[52] Fix | Delete
*/
[53] Fix | Delete
private function get_has_no_postname_in_permalink_description() {
[54] Fix | Delete
return \sprintf(
[55] Fix | Delete
/* translators: %s expands to '/%postname%/' */
[56] Fix | Delete
\__( 'It\'s highly recommended to have your postname in the URL of your posts and pages. Consider setting your permalink structure to %s.', 'wordpress-seo' ),
[57] Fix | Delete
'<strong>/%postname%/</strong>'
[58] Fix | Delete
);
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
/**
[62] Fix | Delete
* Returns the actions for when permalinks are not set to contain the post name.
[63] Fix | Delete
*
[64] Fix | Delete
* @return string The actions as a string.
[65] Fix | Delete
*/
[66] Fix | Delete
private function get_has_no_postname_in_permalink_actions() {
[67] Fix | Delete
return \sprintf(
[68] Fix | Delete
/* translators: %1$s is a link start tag to the permalink settings page, %2$s is the link closing tag. */
[69] Fix | Delete
\__( 'You can fix this on the %1$sPermalink settings page%2$s.', 'wordpress-seo' ),
[70] Fix | Delete
'<a href="' . \admin_url( 'options-permalink.php' ) . '">',
[71] Fix | Delete
'</a>'
[72] Fix | Delete
);
[73] Fix | Delete
}
[74] Fix | Delete
}
[75] Fix | Delete
[76] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function