render_block_core_template_part_file

動作鉤子
do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content )
引數
  • (string) $template_part_id The requested template part namespaced to the theme.
    Required:
  • (array) $attributes The block attributes.
    Required:
  • (string) $template_part_file_path Absolute path to the template path.
    Required:
  • (string) $content The template part content.
    Required:
定義位置
相關勾子
render_block_core_template_part_nonerender_block_core_template_part_postrender_block_contextpre_get_block_file_templatepre_get_block_template
相關方法
render_block_core_template_partregister_block_core_template_partrender_block_core_site_titlerender_block_core_post_templaterender_block_core_filerender_block_core_categories
引入
5.9.0
棄用
-

render_block_core_template_part_file。這個過濾鉤子用於修改用於渲染塊的核心模板部分的檔案路徑。該鉤子為開發者提供了使用自定義模板部分而不是WordPress提供的預設模板部分的許可權。

當一個區塊模板部分從主題中的模板部分載入時,就會觸發。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content );
do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content );
do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content );

常見問題

FAQs
檢視更多 >