#25615 closed enhancement (maybelater)
Improve wording for wpautop code
Reported by: |
|
Owned by: |
|
---|---|---|---|
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)
Change History (22)
#2
follow-up:
↓ 3
@
7 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:
↓ 4
↓ 5
@
7 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?
#4
in reply to:
↑ 3
@
7 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
@
7 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. :)
#7
@
7 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
@
7 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.
#11
@
7 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.
#14
@
7 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.
#16
@
7 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.
#18
@
7 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".
It should be noted that
$pee
has been around since the creation ofwpautop()
in [13] when the function still lived inb2functions.php
. So old!$tinkle
was introduced 5 years later in [9255].