File tree Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Expand file tree Collapse file tree 2 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -13,28 +13,28 @@ abstract class Component {
13
13
14
14
const ALLOWED_HTML = array (
15
15
'form ' => array (
16
- 'action ' => array () ,
17
- 'method ' => array () ,
16
+ 'action ' => true ,
17
+ 'method ' => true ,
18
18
),
19
19
'label ' => array (
20
- 'for ' => array () ,
20
+ 'for ' => true ,
21
21
),
22
22
'option ' => array (
23
- 'value ' => array () ,
24
- 'selected ' => array () ,
23
+ 'value ' => true ,
24
+ 'selected ' => true ,
25
25
),
26
26
'select ' => array (
27
- 'id ' => array () ,
28
- 'name ' => array () ,
27
+ 'id ' => true ,
28
+ 'name ' => true ,
29
29
),
30
30
'input ' => array (
31
- 'type ' => array () ,
32
- 'class ' => array () ,
33
- 'id ' => array () ,
34
- 'name ' => array () ,
35
- 'value ' => array () ,
36
- 'size ' => array () ,
37
- 'readonly ' => array () ,
31
+ 'type ' => true ,
32
+ 'class ' => true ,
33
+ 'id ' => true ,
34
+ 'name ' => true ,
35
+ 'value ' => true ,
36
+ 'size ' => true ,
37
+ 'readonly ' => true ,
38
38
),
39
39
);
40
40
@@ -45,6 +45,8 @@ abstract public function render(): string;
45
45
46
46
/**
47
47
* Adds our input elements to the allowed HTML elements of a post
48
+ *
49
+ * @return array<string, array<string, bool>>
48
50
*/
49
51
public static function get_allowed_html (): array {
50
52
$ my_allowed = wp_kses_allowed_html ( 'post ' );
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ public function render(): string {
49
49
'<input type="text" class="regular-text" id="%1$s" name="msls[%1$s]" value="%2$s" size="%3$d"%4$s/> ' ,
50
50
esc_attr ( $ this ->key ),
51
51
esc_attr ( $ this ->value ),
52
- esc_attr ( $ this ->size ) ,
52
+ $ this ->size ,
53
53
$ this ->readonly // phpcs:ignore WordPress.Security.EscapeOutput
54
54
);
55
55
}
You can’t perform that action at this time.
0 commit comments