Skip to content

Commit a72d08a

Browse files
MaggieCabreramikachan
authored andcommitted
add elements support for text inputs
1 parent edaed03 commit a72d08a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/wp-includes/class-wp-theme-json.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -616,19 +616,20 @@ class WP_Theme_JSON {
616616
* @var string[]
617617
*/
618618
const ELEMENTS = array(
619-
'link' => 'a:where(:not(.wp-element-button))', // The `where` is needed to lower the specificity.
620-
'heading' => 'h1, h2, h3, h4, h5, h6',
621-
'h1' => 'h1',
622-
'h2' => 'h2',
623-
'h3' => 'h3',
624-
'h4' => 'h4',
625-
'h5' => 'h5',
626-
'h6' => 'h6',
619+
'link' => 'a:where(:not(.wp-element-button))', // The `where` is needed to lower the specificity.
620+
'heading' => 'h1, h2, h3, h4, h5, h6',
621+
'h1' => 'h1',
622+
'h2' => 'h2',
623+
'h3' => 'h3',
624+
'h4' => 'h4',
625+
'h5' => 'h5',
626+
'h6' => 'h6',
627627
// We have the .wp-block-button__link class so that this will target older buttons that have been serialized.
628-
'button' => '.wp-element-button, .wp-block-button__link',
628+
'button' => '.wp-element-button, .wp-block-button__link',
629629
// The block classes are necessary to target older content that won't use the new class names.
630-
'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
631-
'cite' => 'cite',
630+
'caption' => '.wp-element-caption, .wp-block-audio figcaption, .wp-block-embed figcaption, .wp-block-gallery figcaption, .wp-block-image figcaption, .wp-block-table figcaption, .wp-block-video figcaption',
631+
'cite' => 'cite',
632+
'textInput' => 'textarea, input:where([type=email],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=tel],[type=url])',
632633
);
633634

634635
const __EXPERIMENTAL_ELEMENT_CLASS_NAMES = array(

0 commit comments

Comments
 (0)