Upgarded to 4.17.4

This commit is contained in:
2022-06-23 13:17:18 +01:00
parent 80f1e87db9
commit a04fb0c7af
404 changed files with 54683 additions and 4417 deletions

View File

@ -1,24 +1,38 @@
<?php
/**
* Modified block template canvas file to render Visual and Theme Builder.
* Modified block template canvas file to render Visual and Theme Builder layouts.
*
* @since 4.9.8
* @since 4.14.7 Remove block template HTML to only display TB Template.
*
* This block template canvas should be used only when TB Template (Header/Footer/Body)
* is active on current page. Otherwise, we have to use default Block Editor template.
*
* @see {ET_Builder_Block_Templates::get_custom_query_template}
*
* @package Divi
*/
/**
* Get the template HTML.
* This needs to run before <head> so that blocks can add scripts and styles in wp_head().
*/
$template_html = get_the_block_template_html();
// Disable deprecated warning temporarily because we're going to use default header.
add_filter( 'deprecated_file_trigger_error', '__return_false' );
get_header();
remove_filter( 'deprecated_file_trigger_error', '__return_false' );
echo $template_html; // phpcs:ignore WordPress.Security.EscapeOutput -- Already escaped.
if ( is_singular() && have_posts() ) {
// If current page is singular, render the content normally.
// Template type: frontpage, home (page), page, paged, privacypolicy, single, singular.
while ( have_posts() ) {
the_post();
the_content();
}
} else {
/**
* Fires the main content on block template canvas.
*
* Use this hook to display custom output for non singular page.
*
* @since 4.14.7
*
* Template type: 404, archive, author, category, date, home (non-page), index, search, tag, taxonomy.
*/
do_action( 'et_block_template_canvas_main_content' );
}
// Disable deprecated warning temporarily because we're going to use default footer.
add_filter( 'deprecated_file_trigger_error', '__return_false' );
get_footer();
remove_filter( 'deprecated_file_trigger_error', '__return_false' );