Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allow file:/// protocol in WordPress
<?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' );
@ClarusDignus

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
You can’t perform that action at this time.