mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01: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. Built from https://develop.svn.wordpress.org/trunk@45042 git-svn-id: http://core.svn.wordpress.org/trunk@44851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9b15549b1c
commit
418afaa938
@ -73,6 +73,7 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="hfeed">
|
<div id="page" class="hfeed">
|
||||||
<header id="branding" role="banner">
|
<header id="branding" role="banner">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="hfeed site">
|
<div id="page" class="hfeed site">
|
||||||
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
|
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyfifteen' ); ?></a>
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="hfeed site">
|
<div id="page" class="hfeed site">
|
||||||
<?php if ( get_header_image() ) : ?>
|
<?php if ( get_header_image() ) : ?>
|
||||||
<div id="site-header">
|
<div id="site-header">
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="site">
|
<div id="page" class="site">
|
||||||
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentynineteen' ); ?></a>
|
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentynineteen' ); ?></a>
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="site">
|
<div id="page" class="site">
|
||||||
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
|
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentyseventeen' ); ?></a>
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="site">
|
<div id="page" class="site">
|
||||||
<div class="site-inner">
|
<div class="site-inner">
|
||||||
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentysixteen' ); ?></a>
|
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'twentysixteen' ); ?></a>
|
||||||
|
@ -60,6 +60,7 @@ if ( is_singular() && get_option( 'thread_comments' ) ) {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="wrapper" class="hfeed">
|
<div id="wrapper" class="hfeed">
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="masthead">
|
<div id="masthead">
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="hfeed site">
|
<div id="page" class="hfeed site">
|
||||||
<header id="masthead" class="site-header" role="banner">
|
<header id="masthead" class="site-header" role="banner">
|
||||||
<a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
<a class="home-link" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body <?php body_class(); ?>>
|
<body <?php body_class(); ?>>
|
||||||
|
<?php wp_body_open(); ?>
|
||||||
<div id="page" class="hfeed site">
|
<div id="page" class="hfeed site">
|
||||||
<header id="masthead" class="site-header" role="banner">
|
<header id="masthead" class="site-header" role="banner">
|
||||||
<hgroup>
|
<hgroup>
|
||||||
|
@ -2751,6 +2751,22 @@ function wp_footer() {
|
|||||||
do_action( '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.
|
* Display the links to the general feeds.
|
||||||
*
|
*
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.2-alpha-45041';
|
$wp_version = '5.2-alpha-45042';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user