wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
_resolve_home_block_template is private and should not be used in themes or plugins directly.
_resolve_home_block_template › WordPress Function
Seit6.0.0
Veraltet6.2.0
› _resolve_home_block_template ( Keine Parameter )
Zugriff: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Returns the correct template for the site's home page.
Ähnliche Funktionen: resolve_block_template, register_block_template, locate_block_template, wp_enable_block_templates, unregister_block_template
Quellcode
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, ); }