Merged in release/release-1.09 (pull request #10)
Release/release 1.09 * Install missing plugins * rs set to 1 * rebase pantheon for aws * rebase pantheon for aws * prod config change * prod config change * fix campaing issue * revert Approved-by: Jay Sharma
This commit is contained in:
committed by
Jay Sharma
parent
779393381f
commit
22f10a9edd
@@ -518,12 +518,12 @@ function _remove_theme_attribute_from_template_part_block( &$block ) {
|
||||
*/
|
||||
function _build_block_template_result_from_file( $template_file, $template_type ) {
|
||||
$default_template_types = get_default_block_template_types();
|
||||
$template_content = file_get_contents( $template_file['path'] );
|
||||
$theme = get_stylesheet();
|
||||
|
||||
$template = new WP_Block_Template();
|
||||
$template->id = $theme . '//' . $template_file['slug'];
|
||||
$template->theme = $theme;
|
||||
$template->content = file_get_contents( $template_file['path'] );
|
||||
$template->slug = $template_file['slug'];
|
||||
$template->source = 'theme';
|
||||
$template->type = $template_type;
|
||||
@@ -554,7 +554,7 @@ function _build_block_template_result_from_file( $template_file, $template_type
|
||||
$before_block_visitor = make_before_block_visitor( $hooked_blocks, $template );
|
||||
$after_block_visitor = make_after_block_visitor( $hooked_blocks, $template );
|
||||
}
|
||||
$blocks = parse_blocks( $template->content );
|
||||
$blocks = parse_blocks( $template_content );
|
||||
$template->content = traverse_and_serialize_blocks( $blocks, $before_block_visitor, $after_block_visitor );
|
||||
|
||||
return $template;
|
||||
|
||||
Reference in New Issue
Block a user