WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Получай пассивный доход от сайта с помощью браузерных PUSH уведомлений
функция не описана

Yoast_Notification_Center::update_storage() public Yoast 3.2

Save persistent notifications to storage.

We need to be able to retrieve these so they can be dismissed at any time during the execution.

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

Хуки из метода
Возвращает

null. Ничего.

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

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

Список изменений

С версии 3.2 Введена.

Код Yoast_Notification_Center::update_storage() Yoast 16.2

<?php
public function update_storage() {

	$notifications = $this->notifications;

	/**
	 * One array of Yoast_Notifications, merged from multiple arrays.
	 *
	 * @var Yoast_Notification[] $merged_notifications
	 */
	$merged_notifications = [];
	if ( ! empty( $notifications ) ) {
		$merged_notifications = array_merge( ...$notifications );
	}

	/**
	 * Filter: 'yoast_notifications_before_storage' - Allows developer to filter notifications before saving them.
	 *
	 * @api Yoast_Notification[] $notifications
	 */
	$merged_notifications = apply_filters( 'yoast_notifications_before_storage', $merged_notifications );

	$notifications = $this->split_on_user_id( $merged_notifications );

	// No notifications to store, clear storage if it was previously present.
	if ( empty( $notifications ) ) {
		$this->remove_storage();

		return;
	}

	array_walk( $notifications, [ $this, 'store_notifications_for_user' ] );
}