Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

WP Fix

By: adamwalter on Aug 6th, 2012  |  syntax: PHP  |  size: 0.40 KB  |  views: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function custom_wp_allowed_protocols() {
  2.         static $protocols;
  3.         if ( empty( $protocols ) ) {
  4.                 $protocols = array( 'http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn', 'tel' );
  5.                 $protocols = apply_filters( 'kses_allowed_protocols', $protocols );
  6.         }
  7.         return $protocols;
  8. }
  9. add_filter('wp_allowed_protocols', 'custom_wp_allowed_protocols');
clone this paste RAW Paste Data