PluginProbe
Gutenberg / 22.3.0
Gutenberg v22.3.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / lib / experimental / kses-allowed-html.php

kses-allowed-html.php in Gutenberg 22.3.0, at lib/experimental/kses-allowed-html.php

44 lines 965 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Modifies the wp_kses_allowed_html array.
4 *
5 * @package gutenberg
6 */
7
8 /**
9 * Add the form elements to the allowed tags array.
10 *
11 * @param array $allowedtags The allowed tags.
12 *
13 * @return array The allowed tags.
14 */
15 function gutenberg_kses_allowed_html( $allowedtags ) {
16 if ( ! gutenberg_is_experiment_enabled( 'gutenberg-form-blocks' ) ) {
17 return $allowedtags;
18 }
19
20 $allowedtags['input'] = array(
21 'type' => array(),
22 'name' => array(),
23 'value' => array(),
24 'checked' => array(),
25 'required' => array(),
26 'aria-required' => array(),
27 'class' => array(),
28 );
29
30 $allowedtags['label'] = array(
31 'for' => array(),
32 'class' => array(),
33 );
34
35 $allowedtags['textarea'] = array(
36 'name' => array(),
37 'required' => array(),
38 'aria-required' => array(),
39 'class' => array(),
40 );
41 return $allowedtags;
42 }
43 add_filter( 'wp_kses_allowed_html', 'gutenberg_kses_allowed_html' );
44