Skip to content

Commit

Permalink
Translate: Call gp_head|footer() with global header/footer block.
Browse files Browse the repository at this point in the history
The block now only calls `wp_head|footer()`, and isn't aware of GlotPress, so these templates need to load things that are unique to GlotPress.

See WordPress/wporg-mu-plugins#78


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11435 74240141-8908-4e6f-9713-ba540dce6ec7
  • Loading branch information
iandunn committed Jan 12, 2022
1 parent 8ea6075 commit 0b78ea0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
echo do_blocks( '<!-- wp:wporg/global-footer /-->' );

// Intentionally calling this in addition to `wp_footer()` from the block. See `header.php` for details.
gp_footer();

} else {
require WPORGPATH . 'footer.php';
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@

if ( FEATURE_2021_GLOBAL_HEADER_FOOTER ) {
echo do_blocks( '<!-- wp:wporg/global-header /-->' );

/*
* Intentionally calling this in addition to `wp_head()` from the block. We need to output the global styles
* from Core, scripts for the Navigation and Global Header blocks, etc. Without those, the global header and
* footer won't work properly.
*
* This won't be necessary once GlotPress transitions to use standard WP themes.
* See https://github.com/GlotPress/GlotPress-WP/issues/8
*/
gp_head();

} else {
require WPORGPATH . 'header.php';
}
Expand Down

0 comments on commit 0b78ea0

Please sign in to comment.