WPSEO_Dismissible_Notification::get_listener_value()protectedYoast 1.0

Retrieves the value where listener is listening for.

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

Хуков нет.

Возвращает

Строку|null. The listener value or null if not set.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_listener_value();

Код WPSEO_Dismissible_Notification::get_listener_value() Yoast 22.7

protected function get_listener_value() {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: Normally we would need to check for a nonce here but this class is not used anymore.
	if ( isset( $_GET['yoast_dismiss'] ) && is_string( $_GET['yoast_dismiss'] ) ) {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: Normally we would need to check for a nonce here but this class is not used anymore.
		return sanitize_text_field( wp_unslash( $_GET['yoast_dismiss'] ) );
	}
	return null;
}