Yoast\WP\SEO\Presentations

Indexable_Post_Type_Presentation::generate_title()publicYoast 1.0

Generates the open graph title.

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

Хуков нет.

Возвращает

Строку. The open graph title.

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

$Indexable_Post_Type_Presentation = new Indexable_Post_Type_Presentation();
$Indexable_Post_Type_Presentation->generate_title();

Код Indexable_Post_Type_Presentation::generate_title() Yoast 22.3

public function generate_title() {
	if ( $this->model->title ) {
		return $this->model->title;
	}

	// Get SEO title as entered in Search appearance.
	$post_type = $this->model->object_sub_type;
	$title     = $this->options->get( 'title-' . $this->model->object_sub_type );
	if ( $title ) {
		return $title;
	}

	// Get installation default title.
	return $this->options->get_title_default( 'title-' . $post_type );
}