[wp-trac] [WordPress Trac] #12563: New action on body open
WordPress Trac
noreply at wordpress.org
Wed Sep 12 20:46:30 UTC 2018
#12563: New action on body open
---------------------------+--------------------------
Reporter: joostdevalk | Owner: joostdevalk
Type: enhancement | Status: reopened
Priority: normal | Milestone: 5.0
Component: Bundled Theme | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch | Focuses: template
---------------------------+--------------------------
Comment (by westonruter):
How would we the plethora of existing themes to add this new template tag?
Should we should a `_doing_it_wrong()` if the `wp_body_open`action never
was triggered in the rendering of a template? So essentially:
{{{#!php
<?php
add_action( 'wp_footer', function() {
if ( ! did_action( 'wp_body_open' ) ) {
_doing_it_wrong( 'wp_body_open', __( 'Missing wp_body_open() call
after <body>' ), '4.9.9' );
}
} );
}}}
I suppose that could be done as part of a plugin that relies on
`wp_body_open()` as well.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12563#comment:47>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list