Support » Developing with WordPress » kses_allowed_protocols Filter

  • I am trying to allow the file protocol in the the Nav Menu editor. I placed the following code into my theme’s functions.php file but the file:/// link is still removed when I save the Menu.

     function rh_allow_file_protocol( $protocols ) {
    	$protocols[] = 'file';
    	return $protocols;
    }
    add_filter( 'kses_allowed_protocols', 'rh_allow_file_protocol' );

    Any help would be appreciated. Thanks!

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘kses_allowed_protocols Filter’ is closed to new replies.