Make WordPress Core

Ticket #54917: 54917.diff

File 54917.diff, 593 bytes (added by kapilpaul, 3 years ago)

Created patch

  • src/wp-includes/block-template.php

    diff --git a/src/wp-includes/block-template.php b/src/wp-includes/block-template.php
    index de266c04f2..97ab4044ef 100644
    a b function _add_template_loader_filters() { 
    4646 * @return string The path to the Full Site Editing template canvas file, or the fallback PHP template.
    4747 */
    4848function locate_block_template( $template, $type, array $templates ) {
     49        if ( ! current_theme_supports( 'block-templates' ) ) {
     50                return $template;
     51        }
     52
    4953        global $_wp_current_template_content;
    5054
    5155        if ( $template ) {