Yoast_Notification_Center::ajax_get_notifications
AJAX display notifications.
Метод класса: Yoast_Notification_Center{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$Yoast_Notification_Center = new Yoast_Notification_Center(); $Yoast_Notification_Center->ajax_get_notifications();
Код Yoast_Notification_Center::ajax_get_notifications() Yoast Notification Center::ajax get notifications Yoast 28.6
public function ajax_get_notifications() {
$echo = false;
// phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form data.
if ( isset( $_POST['version'] ) && is_string( $_POST['version'] ) ) {
// phpcs:ignore WordPress.Security.NonceVerification.Missing,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are only comparing the variable in a condition.
$echo = wp_unslash( $_POST['version'] ) === '2';
}
// Display the notices.
$this->display_notifications( $echo );
// AJAX die.
exit();
}