Add support for wp_body_open

5.2 will introduce a new `wp_body_open()` function that is used to trigger a `wp_body_open` action. This action is intended to allow developers to inject code immediately following the opening `<body>` tag. Themes are encouraged to begin using this hook as soon as 5.2 is released.

See https://make.wordpress.org/core/2019/04/24/miscellaneous-developer-updates-in-5-2/
This commit is contained in:
IanDelMar 2019-05-01 19:03:52 +02:00 committed by GitHub
parent 02c6cf3484
commit 0e76b4008d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -23,7 +23,13 @@ $container = get_theme_mod( 'understrap_container_type' );
</head>
<body <?php body_class(); ?>>
<?php
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
} else {
do_action( 'wp_body_open' );
}
?>
<div class="site" id="page">
<!-- ******************* The Navbar Area ******************* -->