[wp-trac] [WordPress Trac] #55883: Reverse wrapping of `apply_shortcodes()` and `do_shortcode()`

WordPress Trac noreply at wordpress.org
Thu Sep 22 18:43:14 UTC 2022


#55883: Reverse wrapping of `apply_shortcodes()` and `do_shortcode()`
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:  audrasjb
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.1
Component:  Shortcodes                           |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-docs has-patch add-to-field-   |     Focuses:
  guide 2nd-opinion                              |
-------------------------------------------------+-------------------------
Changes (by azaozz):

 * keywords:  needs-docs has-patch commit needs-dev-note add-to-field-guide
     => needs-docs has-patch add-to-field-guide 2nd-opinion
 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm sorry but I don't think this is a good change.

 Is `apply_shortcodes()` really that much better (in plain English) than
 `do_shortcode()`. Is it really worth it breaking all references to
 `do_shortcode` just for the sake of changing `do` with `apply`? I think
 not.

 `do_shortcode` has existed for many many years. It is referenced in a lot
 of places, online documentation, many posts, thousands of themes and
 plugins, many books, etc. Why would WordPress want to break all these
 references? It is the same as breaking links, brings a lot of confusion.

 I think it is a pretty bad idea to create all that confusion and broken
 references for such a minor benefit. A much better solution imho would be
 to update the docs, add as much content there as needed. That will serve
 all existing WP contributors and help all new contributors, and most
 importantly, will not break any links and references.

 Also I'm not sure if the `apply_shortcodes` alias was needed in the first
 place. Seems the adoption is pretty low? Also the meaning in plain English
 is so close that only way to classify it would be as "very minor
 enhancement". That alias probably just brings some confusion for new
 users.

 I'd like  propose that this is reverted and closed. This type of name
 changes is not worth the trouble and confusion they bring imho.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/55883#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list