render_block_{$this->name}

过滤钩子
apply_filters( "render_block_{$this->name}", $block_content, $this->parsed_block, $this )
参数
  • (string) $block_content The block content.
    Required:
  • (array) $block The full block, including name and attributes.
    Required:
  • (WP_Block) $instance The block instance.
    Required:
定义位置
相关勾子
render_block_datarender_block_contextrender_blockpre_render_blockwidget_block_dynamic_classname
相关方法
render_blockrender_block_core_archivesrender_block_core_rssrender_block_core_home_linkrender_block_core_comment_author_namerender_block_core_file
引入
5.9.0
弃用
-

render_block_{$this->name}: 这个过滤钩子用于过滤特定块的渲染的HTML内容。该钩子专门针对一个特定的块,$this->name参数代表该块的名称。这个钩子可以用来修改一个特定块的输出。

钩子名称的动态部分,$name,是指块的名称,例如”core/paragraph”。

$block_content = apply_filters( "render_block_{$this->name}", $block_content, $this->parsed_block, $this );

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-06 16:33:22

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

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

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