esc_url_raw

函数
esc_url_raw ( $url, $protocols = null )
参数
  • (string) $url The URL to be cleaned.
    Required:
  • (string[]) $protocols Optional. An array of acceptable protocols. Defaults to return value of wp_allowed_protocols().
    Required:
    Default: null
返回值
  • (string) The cleaned URL after sanitize_url() is run.
相关
  • sanitize_url()
定义位置
相关方法
esc_urlrest_urlesc_html__esc_html_eesc_html_x
引入
2.8.0
弃用
-

esc_url_raw: 这个函数用来转义一个URL,用于查询字符串参数。

对数据库或重定向使用的URL进行净化。

这个函数是sanitize_url()的一个别名。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-14 10:36:29

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: