Yoast_Notifications::ajax_restore_notification()publicYoast 1.0

Handle ajax request to restore a notification.

Метод класса: Yoast_Notifications{}

Хуков нет.

Возвращает

null. Ничего (null).

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

$Yoast_Notifications = new Yoast_Notifications();
$Yoast_Notifications->ajax_restore_notification();

Код Yoast_Notifications::ajax_restore_notification() Yoast 22.4

public function ajax_restore_notification() {

	$notification = $this->get_notification_from_ajax_request();
	if ( $notification ) {
		$notification_center = Yoast_Notification_Center::get();
		$notification_center->restore_notification( $notification );

		$this->output_ajax_response( $notification->get_type() );
	}

	wp_die();
}