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:
- $pee_parts to $text_parts
- $last_pee to $last_part
- $pees to $paragraphs
- $tinkle to $paragraph
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:
- “Find her an empty lap, fellas”
- “Find her a vacant knee, fellas”
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.