wpseek.com WordPress开发者和主题制作者的搜索引擎 功能 过滤器 动作 常量 XINGTwitterFacebookDelicious 通用信息 源码 block_template_part › WordPress FunctionSince5.9.0已弃用n/a› block_template_part ( $part )参数:(string) $part The block template part to print. Either 'header' or 'footer'.Required: Yes定义在:wp-includes/block-template-utils.php , line 1228 文档:developer.wordpress.org / block_template_partPrints a block template part.Related Functions: _get_block_templates_paths, get_template_part, get_block_template, render_block_core_template_part, _filter_block_template_part_area 源码 function block_template_part( $part ) { $template_part = get_block_template( get_stylesheet() . '//' . $part, 'wp_template_part' ); if ( ! $template_part || empty( $template_part->content ) ) { return; } echo do_blocks( $template_part->content ); }