__( 'Test a new list block that uses nested list item blocks (Warning: The new block is not ready. You may experience content loss, avoid using it on production sites)', 'gutenberg' ),
'id' => 'gutenberg-list-v2',
)
);
add_settings_field(
'gutenberg-quote-v2',
__( 'Quote block v2', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Test a new quote block that allows nested blocks (Warning: The new block is not ready. You may experience content loss, avoid using it on production sites)', 'gutenberg' ),
'id' => 'gutenberg-quote-v2',
)
);
register_setting(
'gutenberg-experiments',
'gutenberg-experiments'
);
}
add_action( 'admin_init', 'gutenberg_initialize_experiments_settings' );
/**
* Display a checkbox field for a Gutenberg experiment.
*
* @since 6.3.0
*
* @param array $args ( $label, $id ).
*/
function gutenberg_display_experiment_field( $args ) {
$options = get_option( 'gutenberg-experiments' );
$value = isset( $options[ $args['id'] ] ) ? 1 : 0;
?>
(int) get_option( 'use_balanceTags' ) !== 1 || is_wp_version_compatible( '5.9' ),
);
return array_merge( $settings, $experiments_settings );
}
add_filter( 'block_editor_settings_all', 'gutenberg_experiments_editor_settings' );