Changeset 60688
- Timestamp:
- 08/28/2025 07:08:21 PM (7 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-template-utils.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r60339 r60688 1228 1228 } 1229 1229 ); 1230 $query_result = array_merge( $query_result, $matching_registered_templates ); 1230 1231 $matching_registered_templates = array_map( 1232 function ( $template ) { 1233 $template->content = apply_block_hooks_to_content( 1234 $template->content, 1235 $template, 1236 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' 1237 ); 1238 return $template; 1239 }, 1240 $matching_registered_templates 1241 ); 1242 1243 $query_result = array_merge( $query_result, $matching_registered_templates ); 1231 1244 } 1232 1245 } … … 1324 1337 1325 1338 /** 1326 * Retrieves a unified template object based on a theme file .1339 * Retrieves a unified template object based on a theme file or plugin registration. 1327 1340 * 1328 1341 * This is a fallback of get_block_template(), used when no templates are found in the database. 1342 * Also checks for templates registered via the Template Registration API. 1329 1343 * 1330 1344 * @since 5.9.0 … … 1371 1385 1372 1386 $block_template = WP_Block_Templates_Registry::get_instance()->get_by_slug( $slug ); 1387 1388 if ( $block_template ) { 1389 $block_template->content = apply_block_hooks_to_content( 1390 $block_template->content, 1391 $block_template, 1392 'insert_hooked_blocks_and_set_ignored_hooked_blocks_metadata' 1393 ); 1394 } 1373 1395 1374 1396 /**
Note: See TracChangeset
for help on using the changeset viewer.