apply_filters( 'kses_allowed_protocols', array $protocols )
Filters the list of protocols allowed in HTML attributes.
Description Description
Parameters Parameters
- $protocols
-
(array) Array of allowed protocols e.g. 'http', 'ftp', 'tel', and more.
Source Source
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Allow Skype call links.
add_filter( 'kses_allowed_protocols', function ( $protocols ) { $protocols[] = 'skype'; return $protocols; } );The filter should to run before init.
Note: this example only works in PHP 5.3+
function wpse_allow_sms_protocol( $protocols ) { $protocols[] = 'sms'; return $protocols; } add_action('plugins_loaded', function(){add_filter('kses_allowed_protocols', 'wpse_allow_sms_protocol' );}); print_r(wp_allowed_protocols());