Skip to content

Commit

Permalink
Merge pull request #1735 from INN/1698-support-for-wp_body_open-hook
Browse files Browse the repository at this point in the history
Added `wp_body_open` hook under opening body tag
  • Loading branch information
Josh Darby committed Jul 9, 2019
2 parents e7e9fa5 + cff413e commit 67b4ded
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ though this project doesn't succeed in adhering to [Semantic Versioning](https:/
- Co-Authors Plus profile field descriptions no longer contain escaped HTML. [Pull request #1726](https://github.com/INN/largo/pull/1726) for [issue #1720](https://github.com/INN/largo/issues/1720).
- Fixes multiple `Undefined variable: post` errors in `homepage/templates/top-stories.php`. [Pull request #1728](https://github.com/INN/largo/pull/1728) for [issue #1723](https://github.com/INN/largo/issues/1723).
- Fixes an issue where the widget title wasn't displaying in the Largo Image Widget, due to trying to use the `$title` variable which was removed when we stopped using `extract` in [pull request #1565](https://github.com/INN/largo/pull/1565/). [Pull request #]() for [issue #1717](https://github.com/INN/largo/issues/1717).
- Added support for `wp_body_open` hook below opening body tag. [Pull request #1735](https://github.com/INN/largo/pull/1735) for [issue #1698](https://github.com/INN/largo/issues/1698).

## [Largo 0.6.3](https://github.com/INN/largo/compare/v0.6.2...v0.6.3)

Expand Down
15 changes: 15 additions & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@

<body <?php body_class(); ?>>

<?php

/**
* Fires right after the opening body tag.
*
* @since 0.6.4
*/
if ( function_exists( 'wp_body_open' ) ) {
wp_body_open();
} else {
do_action( 'wp_body_open' );
}

?>

<div id="top"></div>

<?php
Expand Down

0 comments on commit 67b4ded

Please sign in to comment.