WPSEO_Taxonomy::get_taxonomy()private staticYoast 1.0

Getting the taxonomy from the URL.

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

Хуков нет.

Возвращает

Строку.

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

$result = WPSEO_Taxonomy::get_taxonomy();

Код WPSEO_Taxonomy::get_taxonomy() Yoast 22.1

private static function get_taxonomy() {
	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
	if ( isset( $_GET['taxonomy'] ) && is_string( $_GET['taxonomy'] ) ) {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
		return sanitize_text_field( wp_unslash( $_GET['taxonomy'] ) );
	}
	return '';
}