Yoast\WP\SEO\Llms_Txt\Domain\Content_Types

Content_Type_Entry::from_metapublic staticYoast 1.0

Creates a new instance of the class from the provided Meta object.

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

Хуков нет.

Возвращает

self. A new instance of the class.

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

$result = Content_Type_Entry::from_meta( $meta ): self;
$meta(Meta) (обязательный)
The Meta object containing the necessary data to construct the instance.

Код Content_Type_Entry::from_meta() Yoast 28.4

public static function from_meta( Meta $meta ): self {
	return new self(
		$meta->post->ID,
		$meta->post->post_title,
		$meta->canonical,
		$meta->post->post_excerpt,
		$meta->post->post_name,
	);
}