Skip to content

Commit

Permalink
Blockbase: Change references to gutenberg_block_template_part, to blo…
Browse files Browse the repository at this point in the history
…ck_template_part (#5031)

* Blockbase: Change references to gutenberg_block_template_part, to block_template_part

* use an if statement to determine which function to call
  • Loading branch information
scruffian authored Nov 17, 2021
1 parent e187d1d commit 2bd5b5e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion blockbase/footer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<footer class="wp-block-template-part site-footer-container">
<?php
echo gutenberg_block_template_part( 'footer' );
if ( function_exists( 'block_template_part' ) ) {
echo block_template_part( 'footer' );
} else {
echo gutenberg_block_template_part( 'footer' );
}
?>
</div>
</footer>
Expand Down
6 changes: 5 additions & 1 deletion blockbase/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
<div class="wp-site-blocks">
<header class="wp-block-template-part">
<?php
echo gutenberg_block_template_part( 'header' );
if ( function_exists( 'block_template_part' ) ) {
echo block_template_part( 'header' );
} else {
echo gutenberg_block_template_part( 'header' );
}
?>
</header>
6 changes: 5 additions & 1 deletion blockbase/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
get_header();

// the query
echo gutenberg_block_template_part( 'index' );
if ( function_exists( 'block_template_part' ) ) {
echo block_template_part( 'index' );
} else {
echo gutenberg_block_template_part( 'index' );
}

get_footer();

0 comments on commit 2bd5b5e

Please sign in to comment.