Contact Us:

670 Lafayette Ave, Brooklyn,
NY 11216

+1 800 966 4564
+1 800 9667 4558

Justin Tadlock
It feels like the end of an era. Last week, core contributors merged a patch that removed PHP variables named $pee and $tinkle from the WordPress codebase.
Yes, the software that powers 43% of the web has pee-pee jokes in its code.
I know how it sounds. I felt silly writing that sentence.
My job as a writer for WP Tavern affords me the luxury of taking creative license with words every now and again. However, it is a rare treat to write about pee-pee jokes. The chance to do so will not likely come around again. While I could pull out a few doozies from childhood, I promise to remain as professional as possible, given the subject matter.
The vast majority of users are likely unaware of this joke unless they enjoy trawling through the 6,000+ lines of code in /wp-includes/formatting.php. There is a good chance that any developer who has looked up the wpautop() function has stumbled upon it.
Reading through the code can garner a chuckle from a few, but it is a momentary amusement. The problem has always been confusing variable names. In programming, clarity should be favored above all else.
What is a $pee, exactly? It is text. Therefore, $text makes sense as a variable name, which is one of recent code changes. Other modifications include:
That complex wpautop() function and its 150+ lines of code start making a bit more sense when things are named for clarity.
For the historical record: $pee was first seen in the WordPress codebase in 2003. $tinkle did not make an appearance until five years later.
Developer Rico Moorman asked for the problematic code to be changed in a ticket in 2013. There was some movement to replace the variable names at first. However, after several lead developers stepped in, the idea was shot down. The arguments against the change leaned on keeping the spirit of WordPress, its humor, and its history alive.
However, 2022 is not 2013. The world has changed since the ticket was first opened. While it still has miles to go to be the all-inclusive community it can be, the WordPress space is seemingly more open to checking itself on language issues today.
In 2020, when many in the worldwide developer community switched their default Git repos from “master” to “main,” WordPress followed suit. And, it managed to keep a bit of the charm of its SVN roots by using “trunk” instead.
In 2018, contributors changed text in the Hello Dolly plugin that was degrading to women, especially out of context. The plugin ships with WordPress and randomly displays a single line from Louis Armstrong’s “Hello, Dolly!” in the admin header.
The two offending lines were:
Along with some other trivial text changes, the former was removed altogether, and the latter was replaced with “Have a little faith in me, fellas.”
The world changes over time. Language evolves, and what may have been acceptable in years past will not always be so in the future.
Some lead developers may have been OK with the code in 2013. However, the community should never be afraid to reevaluate past stances once in a while. Maybe it was time to ditch the fine art of middle-school jokes in favor of clear and readable code.
Miriam Schwab renewed the discussion via the Post Status Slack chat in December 2021. The general sense from those in the conversation seemed to agree that it was not necessarily offensive but immature. Most of all, it did not have a place in modern WordPress. A team member of Schwab’s had found the code and also renewed the Trac ticket discussion.
During this go-round, there was no pushback. It was simply time to say farewell to a part of the platform’s history.
In this instance, WordPress has not lost any of its personality. Plus ,the variable changes will allow more developers to grasp what is happening in the code.
This does mean that WordPress has a vacancy for at least one new joke or Easter egg. I am still a little salty about losing access to the Matrix. But, it never hurts to mix it up once in a while. WordPress’s in-jokes should continue maturing along with the software.
Anyone willing to modify the code behind wpautop must be a real whiz. I’d be too afraid of introducing a data leak or something like that. Cheers to the developer! You’d think we could spend a penny and better support some of these volunteers. Relieved it was just a simple change to make things more clear. 🙂
A real whiz and a data leak 😅
I am genuinely curious what isn’t inclusive about pee or tinkle?
If anything the variables were just old & immature and this is more professional for a more professional CMS.
I would argue that it could create an additional barrier to non-native English speakers. The variables were already a problem because they didn’t represent the data itself. Then, you throw in childhood words that may not be readily known to all contributors, it could make it even harder to grok what’s going on.
In-ticket and elsewhere, others have said they were not comfortable with the terms.
Well, it’s problematic in that particular function because … one slip and you’re-in trouble.
Me and my coworker who came across the code really appreciated how understanding and respectful everyone was about the issue. Yeah, it’s not the end of the world to have code like this, but it can definitely make people uncomfortable, which is unnecessary. My coworker’s perspective was one of fresh eyes since she doesn’t have all the history with WP that I have. She put it really well: she’s in the beginning of her journey with WP and coming across this type of code did not make her feel comfortable or included.
Thank you to all those involved who respectfully accepted the feedback and quickly implemented the changes! We were all so touched and it was a reminder of how kind and empathetic our community is ❤️
I honestly want to know, how is your co-worker (or anyone else) not included because of the word pee? There are a million ways to say doing #1 or #2. All humans do both. It’s a bodily function.
I’ve seen the $pee variable in the past and I honestly never related it to
. I just never understood why they would call it ‘pee’.
More inclusive ánd better understandable. Two birds, one stone.
“pee” is the name/spelling of the letter P in English. More than one pee is “pees”. Since this function wraps text in one or more HTML p tags, the variable name(s) (pee and pees) referenced the text that needed to be split up and wrapped in p tags.
Really, it’s the word “tinkle” that was the joke, and probably this could have been resolved by just removing that word. Without that, every reference of “pee” is above board, unless someone chooses to interpret it as urine. For posterity, the use of “tinkle” in the context of the code was referencing a part of multiple pees after being split.
That particular use has to do with processing plain text and turning it into HTML paragraphs… by adding the P tags around it.
Glad to see the change. Now if we could just get rid of Hello Dolly all together…
Hello Dolly is the hill I am willing to die on. 🙂
Seriously, I like that we include a simple plugin like that that can also be a little fun. I wouldn’t mind getting rid of it, but I’d want to replace it with something else.
For example, I think a cool default plugin would be a randomized translation of “Howdy, Justin Tadlock” in the toolbar. That way, everyone can share in all the languages WordPress is available in.
I made a Hello Spock fork. (Star Trek not the Doctor).
The only good reason to change this is that it’s not very clear what the variable means exactly. Children who speak French are always embarrassed when they meet the term “bit” as it’s very (very) close to a word designating the sexual male organ. So, what is the best here : speaking French people should find another term than “bit” ? Or the entire developers community should change the term “bit” so French speaking women won’t be embarrassed ?
Still not as bad as capital P, dangit.
wp_cockneyreplace should be renamed.
Why? Cockney is a real thing. It’s pretty close to what we use the variable for, and realistically, that’s a global variable. Difficult to change or eliminate that.
Yes. Cockney is a real thing. It is the dialect of British English as spoken by a real Cockney person.
So what then is wp_cockneyreplace? Some kind of final solution for East end Londoners? And people consider that $pee is non-inclusive.
I looked at what the function does, thinking purely of the language aspect – and reflecting that it must be pretty clever to replace, say, plates by feet. That would be dealing with Cockney.
But no, it doesn’t.
What it’s actually doing is dealing with contractions and more specifically contractions with a leading apostrophe.
wp_contractionsreplace would describe what it does.
I am aware of what cockney is but I agree with renaming it.
I’ve spent a lot of my time already looking at exclusive language and I’m not sure where this falls into the category. It’s not being insulting to Cockney people (my own grandmother was Cockney), but rather tying this to dealing with contractions, in a similar method of Cockney Rhyming Slang.
Having said all that, it’s a bit of a stretch to relate the two together and, as a lot of people simply won’t understand the reference, it would probably be better if it was named something more obvious. However, I’d see this is pretty low on the urgency list.
I am not the most politically correct person but I don’t offend.
How does a bodily function that almost 8 billion people do 1-3 times a day make people not be included?
There are a million ways to say #1 and #2. I grew up with #1 and #2. Now repeat that in every other languages.
#1 is front, #2 is in the back. In case any of you are wondering.
Just mentioning Pee is not bad language. If you are saying someone who has to sit to pee instead of standing up is wrong and can’t help with WordPress…or the other way around……then yes, that could be non-inclusive.
Though, English is not my first language and I have lived in Canada for 30-ish years…I never used tinkle. I said pee.
What is next…poop? burping? farting? Apparently some people say belching. I use burping. I honestly do not the difference.
What if I create a plugin that shows a daily photo of my yellow snow drawings. It is easier for some people than others to do that.
Having $pee on the code does not prevent you or anyone else from participating.
I personally don’t care what you call bodily functions, call them whatever you want.
I would sort of understand if someone came with a MAGA hat to a WordCamp and you are not a Trump supporter.
I would understand if you are at a WordCamp event and someone comes wearing a hat or/and t-shirt with a nazi symbol or any other racist symbol.
However, $pee, I would giggle at it and if I would of founded…I would of tweeted about it.
it isn’t like there is $(racist-word-or-symbol-here).
It is just $pee
Please be aware that I am entitled to an opinion, you are also entitled to no agree with my opinion. However you do not have the right to “cancel” me, like I have no right to “cancel” you because you disagreed with me.
When the discussion came up in the Post Status slack, I was the person who asked for the ticket to be reopened to be committed during the WordPress 6.0 cycle.
To me, it was a no-brainier and nothing to do with political correctness: some badly named variables based on an in-joke upset someone. With a few minutes work the purpose of the variables would become clearer and no one would be upset.
I see no difference between this commit and an earlier one I made to remove an in-joke from a comment and replace it with something clearer. I guess the earlier commit wasn’t worth a discussion because the joke didn’t relate to bodily functions.
I guess the earlier commit wasn’t worth a discussion because the joke didn’t relate to bodily functions.
If I had known about that one, I might have given it a quick mention. Probably not worthy of its own headline, though.
I do agree with you, and keeping little touches throughout the project is important to me. This isn’t one of those little touches that I really care about though. It’s kind of irrelevant to modern WordPress. The autop code will always be with us, but it’s largely a relic, so preserving it doesn’t matter that much. IMO.
What? Seriously?
Ahh, I remember when it was mentioned here that I’d been working on some changes to exclusive language within WordPress (blacklist to blocklist – remember that?). I’ve learnt that not everybody appreciates these kinds of changes, however well-meaning. But I do applaud what’s been done here. I’m sure these aren’t the last changes we’ll see of this type (those comments in the WordPress code are ripe for improvement!)
Your email address will not be published.





document.getElementById( “ak_js_1” ).setAttribute( “value”, ( new Date() ).getTime() );
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Enter your email address to subscribe to this blog and receive notifications of new posts by email.


WordPress Tavern is a website about all things WordPress. We cover news and events, write plugin and theme reviews, and talk about key issues within the WordPress ecosystem…
© All Rights Reserved. Powered by WordPress, hosted by Pressable

source

Leave a comment

Your email address will not be published.