Created
August 23, 2012 15:16
-
-
Save rosshanney/3437658 to your computer and use it in GitHub Desktop.
Allow file:/// protocol in WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin name: Allow file protocol | |
*/ | |
function rh_allow_file_protocol( $protocols ) { | |
$protocols[] = 'file'; | |
return $protocols; | |
} | |
add_filter( 'kses_allowed_protocols', 'rh_allow_file_protocol' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Very useful but why not add this to the WordPress plugin repository?