W3cubDocs

/WordPress

WP_Navigation_Fallback::get_default_fallback_blocks(): string

Gets the rendered markup for the default fallback blocks.

Return

string default blocks markup to use a the fallback.

Source

private static function get_default_fallback_blocks() {
	$registry = WP_Block_Type_Registry::get_instance();

	// If `core/page-list` is not registered then use empty blocks.
	return $registry->is_registered( 'core/page-list' ) ? '<!-- wp:page-list /-->' : '';
}

Changelog

Version Description
6.3.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_navigation_fallback/get_default_fallback_blocks