Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

💡 Add wp_body_open hook to included themes #239

Open
DangitRick opened this issue Oct 6, 2023 · 2 comments
Open

💡 Add wp_body_open hook to included themes #239

DangitRick opened this issue Oct 6, 2023 · 2 comments
Labels
status: needs triage This issue needs revision, splitting, or other gardening work type: feature request New feature or request

Comments

@DangitRick
Copy link
Contributor

Context

WordPress 5.2.0 introduced a new template hook, wp_body_open, which fires immediately after the opening body tag.

This hook can be useful for outputting custom content before any of a theme's body content starts to output.

As a default WordPress hook, though, it should be included so that plugins and tinkerers can take advantage of it just as they do wp_head and wp_footer.

The hook is described here: https://developer.wordpress.org/reference/hooks/wp_body_open/

Possible implemantion

No response

Possible Solution

Include <?php do_action( 'wp_body_open' ); ?> or similar after the opening body tag in each of the included themes.

Will you be able to help with the implementation?

This is a quick and simple thing that shouldn't cause anything to break, but I'd be willing to test. Not submitting a pull request myself because of how busy I'm going to be this month with work and preparing for a nursery for my upcoming baby. :-)

@DangitRick DangitRick added status: needs triage This issue needs revision, splitting, or other gardening work type: feature request New feature or request labels Oct 6, 2023
@ghost
Copy link

ghost commented Oct 6, 2023

I believe this wp_body_open() already exist for CP v1

@DangitRick
Copy link
Contributor Author

It does, yes, but the included themes don't make use of it. (I guess my example code could be simplified using <?php wp_body_open(); ?> after the body tag. )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: needs triage This issue needs revision, splitting, or other gardening work type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant