Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Allow file:/// protocol in WordPress
Plugin name: Allow file protocol
function rh_allow_file_protocol( $protocols ) {
$protocols[] = 'file';
return $protocols;
add_filter( 'kses_allowed_protocols', 'rh_allow_file_protocol' );

This comment has been minimized.

Copy link

@ClarusDignus ClarusDignus commented Feb 15, 2015

Very useful but why not add this to the WordPress plugin repository?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment