WPSEO_Suggested_Plugins::get_yoast_seo_suggested_plugins_notification()protectedYoast 1.0

Build Yoast SEO suggested plugins notification.

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

Хуков нет.

Возвращает

Yoast_Notification. The notification containing the suggested plugin.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_yoast_seo_suggested_plugins_notification( $notification_id, $plugin );
$notification_id(строка) (обязательный)
The id of the notification to be created.
$plugin (обязательный)
-

Код WPSEO_Suggested_Plugins::get_yoast_seo_suggested_plugins_notification() Yoast 22.4

protected function get_yoast_seo_suggested_plugins_notification( $notification_id, $plugin ) {
	$message = $this->create_install_suggested_plugin_message( $plugin );

	return new Yoast_Notification(
		$message,
		[
			'id'           => $notification_id,
			'type'         => Yoast_Notification::WARNING,
			'capabilities' => [ 'install_plugins' ],
		]
	);
}