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/presente...
File: canonical-presenter.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace Yoast\WP\SEO\Presenters;
[2] Fix | Delete
[3] Fix | Delete
use Yoast\WP\SEO\Presentations\Indexable_Presentation;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Presenter class for the canonical.
[7] Fix | Delete
*/
[8] Fix | Delete
class Canonical_Presenter extends Abstract_Indexable_Tag_Presenter {
[9] Fix | Delete
[10] Fix | Delete
/**
[11] Fix | Delete
* The tag key name.
[12] Fix | Delete
*
[13] Fix | Delete
* @var string
[14] Fix | Delete
*/
[15] Fix | Delete
protected $key = 'canonical';
[16] Fix | Delete
[17] Fix | Delete
/**
[18] Fix | Delete
* The tag format including placeholders.
[19] Fix | Delete
*
[20] Fix | Delete
* @var string
[21] Fix | Delete
*/
[22] Fix | Delete
protected $tag_format = self::LINK_REL_HREF;
[23] Fix | Delete
[24] Fix | Delete
/**
[25] Fix | Delete
* The method of escaping to use.
[26] Fix | Delete
*
[27] Fix | Delete
* @var string
[28] Fix | Delete
*/
[29] Fix | Delete
protected $escaping = 'url';
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Run the canonical content through the `wpseo_canonical` filter.
[33] Fix | Delete
*
[34] Fix | Delete
* @return string The filtered canonical.
[35] Fix | Delete
*/
[36] Fix | Delete
public function get() {
[37] Fix | Delete
if ( \in_array( 'noindex', $this->presentation->robots, true ) ) {
[38] Fix | Delete
return '';
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
/**
[42] Fix | Delete
* Filter: 'wpseo_canonical' - Allow filtering of the canonical URL put out by Yoast SEO.
[43] Fix | Delete
*
[44] Fix | Delete
* @param string $canonical The canonical URL.
[45] Fix | Delete
* @param Indexable_Presentation $presentation The presentation of an indexable.
[46] Fix | Delete
*/
[47] Fix | Delete
return \urldecode( (string) \trim( \apply_filters( 'wpseo_canonical', $this->presentation->canonical, $this->presentation ) ) );
[48] Fix | Delete
}
[49] Fix | Delete
}
[50] Fix | Delete
[51] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function