Yoast\WP\SEO\Presenters
Canonical_Presenter::get() public Yoast 1.0
Run the canonical content through the wpseo_canonical filter.
{} Это метод класса: Canonical_Presenter{}
Хуки из метода
Возвращает
Строку. $canonical The filtered canonical.
Использование
$Canonical_Presenter = new Canonical_Presenter(); $Canonical_Presenter->get();
Код Canonical_Presenter::get() Canonical Presenter::get Yoast 15.6.2
public function get() {
if ( \in_array( 'noindex', $this->presentation->robots, true ) ) {
return '';
}
/**
* Filter: 'wpseo_canonical' - Allow filtering of the canonical URL put out by Yoast SEO.
*
* @api string $canonical The canonical URL.
*
* @param Indexable_Presentation $presentation The presentation of an indexable.
*/
return \urldecode( (string) \trim( \apply_filters( 'wpseo_canonical', $this->presentation->canonical, $this->presentation ) ) );
}