wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema
wp_allowed_protocols › WordPress Function
Desde3.3.0
Obsoleton/a
› wp_allowed_protocols ( Sem parâmetros )
| Ver: | |
| Retorna: |
|
| Definido em: |
|
| Codex: | |
| Log de mudanças: |
|
Retrieves a list of protocols to allow in HTML attributes.
Funções relacionadas: wp_kses_bad_protocol, add_allowed_options, wp_kses_allowed_html, _wp_get_allowed_postdata, allowed_tags
Fonte
function wp_allowed_protocols() {
static $protocols = array();
if ( empty( $protocols ) ) {
$protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'irc6', 'ircs', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'sms', 'svn', 'tel', 'fax', 'xmpp', 'webcal', 'urn' );
}
if ( ! did_action( 'wp_loaded' ) ) {
/**
* Filters the list of protocols allowed in HTML attributes.
*
* @since 3.0.0
*
* @param string[] $protocols Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
*/
$protocols = array_unique( (array) apply_filters( 'kses_allowed_protocols', $protocols ) );
}
return $protocols;
}