Changeset 55436 for trunk/src/wp-includes/block-template.php
- Timestamp:
- 02/28/2023 03:05:50 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template.php
r55335 r55436 336 336 } 337 337 } 338 339 /**340 * Returns the correct template for the site's home page.341 *342 * @access private343 * @since 6.0.0344 *345 * @return array|null A template object, or null if none could be found.346 */347 function _resolve_home_block_template() {348 $show_on_front = get_option( 'show_on_front' );349 $front_page_id = get_option( 'page_on_front' );350 351 if ( 'page' === $show_on_front && $front_page_id ) {352 return array(353 'postType' => 'page',354 'postId' => $front_page_id,355 );356 }357 358 $hierarchy = array( 'front-page', 'home', 'index' );359 $template = resolve_block_template( 'home', $hierarchy, '' );360 361 if ( ! $template ) {362 return null;363 }364 365 return array(366 'postType' => 'wp_template',367 'postId' => $template->id,368 );369 }
Note: See TracChangeset
for help on using the changeset viewer.