Yoast_Notification_Center::dismiss_notification()
Dismisses a notification.
Метод класса: Yoast_Notification_Center{}
Хуков нет.
Возвращает
true|false
. True if dismissed, false otherwise.
Использование
$result = Yoast_Notification_Center::dismiss_notification( $notification, $meta_value );
- $notification(Yoast_Notification) (обязательный)
- Notification to dismiss.
- $meta_value(строка)
- Value to save in the dismissal.
По умолчанию: 'seen'
Код Yoast_Notification_Center::dismiss_notification() Yoast Notification Center::dismiss notification Yoast 23.4
public static function dismiss_notification( Yoast_Notification $notification, $meta_value = 'seen' ) { // Dismiss notification. return update_user_option( get_current_user_id(), $notification->get_dismissal_key(), $meta_value ) !== false; }