WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#25615 closed enhancement (maybelater)

Improve wording for wpautop code

Reported by: ricomoorman Owned by: Alot
Milestone: Priority: lowest
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 (22)

#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 take care of that?

Version 0, edited 8 years ago by ricomoorman (next)

#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
Note: See TracTickets for help on using tickets.