Put this line in your theme’s functions.php file:
remove_filter( 'the_content', 'url_auto' );
That will remove filter even in plain text.
I am doing this:
function url_auto( $atts, $content = null ) {
$url_pattern = "/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)/";
$text = get_the_content();
$replace = '<a href="$1" target="_blank">$2</a>';
$text= preg_replace($url_pattern, $replace, $text);
echo $text;
}
add_filter( 'the_content', 'url_auto' );
URL to HTML.
Didn’t understand you were actually adding that filter, sorry.
If you want to filter only main content, you can filter this way:
function url_auto( $atts, $content = null ) {
if( is_main_query() ):
// your filter
endif;
}
http://codex.wordpress.org/Function_Reference/is_main_query
http://pippinsplugins.com/playing-nice-with-the-content-filter/
Hope it helps!
Still, it messes html and shortcodes. 🙁