WPDev.one
Core Function
View Source on Trac ↗

wp_allowed_protocols()

wp_allowed_protocols( )

Retrieves a list of protocols to allow in HTML attributes.

Return Value

(string[])
string[] Array of allowed protocols. Defaults to an array containing 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'irc6', 'ircs', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', and 'urn'. This covers all common link protocols, except for 'javascript' which should not be allowed for untrusted users.

Function Information

Since Version
3.3.0
Source File
wp-includes/functions.php
Advertisement