Fix WordPress Capital P Dangit. What is it anyway?

When WordPress 3.0 came out, Matt did something silly. He added some code into WordPress core that replaces all instances of WordPress with WordPress. See the difference? Look again, the P in second one is capital. Well, that is the way it is meant to be.

So what is the big deal?


At first look, its so silly. And if it was executed well, no one would have even noticed that. But that’s not how things are now. Apparently, this code even checks the permalinks and breaks them. Its that bad. I am pretty sure Matt didn’t see any of it coming.

WordPress Capital P Dangit

There is a flame war going on in the community. Here is what you need to know:

  • The code literally breaks things like URLs on some sites. For example, suppose you installed WordPress in a /Wordpress directory. That would cause all kinds of trouble with things like images.
  • This function is effectively changing what people write, and WordPress should not have editorial control over the content of anyone’s blog.
  • The code was committed to WordPress without a Trac ticket, so it wasn’t left open to community discussion beforehand.
  • Matt’s responses seem to dismiss the very community of people that help make WordPress what it is.
  • Source: Lowercase p, dangit!

Checkout the above source if you need links to have a look at the flame war.

Fixing the Capital_P_Dangit()

Open up your functions.php in your theme folder and add the following lines anywhere in the php, i.e before the closing ?>

remove_filter( 'the_content', 'capital_P_dangit' );
remove_filter( 'the_title', 'capital_P_dangit' );
remove_filter( 'comment_text', 'capital_P_dangit' );

Source: Removing the Uppercase P Filter

Some Dangit Fun!

  • Capitalp.org – P fo ‘Pure Evil’. Refresh this page for subtle funny quotes.
  • No Comic Sans, Dangit -  A new WordPress plugin that will remove and replace all instance of Comic Sans. FYI, Comic Sans is a hated font.

Now we are talking!

Update: A new version of the fix is available here.

This entry was posted in WordPress and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

For More Like, "Fix WordPress Capital P Dangit. What is it anyway?"
Grab the Feed or,

8 Comments

  1. Posted July 17, 2010 at 14:04 | Permalink

    Man, I never thought this would be an issue first. WordPress 3.0 brings lot of troubles it seems. Thanks for the share Arun..

    P for Pradeep… :P

    • Posted July 17, 2010 at 14:09 | Permalink

      And so I haven’t moved to WP 3.0 yet. I feel that 3.0 is for the noobs, everything is so easy in that. lol

  2. Posted July 17, 2010 at 21:43 | Permalink

    Thanks for the mention, Arun.

    After that first article was posted, some “changes” were made to the filter, making it more “Judicious”. I’ve posted a follow-up and review of the updated code: http://flashingcursor.com/wordpress/not-so-judicious-capital_p-108.

    In light of all the drama in the WP community over the past couple of days, this really does seem silly — but still something that should be talked about and, in my opinion, should be removed from the core.

    Cheers!

    • Posted July 17, 2010 at 22:50 | Permalink

      Matt could have made things a lot easier by filing a Trac Ticket. Its heart-breaking to see something of this kind within the community that too from Matt.

      I have just updated the post. Thanks!

  3. Posted July 19, 2010 at 14:41 | Permalink

    Arun,
    Nice to see you again IN ACTION

  4. Posted July 23, 2010 at 14:42 | Permalink

    I remember this. It was an odd one to be honest! Didn’t harm my blogs but yeah, bit odd that one.

  5. Posted August 20, 2010 at 16:04 | Permalink

    i think WordPress 3.0 is better. :)

One Trackback

  1. [...] Hier ist ein Plugin dazu, oder man fügt einfach ein paar Zeilen Code in sein Template ein, wie hier beschrieben und wie ich es gemacht habe. Sonst könnte ich ja nur über Umwege überhaupt darüber [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Warning: Illegal string offset 'solo_subscribe' in /home/mvault47/public_html/wp-content/plugins/subscribe-to-comments/subscribe-to-comments.php on line 304

Subscribe without commenting

  • Get Free Updates