Yoast_Notification_Center::remove_notification_by_id
Removes a notification by its ID.
Метод класса: Yoast_Notification_Center{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$Yoast_Notification_Center = new Yoast_Notification_Center(); $Yoast_Notification_Center->remove_notification_by_id( $notification_id, $resolve );
- $notification_id(строка) (обязательный)
- The notification id.
- $resolve(true|false)
- Resolve as fixed.
По умолчанию:true
Код Yoast_Notification_Center::remove_notification_by_id() Yoast Notification Center::remove notification by id Yoast 28.0
public function remove_notification_by_id( $notification_id, $resolve = true ) {
$notification = $this->get_notification_by_id( $notification_id );
if ( $notification === null ) {
return;
}
$this->remove_notification( $notification, $resolve );
$this->notifications_need_storage = true;
}