# gutenberg/23.3.2/lib/experimental/kses-allowed-html.php

Gutenberg, version 23.3.2. 44 lines.

- Page: https://pluginprobe.com/plugins/gutenberg/23.3.2/code/lib/experimental/kses-allowed-html.php
- Raw: https://pluginprobe.com/plugins/gutenberg/23.3.2/raw/lib/experimental/kses-allowed-html.php
- Modified: 2025-01-09T20:35:36+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/23.3.2/code/lib/experimental/kses-allowed-html.php#L10-L20`.

```php
<?php
/**
 * Modifies the wp_kses_allowed_html array.
 *
 * @package gutenberg
 */

/**
 * Add the form elements to the allowed tags array.
 *
 * @param array $allowedtags The allowed tags.
 *
 * @return array The allowed tags.
 */
function gutenberg_kses_allowed_html( $allowedtags ) {
	if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) {
		return $allowedtags;
	}

	$allowedtags['input'] = array(
		'type'          => array(),
		'name'          => array(),
		'value'         => array(),
		'checked'       => array(),
		'required'      => array(),
		'aria-required' => array(),
		'class'         => array(),
	);

	$allowedtags['label'] = array(
		'for'   => array(),
		'class' => array(),
	);

	$allowedtags['textarea'] = array(
		'name'          => array(),
		'required'      => array(),
		'aria-required' => array(),
		'class'         => array(),
	);
	return $allowedtags;
}
add_filter( 'wp_kses_allowed_html', 'gutenberg_kses_allowed_html' );

```
