Yoast_Notification_Center::get_notifications()publicYoast 1.0

Provide a way to verify present notifications.

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

Хуков нет.

Возвращает

Массив|Yoast_Notification[]. Registered notifications.

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

$Yoast_Notification_Center = new Yoast_Notification_Center();
$Yoast_Notification_Center->get_notifications();

Код Yoast_Notification_Center::get_notifications() Yoast 22.3

public function get_notifications() {
	if ( ! $this->notifications ) {
		return [];
	}
	return array_merge( ...$this->notifications );
}