Changeset 55436 for trunk/src/wp-includes/deprecated.php
- Timestamp:
- 02/28/2023 03:05:50 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/deprecated.php
r55365 r55436 4592 4592 return null; 4593 4593 } 4594 4595 /** 4596 * Returns the correct template for the site's home page. 4597 * 4598 * @access private 4599 * @since 6.0.0 4600 * @deprecated 6.2.0 Site Editor's server-side redirect for missing postType and postId 4601 * query args is removed. Thus, this function is no longer used. 4602 * 4603 * @return array|null A template object, or null if none could be found. 4604 */ 4605 function _resolve_home_block_template() { 4606 _deprecated_function( __FUNCTION__, '6.2.0' ); 4607 4608 $show_on_front = get_option( 'show_on_front' ); 4609 $front_page_id = get_option( 'page_on_front' ); 4610 4611 if ( 'page' === $show_on_front && $front_page_id ) { 4612 return array( 4613 'postType' => 'page', 4614 'postId' => $front_page_id, 4615 ); 4616 } 4617 4618 $hierarchy = array( 'front-page', 'home', 'index' ); 4619 $template = resolve_block_template( 'home', $hierarchy, '' ); 4620 4621 if ( ! $template ) { 4622 return null; 4623 } 4624 4625 return array( 4626 'postType' => 'wp_template', 4627 'postId' => $template->id, 4628 ); 4629 }
Note: See TracChangeset
for help on using the changeset viewer.