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

WordPress Trac noreply at wordpress.org
Tue Sep 27 11:40:29 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:  has-patch 2nd-opinion revert  |     Focuses:
------------------------------------------+-----------------------

Comment (by TobiasBg):

 I agree that reverting this is the proper decision.

 While the initial idea of introducing the alias and potentially
 considering deprecating `do_shortcode()` if the alias gained enough
 traction, was definitely worthwhile, the problem is that [54278] will
 always be needed:
 If Core were to change `add_filter( 'the_content', 'do_shortcode', 11 );`
 to the alias, there would be an immediate back-compat break. First
 deprecating `do_shortcode()` (with a proper `_deprecated_function()` call
 in  it) would mean that Core itself would be triggering these warnings.
 Soft-deprecating `do_shortcode()` without a `_deprecated_function()` call
 (basically the status quo after the revert, and from wording of initial
 commit messages and the 5.4 dev note) has not resulted in widespread use
 of the alias (see azaozz's posted links).

 Due to there not being a feasible path to fully switching to a new
 function name, the rich history and widespread use of `do_shortcode()`,
 the low use of `apply_shortcodes()`, I would therefore actually suggest to
 deprecate `apply_shortcodes()` again. There's no need to keep a rarely
 used alias that Core itself will not be able to use and that plugin
 developers have not started to use in 6 or 7 WP releases. I agree with
 azaozz that this was an experiment that simply has shown to be
 unsuccessful, due to lack of user adoption and (only now) brought-up BC
 concerns.

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


More information about the wp-trac mailing list