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

WordPress Trac noreply at wordpress.org
Tue May 31 17:54:35 UTC 2022


#55883: Reverse wrapping of `apply_shortcodes()` and `do_shortcode()`
----------------------------+-----------------------------
 Reporter:  SergeyBiryukov  |      Owner:  (none)
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Shortcodes      |    Version:
 Severity:  normal          |   Keywords:  2nd-opinion
  Focuses:                  |
----------------------------+-----------------------------
 Background: #37422, #55852.

 In WordPress 5.4,
 [https://make.wordpress.org/core/2020/02/13/wordpress-5-4-introduces-
 apply-shortcodes-as-an-alias-for-do-shortcode/ apply_shortcodes() was
 added as an alias for do_shortcode()] for better semantics. It aligns more
 with `apply_filters()` and the semantics of applying filters to the input
 and returning a result, rather than performing an action and outputting to
 the current buffer.

 Since we've revisited `sanitize_url()` and `esc_url_raw()` in [53452], I
 think it's time to consider doing the same here. Should we make
 `apply_shortcodes()` the recommended function, instead of
 `do_shortcode()`?

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


More information about the wp-trac mailing list