Changeset 52324 for trunk/src/wp-includes/blocks/template-part.php
- Timestamp:
- 12/06/2021 06:18:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/template-part.php
r52275 r52324 51 51 $area = $area_terms[0]->name; 52 52 } 53 /** 54 * Fires when a block template part is loaded from a template post stored in the database. 55 * 56 * @since 5.9.0 57 * 58 * @param string $template_part_id The requested template part namespaced to the theme. 59 * @param array $attributes The block attributes. 60 * @param WP_Post $template_part_post The template part post object. 61 * @param string $content The template part content. 62 */ 63 do_action( 'render_block_core_template_part_post', $template_part_id, $attributes, $template_part_post, $content ); 53 64 } else { 54 65 // Else, if the template part was provided by the active theme, … … 61 72 ? _inject_theme_attribute_in_block_template_content( $content ) 62 73 : ''; 74 } 75 76 if ( '' !== $content && null !== $content ) { 77 /** 78 * Fires when a block template part is loaded from a template part in the theme. 79 * 80 * @since 5.9.0 81 * 82 * @param string $template_part_id The requested template part namespaced to the theme. 83 * @param array $attributes The block attributes. 84 * @param string $template_part_file_path Absolute path to the template path. 85 * @param string $content The template part content. 86 */ 87 do_action( 'render_block_core_template_part_file', $template_part_id, $attributes, $template_part_file_path, $content ); 88 } else { 89 /** 90 * Fires when a requested block template part does not exist in the database nor in the theme. 91 * 92 * @since 5.9.0 93 * 94 * @param string $template_part_id The requested template part namespaced to the theme. 95 * @param array $attributes The block attributes. 96 * @param string $template_part_file_path Absolute path to the not found template path. 97 */ 98 do_action( 'render_block_core_template_part_none', $template_part_id, $attributes, $template_part_file_path ); 63 99 } 64 100 }
Note: See TracChangeset
for help on using the changeset viewer.