Skip to content

Commit e1a9a92

Browse files
authored
Blocks: Don't return null for string value (#1766)
1 parent fd32100 commit e1a9a92

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: patch
2+
Type: fixed
3+
4+
Avoid type mismatch when updating `activitypub_content_warning` meta values.

includes/class-blocks.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,7 @@ public static function register_postmeta() {
4343
'show_in_rest' => true,
4444
'single' => true,
4545
'type' => 'string',
46-
'sanitize_callback' => function ( $warning ) {
47-
if ( $warning ) {
48-
return \sanitize_text_field( $warning );
49-
}
50-
51-
return null;
52-
},
46+
'sanitize_callback' => 'sanitize_text_field',
5347
)
5448
);
5549

0 commit comments

Comments
 (0)