Title: wp_create_block_style_variation_instance_name
Published: November 13, 2024
Last modified: May 20, 2026

---

# wp_create_block_style_variation_instance_name( array $block, string $variation ): string

## In this article

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

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

This function has been deprecated since 6.7.0. Use wp_unique_id( $variation . ‘–‘)
instead.

This function’s access is marked private. This means it is not intended for use 
by plugin or theme developers, only by core. It is listed here for completeness.

Generate block style variation instance name.

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

 `$block`arrayrequired

Block object.

`$variation`stringrequired

Slug for the block style variation.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_create_block_style_variation_instance_name/?output_format=md#return)󠁿

 string The unique variation name.

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

    ```php
    function wp_create_block_style_variation_instance_name( $block, $variation ) {
    	_deprecated_function( __FUNCTION__, '6.7.0', 'wp_unique_id' );
    	return $variation . '--' . md5( serialize( $block ) );
    }
    ```

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

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

| Uses | Description | 
| [_deprecated_function()](https://developer.wordpress.org/reference/functions/_deprecated_function/)`wp-includes/functions.php` |

Marks a function as deprecated and inform when it has been used.

  |

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

| Version | Description | 
| [6.7.0](https://developer.wordpress.org/reference/since/6.7.0/) | Deprecated. Use `wp_unique_id( $variation . '--' )` instead. | 
| [6.6.0](https://developer.wordpress.org/reference/since/6.6.0/) | Introduced. |

## User Contributed Notes

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