Yoast\WP\SEO\Helpers
Notification_Helper::get_alerts()
Parses all the notifications to an array with just id, message, nonce, type and dismissed.
Метод класса: Notification_Helper{}
Хуков нет.
Возвращает
Массив<Строку,Строку|true|false>
.
Использование
$Notification_Helper = new Notification_Helper(); $Notification_Helper->get_alerts(): array;
Код Notification_Helper::get_alerts() Notification Helper::get alerts Yoast 24.3
public function get_alerts(): array { $all_notifications = $this->get_sorted_notifications(); return \array_map( function ( $notification ) { return [ 'id' => $notification->get_id(), 'message' => $notification->get_message(), 'nonce' => $notification->get_nonce(), 'type' => $notification->get_type(), 'dismissed' => $this->is_notification_dismissed( $notification ), ]; }, $all_notifications ); }