#25615 closed enhancement (fixed)
Improve wording for wpautop code
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.0 | Priority: | normal |
Severity: | trivial | Version: | 0.71 |
Component: | Formatting | Keywords: | wpautop has-unit-tests has-patch |
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 (44)
#2
follow-up:
↓ 3
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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
@
11 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".
#20
@
10 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.
#22
@
3 years 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
@
3 years 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
@
3 years 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.
This ticket was mentioned in PR #2215 on WordPress/wordpress-develop by peterwilsoncc.
3 years ago
#25
- Keywords has-patch added
#26
@
3 years ago
- Keywords has-patch removed
In the linked pull request:
- basic refresh to account for function changes since original report
- variable names use the original suggestions
- followed the suggestion of
$text
instead of$content
to keep the consistency identified in comment #8
Additionally, the JavaScript equivalents for both the classic and block editors appear to use text
, etc for variable names so don't need any changes as best I can tell.
This ticket was mentioned in PR #2226 on WordPress/wordpress-develop by ironprogrammer.
3 years ago
#27
- Keywords has-patch has-unit-tests added
Updates phpunit test names to reflect variable name updates originally proposed by @ricomoorman and later amended by @peterwilsoncc via https://github.com/WordPress/wordpress-develop/pull/2215.
This change is in conjunction with the above PR submitted by @peterwilsoncc.
#28
@
3 years ago
This is a companion update to this ticket. The update applies the proposed variable name changes to phpunit tests for wpautop
.
Please see ironprogrammer:25615-update-wpautop-test-names for details. Two test names use the old vernacular that is addressed by this ticket. The function names have been updated for clarity and consistency with this ticket.
#29
@
3 years ago
- Keywords has-patch removed
Removing has-patch
keyword. It was added automatically and unintentionally.
peterwilsoncc commented on PR #2226:
3 years ago
#30
Thanks for catching these @ironprogrammer
peterwilsoncc commented on PR #2226:
3 years ago
#31
Thanks for catching these @ironprogrammer
ironprogrammer commented on PR #2226:
3 years ago
#32
Merged in @peterwilsoncc's branch so we have a single PR to work from.
peterwilsoncc commented on PR #2215:
3 years ago
#34
Closing in favour of #2226 which includes some test updates
peterwilsoncc commented on PR #2226:
3 years ago
#35
Merged in @peterwilsoncc's branch so we have a single PR to work from.
Thanks Brian, I've closed my PR in favour of this one. I've also renamed this PR to indicate it now covers both the source code and related tests.
hellofromtonya commented on PR #2226:
3 years ago
#36
The PR looks good to me. But I have a thought.
In the Trac ticket, several folks voiced concerns about preserving developer humor and personality. The code was written originally in this concept, i.e. to be funny. What if a comment is added in the docblock that points folks to a link of the previous version?
Why? To serve as a bridge across all concerns voices for and against the pee pee version.
@peterwilsoncc @ironprogrammer what do you think?
peterwilsoncc commented on PR #2226:
3 years ago
#37
What if a comment is added in the docblock that points folks to a link of the previous version?
Why? To serve as a bridge across all concerns voices for and against the pee pee version.
I don't think there needs to be a link.
The concerns about developer facing humour were from a different era of WP so I think it's safe to assume the attitudes of the past may have been valid at the time but it's no longer the case.
hellofromtonya commented on PR #2226:
3 years ago
#38
Cool. Thanks @peterwilsoncc. With that, this PR is ready for commit.
hellofromtonya commented on PR #2226:
3 years ago
#39
Cool. Thanks @peterwilsoncc. With that, this PR is ready for commit.
hellofromtonya commented on PR #2226:
3 years ago
#41
Committed via https://core.trac.wordpress.org/changeset/52789.
hellofromtonya commented on PR #2226:
3 years ago
#42
Committed via https://core.trac.wordpress.org/changeset/52789.
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].