[wp-trac] [WordPress Trac] #46743: A way to detect whether the current theme supports wp_body_open()

WordPress Trac noreply at wordpress.org
Tue Apr 23 22:20:22 UTC 2019


#46743: A way to detect whether the current theme supports wp_body_open()
-----------------------------------------+---------------------
 Reporter:  SergeyBiryukov               |       Owner:  (none)
     Type:  defect (bug)                 |      Status:  new
 Priority:  high                         |   Milestone:  5.2
Component:  Themes                       |     Version:  trunk
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+---------------------

Comment (by azaozz):

 It seems like plugins would be able to add their hook to the wp_body_open
 action, but leave their current practice in place, and check did_action(
 'wp_body_open' ) to decide if they need to fall back to their current
 practice.

 This makes the most sense imho. Plugins will need to keep their existing
 code for themes that don't have `wp_body_open()` and can decide whether to
 run it by looking at `did_action( 'wp_body_open' )`.

 @SergeyBiryukov @johnbillion perhaps we can add some more docs describing
 this and close the ticket?

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


More information about the wp-trac mailing list