# gutenberg/13.7.2/lib/experimental/blocks.php

Gutenberg, version 13.7.2. 31 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/13.7.2/code/lib/experimental/blocks.php
- Raw: https://pluginprobe.com/plugins/gutenberg/13.7.2/raw/lib/experimental/blocks.php
- Modified: 2022-04-14T11:52:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/gutenberg/13.7.2/code/lib/experimental/blocks.php#L10-L20`.

```php
<?php
/**
 * Temporary compatibility shims for features present in Gutenberg.
 *
 * @package gutenberg
 */

/**
 * Returns whether the quote v2 is enabled by the user.
 *
 * @return boolean
 */
function gutenberg_is_quote_v2_enabled() {
	return get_option( 'gutenberg-experiments' ) && array_key_exists( 'gutenberg-quote-v2', get_option( 'gutenberg-experiments' ) );
}

/**
 * Sets a global JS variable used to trigger the availability of the experimental blocks.
 */
function gutenberg_enable_experimental_blocks() {
	if ( get_option( 'gutenberg-experiments' ) && array_key_exists( 'gutenberg-list-v2', get_option( 'gutenberg-experiments' ) ) ) {
		wp_add_inline_script( 'wp-block-library', 'window.__experimentalEnableListBlockV2 = true', 'before' );
	}

	if ( gutenberg_is_quote_v2_enabled() ) {
		wp_add_inline_script( 'wp-block-library', 'window.__experimentalEnableQuoteBlockV2 = true', 'before' );
	}
}

add_action( 'admin_init', 'gutenberg_enable_experimental_blocks' );

```
