Yoast_Notifications::ajax_dismiss_notification()publicYoast 1.0

Handle ajax request to dismiss a notification.

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

Хуков нет.

Возвращает

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

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

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

Код Yoast_Notifications::ajax_dismiss_notification() Yoast 22.4

public function ajax_dismiss_notification() {

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

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

	wp_die();
}