Title: get_block_type_variations
Published: April 3, 2024
Last modified: May 20, 2026

---

# apply_filters( ‘get_block_type_variations’, array $variations, WP_Block_Type $block_type )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#wp--skip-link--target)

Filters the registered variations for a block type.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#parameters)󠁿

 `$variations`array

Array of registered variations for a block type.

`$block_type`[WP_Block_Type](https://developer.wordpress.org/reference/classes/wp_block_type/)

The full block type object.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#source)󠁿

    ```php
    return apply_filters( 'get_block_type_variations', $this->variations, $this );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-block-type.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-block-type.php#L616)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-block-type.php#L616-L616)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#related)󠁿

| Used by | Description | 
| [WP_Block_Type::get_variations()](https://developer.wordpress.org/reference/classes/wp_block_type/get_variations/)`wp-includes/class-wp-block-type.php` |

Get block variations.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/get_block_type_variations/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fget_block_type_variations%2F)
before being able to contribute a note or feedback.