We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c0d4a6c + 16d6927 commit 5b24e90Copy full SHA for 5b24e90
includes/MslsMetaBox.php
@@ -35,9 +35,14 @@ public static function suggest() {
35
}
36
37
if ( MslsRequest::has_var( MslsFields::FIELD_S, INPUT_POST ) ) {
38
- $args['s'] = sanitize_text_field(
+ $value_s = sanitize_text_field(
39
MslsRequest::get_var( MslsFields::FIELD_S, INPUT_POST )
40
);
41
+
42
+ /**
43
+ * If the value is numeric, we assume it is a post ID
44
+ */
45
+ is_numeric( $value_s ) ? $args['include'] = array( $value_s ) : $args['s'] = $value_s;
46
47
48
$json = self::get_suggested_fields( $json, $args );
0 commit comments