WordPress Function to Remove “WordPress” to “WordPress” filter

Remove “WordPress” to “WordPress” filter

Tested on: WordPress 3.0.1

There was a filter added with WordPress version 3.0 that automatically converts all instances of “WordPress” (no capital P) to “WordPress” (with a capital P) in post content, post titles, and comment text. Some people see this as intrusive, I just have a need to mis-case WordPress from time to time and found the filter somewhat annoying.

// Remove annoying P filter
if(function_exists('capital_P_dangit')) {
    foreach ( array( 'the_content', 'the_title' ) as $filter ) 
        remove_filter( $filter, 'capital_P_dangit', 11 ); 

    remove_filter('comment_text', 'capital_P_dangit', 31 );
}

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *