Yoast\WP\SEO\Presenters

Title_Presenter::get_title()publicYoast 1.0

Returns the presentation title.

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

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

Возвращает

Строку. The title.

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

$Title_Presenter = new Title_Presenter();
$Title_Presenter->get_title();

Код Title_Presenter::get_title() Yoast 22.4

public function get_title() {
	$title = $this->replace_vars( $this->presentation->title );

	/**
	 * Filter: 'wpseo_title' - Allow changing the Yoast SEO generated title.
	 *
	 * @param string                 $title        The title.
	 * @param Indexable_Presentation $presentation The presentation of an indexable.
	 */
	$title = \apply_filters( 'wpseo_title', $title, $this->presentation );
	$title = $this->helpers->string->strip_all_tags( $title );
	return \trim( $title );
}