mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
Bundled Theme: trigger a new wp_body_open action immediately after the opening body tag.
* Enables inserting (asynchronous) JavaScript right after the opening `body` tag. * Add a `wp_body_open` helper function that triggers the `wp_body_open` action. * Call `wp_body_open` in core themes immediately after the opening `body` tag. Props joostdevalk, valendesigns, nacin, saracup, jorbin, mikeschinkel, jonnybojangles, lgedeon, Willscrlt, Denis-de-Bernardy, lexiqueen, sky_76, welcher, westonruter, ramiy, joyously. Fixes #12563. git-svn-id: https://develop.svn.wordpress.org/trunk@45042 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2751,6 +2751,22 @@ function wp_footer() {
|
||||
do_action( 'wp_footer' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire the wp_body_open action.
|
||||
*
|
||||
* * See {@see 'wp_body_open'}.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*/
|
||||
function wp_body_open() {
|
||||
/**
|
||||
* Triggered after the opening <body> tag.
|
||||
*
|
||||
* @since 5.2.0
|
||||
*/
|
||||
do_action( 'wp_body_open' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the links to the general feeds.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user