Yoast_Notification_Center::get_sorted_notifications()publicYoast 1.0

Return the notifications sorted on type and priority.

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

Хуков нет.

Возвращает

Массив|Yoast_Notification[]. Sorted Notifications

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

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

Код Yoast_Notification_Center::get_sorted_notifications() Yoast 19.7.1

public function get_sorted_notifications() {
	$notifications = $this->get_notifications_for_user( get_current_user_id() );
	if ( empty( $notifications ) ) {
		return [];
	}

	// Sort by severity, error first.
	usort( $notifications, [ $this, 'sort_notifications' ] );

	return $notifications;
}