[wp-trac] [WordPress Trac] #46679: Themes: Add a shim for wp_body_open()

WordPress Trac noreply at wordpress.org
Thu Mar 28 13:37:23 UTC 2019


#46679: Themes: Add a shim for wp_body_open()
---------------------------+------------------------------
 Reporter:  pento          |       Owner:  adamsilverstein
     Type:  defect (bug)   |      Status:  assigned
 Priority:  normal         |   Milestone:  5.2
Component:  Bundled Theme  |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+------------------------------

Comment (by timph):

 Replying to [comment:3 johnbillion]:
 > What's the real purpose of the `wp_body_open()` wrapper function? It
 presents consistency with other functions such as `wp_head()` and
 `wp_footer()`, but would placing a direct call to `do_action(
 'wp_body_open' )` be so bad?

 I understand the consistency part, and agree with this. Just adding that
 `do_action( 'wp_body_open' )` is 100% more clear about what it actually
 does as well.  It's frustrating when you have to search through code just
 to figure out something is only a wrapper around an action.

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


More information about the wp-trac mailing list