do_action( 'render_block_core_template_part_post',
$template_part_id,
$attributes,
$template_part_post,
$content );
} else { $template_part_file_path = '';
// Else, if the template part was provided by the active theme,
// render the corresponding file content.
if ( 0 ===
validate_file( $attributes['slug'
] ) ) { $block_template_file =
_get_block_template_file( 'wp_template_part',
$attributes['slug'
] );
if ( $block_template_file ) { $template_part_file_path =
$block_template_file['path'
];
$content =
(string) file_get_contents( $template_part_file_path );
$content = '' !==
$content ?
_inject_theme_attribute_in_block_template_content( $content ) : '';
if ( isset( $block_template_file['area'
] ) ) { $area =
$block_template_file['area'
];
} } } if ( '' !==
$content && null !==
$content ) { /**
* Fires when a block template part is loaded from a template part in the theme.
*
* @since 5.9.0
*
* @param string $template_part_id The requested template part namespaced to the theme.
* @param array $attributes The block attributes.
* @param string $template_part_file_path Absolute path to the template path.
* @param string $content The template part content.
*/