wpseek.com
A WordPress-centric search engine for devs and theme authors



block_core_navigation_link_filter_variations › WordPress Function

Since6.5.0
Deprecatedn/a
block_core_navigation_link_filter_variations ( $variations, $block_type )
Parameters: (2)
  • (array) $variations Array of registered variations for a block type.
    Required: Yes
  • (WP_Block_Type) $block_type The full block type object.
    Required: Yes
Defined at:
Codex:

Filters the registered variations for a block type.

Returns the dynamically built variations for all post-types and taxonomies.


Source

function block_core_navigation_link_filter_variations( $variations, $block_type ) {
	if ( 'core/navigation-link' !== $block_type->name ) {
		return $variations;
	}

	$generated_variations = block_core_navigation_link_build_variations();
	return array_merge( $variations, $generated_variations );
}