render_block_core_template_part_none
Fires when a requested block template part does not exist in the database nor in the theme.
Использование
add_action( 'render_block_core_template_part_none', 'wp_kama_render_block_core_template_part_none_action', 10, 3 );
/**
* Function for `render_block_core_template_part_none` action-hook.
*
* @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 not found template path.
*
* @return void
*/
function wp_kama_render_block_core_template_part_none_action( $template_part_id, $attributes, $template_part_file_path ){
// action...
}
- $template_part_id(строка)
- The requested template part namespaced to the theme.
- $attributes(массив)
- The block attributes.
- $template_part_file_path(строка)
- Absolute path to the not found template path.
Список изменений
| С версии 5.9.0 | Введена. |
Где вызывается хук
render_block_core_template_part_none
wp-includes/blocks/template-part.php 109
do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path );