lib/experimental
connectors
3 months ago
content-types
3 months ago
dashboard-widgets
3 months ago
experiments
3 months ago
font-face
1 year ago
guidelines
3 months ago
interactivity-api
1 year ago
media-editor
3 months ago
pages
6 months ago
block-editor-settings-mobile.php
888 B
2 years ago
blocks.php
4.4 KB
7 months ago
class-gutenberg-hierarchical-sort.php
4.7 KB
6 months ago
class-wp-rest-block-editor-settings-controller.php
24.2 KB
7 months ago
editor-settings.php
3.3 KB
3 months ago
extensible-site-editor.php
975 B
7 months ago
kses-allowed-html.php
965 B
1 year ago
kses.php
6.2 KB
5 months ago
navigation-theme-opt-in.php
13.3 KB
6 months ago
rest-api-overrides.php
1.6 KB
9 months ago
rest-api.php
3.2 KB
7 months ago
script-modules.php
7.9 KB
6 months ago
workflow-palette.php
355 B
9 months ago
kses-allowed-html.php in Gutenberg 23.2.0, at lib/experimental/kses-allowed-html.php
| 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 |