Skip to content

Instantly share code, notes, and snippets.

@bnecreative
Created March 15, 2018 19:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnecreative/2b0e67bea532dfff3cb46659dade50e6 to your computer and use it in GitHub Desktop.
Save bnecreative/2b0e67bea532dfff3cb46659dade50e6 to your computer and use it in GitHub Desktop.
Navbar - Add SMS Links into the KSES WP Filter
<?php // don't copy this line
/*
* KSES Protocols Filter
*
* Add the SMS scheme into kses to allow escaped URL's
* to parse a sms link.
*/
function bne_kses_allowed_protocols( $protocols ) {
$protocols[] = 'sms';
return $protocols;
}
add_filter( 'kses_allowed_protocols' , 'bne_kses_allowed_protocols' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment