Yoast\WP\SEO\MyYoast_Client\User_Interface

OAuth_Callback_Integration::read_query_argprivateYoast 1.0

Reads a query argument, returning an empty string when missing.

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

Хуков нет.

Возвращает

Строку. The sanitized value.

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

// private - только в коде основоного (родительского) класса
$result = $this->read_query_arg( $name ): string;
$name(строка) (обязательный)
The query argument name.

Код OAuth_Callback_Integration::read_query_arg() Yoast 28.3

private function read_query_arg( string $name ): string {
	// phpcs:disable WordPress.Security.NonceVerification.Recommended -- CSRF defense is OAuth `state` validated inside exchange_code.
	if ( ! isset( $_GET[ $name ] ) || ! \is_string( $_GET[ $name ] ) ) {
		return '';
	}
	return \sanitize_text_field( \wp_unslash( $_GET[ $name ] ) );
	// phpcs:enable WordPress.Security.NonceVerification.Recommended
}