WPSEO_Slug_Change_Watcher::add_notification
Adds a notification to be shown on the next page request since posts are updated in an ajax request.
Метод класса: WPSEO_Slug_Change_Watcher{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_notification( $message );
- $message(строка) (обязательный)
- The message to add to the notification.
Код WPSEO_Slug_Change_Watcher::add_notification() WPSEO Slug Change Watcher::add notification Yoast 26.3
protected function add_notification( $message ) {
$notification = new Yoast_Notification(
$message,
[
'type' => 'notice-warning is-dismissible',
'yoast_branding' => true,
]
);
$notification_center = Yoast_Notification_Center::get();
$notification_center->add_notification( $notification );
}