[wp-trac] [WordPress Trac] #43041: Rename the capital_P_dangit function
WordPress Trac
noreply at wordpress.org
Fri Oct 12 13:34:06 UTC 2018
#43041: Rename the capital_P_dangit function
-------------------------+-------------------------------
Reporter: danieltj | Owner: jrf
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.1
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: coding-standards
-------------------------+-------------------------------
Changes (by johnbillion):
* keywords: has-patch commit => has-patch
* status: assigned => closed
* resolution: => fixed
* milestone: 5.0 => 5.1
Old description:
> I'm not too bothered about the capital_P_dangit function in terms of what
> it does. Correcting Wordpress to WordPress is fine by me. Capitalise the
> `P` and it never worries you.
>
> My problem with this function is the name and documentation of it. Taken
> from a 4.9.1 install:
>
> '''''wp-includes/formatting.php, line 4805''''':
> {{{
> Forever eliminate "Wordpress" from the planet (or at least the little bit
> we can influence).
>
> Violating our coding standards for a good function name.
> }}}
>
> As funny as the name might seem the first time around, violating the
> coding standards doesn't seem like something that should live on in core
> for the sake of a gag. I'd like to propose that `capital_P_dangit` is
> deprecated and used as a wrapper function for a newly named
> `wp_brand_awareness`.
>
> I personally think `wp_brand_awareness` is a better name, fits in with
> coding standards and still does what it's set out to do, but in a more
> 'WordPress-esque' way. I'd also suggest updating the documentation to
> remove the comment about `from our planet` and `for a gag` lines too.
New description:
I'm not too bothered about the capital_P_dangit function in terms of what
it does. Correcting WordPress to WordPress is fine by me. Capitalise the
`P` and it never worries you.
My problem with this function is the name and documentation of it. Taken
from a 4.9.1 install:
'''''wp-includes/formatting.php, line 4805''''':
{{{
Forever eliminate "Wordpress" from the planet (or at least the little bit
we can influence).
Violating our coding standards for a good function name.
}}}
As funny as the name might seem the first time around, violating the
coding standards doesn't seem like something that should live on in core
for the sake of a gag. I'd like to propose that `capital_P_dangit` is
deprecated and used as a wrapper function for a newly named
`wp_brand_awareness`.
I personally think `wp_brand_awareness` is a better name, fits in with
coding standards and still does what it's set out to do, but in a more
'WordPress-esque' way. I'd also suggest updating the documentation to
remove the comment about `from our planet` and `for a gag` lines too.
--
Comment:
I agree with Pento here. Renaming this function introduces backwards
compatibility issues and is a breaking change. Deprecating it in favour of
a better named function is more effort than it's worth.
Closing as fixed for 5.1 due to the sniffer comments introduced in
[42429].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43041#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list