WPSEO_MyYoast_Proxy::get_proxy_file()protectedYoast 1.0

Returns the proxy file from the HTTP request parameters.

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

Хуков нет.

Возвращает

Строку. The sanitized file request parameter or an empty string if it does not exist.

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

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

Код WPSEO_MyYoast_Proxy::get_proxy_file() Yoast 22.4

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