wppaste
WordPress

_resolve_home_block_template(): array|null

Since
6.0.0
Source
wp-includes/deprecated.php:4617
Returns the correct template for the site's home page.

Return

array|null
A template object, or null if none could be found.

Uses · 3

Source

function _resolve_home_block_template() {	_deprecated_function( __FUNCTION__, '6.2.0' ); 	$show_on_front = get_option( 'show_on_front' );	$front_page_id = get_option( 'page_on_front' ); 	if ( 'page' === $show_on_front && $front_page_id ) {		return array(				'postType' => 'page',				'postId'   => $front_page_id,		);	} 	$hierarchy = array( 'front-page', 'home', 'index' );	$template  = resolve_block_template( 'home', $hierarchy, '' ); 	if ( ! $template ) {		return null;	} 	return array(			'postType' => 'wp_template',			'postId'   => $template->id,	);}

History

Introduced in 6.0.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.

6.2.0
Deprecated. Site Editor's server-side redirect for missing postType and postId query args is removed. Thus, this function is no longer used.from the docblock
6.0.0
Introduced.from the docblock

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/deprecated.php, 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.