WordPress.org

Make WordPress Core

Opened 8 years ago

Last modified 14 hours ago

#25615 accepted enhancement

Improve wording for wpautop code

Reported by: ricomoorman Owned by: hellofromTonya
Milestone: 6.0 Priority: normal
Severity: trivial Version: 0.71
Component: Formatting Keywords: wpautop
Focuses: Cc:

Description

The code for the functions wpautop and shortcode_unautop contains rather inappropriate variable names and wording.

See the attached patch for the following adjustments/corrections:

  • $pee changed to $text
  • $pee_parts changed to $text_parts
  • $pee_part changed to $text_part
  • $last_pee changed to $last_part
  • $tinkle changed to $paragraph
  • rephrased comments containing the word pee

Attachments (1)

correct-wording-for-wpautop.patch (6.8 KB) - added by ricomoorman 8 years ago.

Download all attachments as: .zip

Change History (25)

#1 @jeremyfelt
8 years ago

It should be noted that $pee has been around since the creation of wpautop() in [13] when the function still lived in b2functions.php. So old!

$tinkle was introduced 5 years later in [9255].

#2 follow-up: @Viper007Bond
8 years ago

$content would probably be better than $text in the WordPress context. It's what we use elsewhere.

#3 in reply to: ↑ 2 ; follow-ups: @ricomoorman
8 years ago

Replying to Viper007Bond:

$content would probably be better than $text in the WordPress context. It's what we use elsewhere.

Should I modify the patch and replace the already attached one or will the devs around here take care of that?

Last edited 8 years ago by ricomoorman (previous) (diff)

#4 in reply to: ↑ 3 @Viper007Bond
8 years ago

Replying to ricomoorman:

Should I modify the patch and replace the already attached one or will the devs around here take care of that?

I'm not sure, and the change is just my personal opinion.

#5 in reply to: ↑ 3 @rmccue
8 years ago

Replying to ricomoorman:

Should I modify the patch and replace the already attached one or will the devs around here take care of that?

If you do upload a new patch, please don't replace the existing one. :)

#6 @SergeyBiryukov
8 years ago

  • Version changed from trunk to 3.6

#7 @ricomoorman
8 years ago

This also affects the current version 3.7.1.
Furthermore is there a way to get this reviewed and merged? Is there something else I have to do?

#8 @SergeyBiryukov
8 years ago

  • Keywords 3.9-early added
  • Milestone changed from Awaiting Review to Future Release
  • Version changed from 3.6 to 1.2

Version number indicates the earliest affected version. Looks like it's 0.71 here, but 1.2 is the earliest version available in the dropdown.

As for $text vs $content, we use $text in wptexturize(), balanceTags(), make_clickable(), and some other functions. correct-wording-for-wpautop.patch brings some consistency to wpautop() and shortcode_unautop(). Looks good to me.

#9 @rmccue
8 years ago

  • Version changed from 1.2 to 0.71

#10 @Hanni
8 years ago

  • Cc h@… added

#11 @westi
8 years ago

Personally I don't think the variable names are significantly inappropriate and it seems a shame to remove the humour from the code.

#12 @azaozz
8 years ago

IMHO the only acceptable change here is to rename all to $alot! See #13237.

#13 @azaozz
8 years ago

  • Owner set to Alot
  • Status changed from new to assigned

#14 @ricomoorman
8 years ago

I hope you don't get me wrong here. This is a serious patch request and no joke. I came across this piece of code several years ago and was surprised that it was still there when I was looking at the Wordpress codebase again a few weeks ago.

To be honest, I do think variable names like this do not belong here and are inappropriate. Variable names should reflect what the variable is about.

#15 @wonderboymusic
8 years ago

  • Priority changed from normal to lowest
  • Severity changed from normal to trivial

#16 @ricomoorman
8 years ago

Is there something wrong with my request?

This was really meant as an improvement as I find it rather unprofessional to have things like that within a codebase.

#17 @wonderboymusic
8 years ago

Of the 1000s of tickets open in Trac, this is in the running for most trivial

#18 @helen
8 years ago

There is nothing specifically wrong with your request, but you are seeing that lead developers do not agree with you.

I agree with westi that it would be a shame to remove developer-facing humor/humour. We talk about the soul of WordPress sometimes - I guess this falls in the camp who hate that the user dropdown says "Howdy".

#19 @nacin
8 years ago

  • Keywords wpautop added

#20 @ericlewis
7 years ago

  • Milestone Future Release deleted
  • Resolution set to maybelater
  • Status changed from assigned to closed

Closing until a committer ever wants to do this.

#21 @ericlewis
7 years ago

  • Keywords has-patch 3.9-early removed

#22 @tzipporahwitty
41 hours ago

  • Resolution maybelater deleted
  • Status changed from closed to reopened

Reopening this at @peterwilsoncc 's suggestion following the recent discussion on Post Status. I am the one that @miriamschwab referred to noticing this code and flagging it.

#23 @peterwilsoncc
31 hours ago

  • Milestone set to 6.0
  • Priority changed from lowest to normal

As WordPress has grown, the tolerance for in-jokes and other developer facing humour has decreased. I am moving this to the 6.0 milestone to action during the next cycle.

#24 @hellofromTonya
14 hours ago

  • Owner changed from Alot to hellofromTonya
  • Status changed from reopened to accepted

Thank you @tzipporahwitty for reopening this ticket, Miriam Schwab for raising the discussion on Post Status, and @peterwilsoncc for moving it into the 6.0.

I see the intended humor of the original code. As Peter points out, WordPress has significantly grown since this code was introduced.

IMO sourcecode should be inclusive and welcoming. It exists to power the web. But the human side of code exists to be read, explored, and improved by a world of diverse contributors. Terminology used matter. These terms are the human readable language that can (and in my opinion should) empower people to explore, learn, grow, and contribute to make it better.

Contributors are expressing that they are not comfortable with the human readable language used.

Terminology of the past is being (and has been) revisited to transform words used into language that is inclusive and welcoming while retaining meaning for readability. The terms noted in this ticket fall into that same effort IMO.

Changing the ownership to me to shepherd it forward to land in 6.0.

Note: See TracTickets for help on using tickets.