wppaste
WordPress

do_action( 'render_block_core_template_part_file', string $template_part_id, array $attributes, string $template_part_file_path, string $content )

Since
5.9.0
Fires when a block template part is loaded from a template part in the theme.

Compatibility

WordPress
since 5.9.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$template_part_idstring
The requested template part namespaced to the theme.
$attributesarray
The block attributes.
$template_part_file_pathstring
Absolute path to the template path.
$contentstring
The template part content.

Where this hook fires · 1

  • wp-includes/blocks/template-part.php:98render_block_core_template_part()

Source code

				 *				 * @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 template path.				 * @param string $content                 The template part content.				 */				do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content );			} else {				/**				 * Fires when a requested block template part does not exist in the database nor in the theme.				 *				 * @since 5.9.0				 *

Changelog

Introduced in 5.9.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.