esc_url_raw()

最后更新于:2021-11-26 04:04:20

esc_url_raw( string$url, string[]$protocols=null)

Performs esc_url() for database usage.

参数

$url

(string) (Required) The URL to be cleaned.

$protocols

(string[]) (Optional) An array of acceptable protocols. Defaults to return value of gc_allowed_protocols().

Default value: null

响应

(string) The cleaned URL after esc_url() is run with the ‘db’ context.

源文件

文件: gc-includes/formatting.php

function esc_url_raw( $url, $protocols = null ) {
	return esc_url( $url, $protocols, 'db' );
}