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.

Hello, I am Arun Basil Lal. Thank you for reading!

I am a WordPress product developer and creator of Image Attributes Pro. I am passionate about solving problems and travelling the world.

Divi WordPress Theme - My Review

Divi WordPress Theme
Divi is a WordPress theme that web designers do not want you to know. It comes with a drag-and-drop theme builder. You can build beautiful looking unique websites without touching a line of code. Just choose from one of the many pre-made layouts, or pick elements and arrange them any way you like.

Divi is every WordPress developer's wet dream. Surprise your clients with neat responsive websites and have fun building them.

Divi comes from Elegant Themes. If you enjoy building websites, you *need* an Elegant Themes membership. 87 beautiful themes and 5 plugins for the cost of less than a candy-bar each!


Note: I am an avid user of Divi myself and this is a honest review. I wouldn't recommend something that I do not personally find amazing.

8 Comments.

  1. S.Pradeep Kumar says:

    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… 😛

  2. Gil Rutkowski says:

    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!

    • 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. Girish says:

    Arun,
    Nice to see you again IN ACTION

  4. Rhys says:

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

  5. mmmmmm says:

    i think WordPress 3.0 is better. 🙂

2 Pings / Trackbacks.

  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 […]

  2. […] Fix WordPress Capital P Dangit. What is it anyway? – Million Clues […]

Leave a Reply

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

*