[wp-trac] [WordPress Trac] #47032: Rename wp_body_open hook and function

WordPress Trac noreply at wordpress.org
Thu Apr 25 02:41:32 UTC 2019

#47032: Rename wp_body_open hook and function
 Reporter:  rilwis       |       Owner:  (none)
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  Themes       |     Version:  trunk
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:  template

Comment (by rilwis):

 Thanks for your comment, @pento!

 The WordPress hooks with `post_` or `pre_` unlikely match this context.
 They're used for internal actions, like before or after **doing
 something**. While in the front end, there's exclusively and clearly a
 **context** (HTML block). The hook tells more about the location than
 action. That's why the words `*_before`, `*_after`, `*_top`, `*_bottom`
 make sense.

 Also, this is **the first** hook in the front end for themes (except
 required `wp_head` and `wp_footer`), it will create a kind of standard for
 future hooks. I'm thinking about the hooks for content areas in Gutenberg
 Phase 2.

 For those reasons, I think it's a good time to start a naming convention

Ticket URL: <https://core.trac.wordpress.org/ticket/47032#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list