wp/wp-includes/blocks/template-part.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
equal deleted inserted replaced
21:48c4eec2b7e6 22:8c2e4d02f4ef
    68 			// Else, if the template part was provided by the active theme,
    68 			// Else, if the template part was provided by the active theme,
    69 			// render the corresponding file content.
    69 			// render the corresponding file content.
    70 			if ( 0 === validate_file( $attributes['slug'] ) ) {
    70 			if ( 0 === validate_file( $attributes['slug'] ) ) {
    71 				$block_template = get_block_file_template( $template_part_id, 'wp_template_part' );
    71 				$block_template = get_block_file_template( $template_part_id, 'wp_template_part' );
    72 
    72 
    73 				$content = $block_template->content;
    73 				if ( isset( $block_template->content ) ) {
       
    74 					$content = $block_template->content;
       
    75 				}
    74 				if ( isset( $block_template->area ) ) {
    76 				if ( isset( $block_template->area ) ) {
    75 					$area = $block_template->area;
    77 					$area = $block_template->area;
    76 				}
    78 				}
    77 
    79 
    78 				// Needed for the `render_block_core_template_part_file` and `render_block_core_template_part_none` actions below.
    80 				// Needed for the `render_block_core_template_part_file` and `render_block_core_template_part_none` actions below.