Yoast\WP\SEO\Llms_Txt\Infrastructure\Markdown_Services

Description_Adapter::get_description │ public │ Yoast 1.0

Gets the description.

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

Хуков нет.

Возвращает

Description. The description.

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

$Description_Adapter = new Description_Adapter();
$Description_Adapter->get_description(): Description;

Код Description_Adapter::get_description() Yoast 28.9

public function get_description(): Description {
	$meta_description = $this->meta->for_home_page()->meta_description;

	// In a lot of cases, the homepage's meta description falls back to the site's tagline.
	// But that is already used for the title section, so let's try to not have duplicate content.
	if ( $meta_description === \get_bloginfo( 'description' ) ) {
		return new Description( '' );
	}

	return new Description( $meta_description );
}