Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
clean_url() - 检查并清除URL - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / clean_url()

Warning: 此函数已被弃用,请使用 esc_url() 替代。

clean_url( string $url, array $protocols = null, string $context = 'display' ): string

检查并清除URL


Warning: Undefined array key -1 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 185

Warning: Undefined array key 2 in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference-cat.php on line 186

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "14da87c79b24f867a5675649ce606996" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

Warning: Undefined variable $searchand in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 154

Warning: Undefined array key "05a767e1e80b3fbcaa4313c042c82dd3" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

clean

urlmore...


描述

一些字符被从URL中删除,如果URL用于显示(默认行为)&符号也将被替换。‘clean_url’过滤器应用于返回已清理的URL。

另见


参数

$urlstring必填
要清理的URL。
$protocolsarray可选
可接受的协议的数组。

默认:null

$contextstring可选
如何使用URL,默认值为'display'。

默认:'display'


返回

string 应用'clean_url'过滤器后清理的$url。



源码

查看源码 官方文档


更新日志

版本描述
3.0.0使用esc_url()
1.2.0开始引入

Warning: Undefined variable $o in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/reference.php on line 194