wpseek.com
WordPress开发者和主题制作者的搜索引擎



esc_url_raw › WordPress Function

Since2.8.0
已弃用n/a
› esc_url_raw ( $url, $protocols = null )
参数: (2)
  • (string) $url The URL to be cleaned.
    Required: Yes
  • (string[]) $protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols().
    Required: No
    默认: null
查看:
返回:
  • (string) The cleaned URL after sanitize_url() is run.
定义在:
文档:
Change Log:
  • 6.1.0
  • 6.9.0

Sanitizes a URL for database or redirect usage.

This function is an alias for sanitize_url().


源码

function esc_url_raw( $url, $protocols = null ) {
	return sanitize_url( $url, $protocols );
}