Yoast\WP\SEO\Presenters

Rel_Next_Presenter::get()publicYoast 1.0

Run the canonical content through the wpseo_adjacent_rel_url

Метод класса: Rel_Next_Presenter{}

Хуки из метода

Возвращает

Строку. The filtered adjacent link.

Использование

$Rel_Next_Presenter = new Rel_Next_Presenter();
$Rel_Next_Presenter->get();

Код Rel_Next_Presenter::get() Yoast 22.4

public function get() {
	if ( \in_array( 'noindex', $this->presentation->robots, true ) ) {
		return '';
	}

	/**
	 * Filter: 'wpseo_adjacent_rel_url' - Allow filtering of the rel next URL put out by Yoast SEO.
	 *
	 * @param string                 $rel_next     The rel next URL.
	 * @param string                 $rel          Link relationship, prev or next.
	 * @param Indexable_Presentation $presentation The presentation of an indexable.
	 */
	return (string) \trim( \apply_filters( 'wpseo_adjacent_rel_url', $this->presentation->rel_next, 'next', $this->presentation ) );
}