Yoast\WP\SEO\Editors\Framework\Site

Post_Site_Information::get_legacy_site_informationpublicYoast 1.0

Returns post specific site information together with the generic site information.

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

Хуков нет.

Возвращает

array<string,. string|array<string, string>>

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

$Post_Site_Information = new Post_Site_Information();
$Post_Site_Information->get_legacy_site_information(): array;

Код Post_Site_Information::get_legacy_site_information() Yoast 28.4

public function get_legacy_site_information(): array {
	$dismissed_alerts = $this->alert_dismissal_action->all_dismissed();

	$data = [
		'dismissedAlerts'              => $dismissed_alerts,
		'webinarIntroBlockEditorUrl'   => $this->short_link_helper->get( 'https://yoa.st/webinar-intro-block-editor' ),
		'metabox'                      => [
			'search_url'    => $this->search_url(),
			'post_edit_url' => $this->edit_url(),
			'base_url'      => $this->base_url_for_js(),
		],
		'isRecentTitlesDefault'        => \count( $this->default_seo_data_collector->get_posts_with_default_seo_title() ) > 4,
		'isRecentDescriptionsDefault'  => \count( $this->default_seo_data_collector->get_posts_with_default_seo_description() ) > 4,
	];

	return \array_merge_recursive( $data, parent::get_legacy_site_information() );
}