[wp-trac] [WordPress Trac] #43041: Rename the capital_P_dangit function

WordPress Trac noreply at wordpress.org
Mon Jan 8 08:56:48 UTC 2018


#43041: Rename the capital_P_dangit function
------------------------------+-----------------------------
 Reporter:  danieltj          |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:  4.9.1
 Severity:  normal            |   Keywords:
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43041>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list