render_block_core_template_part_post

动作钩子
do_action( 'render_block_core_template_part_post', $template_part_id, $attributes, $template_part_post, $content )
参数
  • (string) $template_part_id The requested template part namespaced to the theme.
    Required:
  • (array) $attributes The block attributes.
    Required:
  • (WP_Post) $template_part_post The template part post object.
    Required:
  • (string) $content The template part content.
    Required:
定义位置
相关勾子
render_block_core_template_part_nonerender_block_core_template_part_filepre_get_block_templatesrender_block_contextpre_get_block_file_template
相关方法
render_block_core_template_partrender_block_core_latest_postsregister_block_core_template_partrender_block_core_post_templateregister_block_core_latest_postsrender_block_core_comment_template
引入
5.9.0
弃用
-

render_block_core_template_part_post。这个过滤器钩子用于修改在渲染一个块时传递给核心模板部分的文章数据。这在你想添加额外的数据或在传递给模板之前修改文章数据的情况下很有用。

当一个区块模板部分从存储在数据库中的模板文章中加载时,会发生触发。

do_action( 'render_block_core_template_part_post', $template_part_id, $attributes, $template_part_post, $content );

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 19:32:59

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: