WPSEO_Schema_Person_Upgrade_Notification::get_notification()protectedYoast 1.0

Gets the notification object.

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

Хуков нет.

Возвращает

Yoast_Notification.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_notification();

Код WPSEO_Schema_Person_Upgrade_Notification::get_notification() Yoast 22.4

protected function get_notification() {
	$message = sprintf(
		/* translators: %1$s is a link start tag to the Search Appearance settings, %2$s is the link closing tag. */
		__( 'You have previously set your site to represent a person. We’ve improved our functionality around Schema and the Knowledge Graph, so you should go in and %1$scomplete those settings%2$s.', 'wordpress-seo' ),
		'<a href="' . esc_url( admin_url( 'admin.php?page=wpseo_page_settings#/site-representation' ) ) . '">',
		'</a>'
	);

	$notification = new Yoast_Notification(
		$message,
		[
			'type'         => Yoast_Notification::WARNING,
			'id'           => 'wpseo-schema-person-upgrade',
			'capabilities' => 'wpseo_manage_options',
			'priority'     => 0.8,
		]
	);

	return $notification;
}