Warning: Trying to access array offset on false in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 216
wp_allowed_protocols() - 检索HTML属性中允许的协议列表 - WordPress函数 - WordPress动力
当前浏览:首页 / WordPress函数 / wp_allowed_protocols()

wp_allowed_protocols(): string[]

检索HTML属性中允许的协议列表


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 3 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 "15fa1e388482fb7f2250a8ac8d637c44" 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 "78134c5240faf9553c014479cd07133a" in /www/wwwroot/www.wpdongli.com/wp-content/themes/WPdongli/functions/wp.php on line 223

allowed 允许

protocols


描述

另见


返回

string[] 允许的协议数组。默认为包含'http'、'https'、'ftp'、'ftps'、'mailto'、'news'、'irc'、'irc6'、'ircs'、'gopher'、'nntp'、'feed'、'telnet'、'mms'、'rtsp'、'sms'、'svn'、'tel'、'fax'、'xmpp'、'webcal'和'urn'的数组。
这涵盖了所有通用链接协议,但'javascript'除外,不应允许不受信任的用户使用。


钩子



源码

查看源码 官方文档


更新日志

版本描述
5.6.0将'irc6'和'ircs'添加到协议数组中。
5.3.0将'sms'添加到协议数组。
4.7.0将'urn'添加到协议数组。
4.3.0将'webcal'添加到协议数组中。
3.3.0开始引入

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