← All changes
|
includes/rest-api/controller/version2/class-mainwp-rest-posts-controller.php
+1
-1
6.1.2
→
6.2.2
View file →
| @@ -185,9 +185,9 @@ | ||
| 185 | 185 | if ( ! empty( $request['search_on'] ) ) { |
| 186 | 186 | $args['search_on'] = $request['search_on']; |
| 187 | 187 | } |
| 188 | 188 | if ( ! empty( $request['post_type'] ) ) { |
| 189 | - $args['post_type'] = isset( $request['post_type'] ) && 0 < strlen( sanitize_text_field( wp_unslash( $request['post_type'] ) ) ) ? sanitize_text_field( wp_unslash( $request['post_type'] ) ) : 'post'; | |
| 189 | + $args['post_type'] = isset( $request['post_type'] ) && 0 < strlen( sanitize_text_field( $request['post_type'] ) ) ? sanitize_text_field( $request['post_type'] ) : 'post'; | |
| 190 | 190 | } |
| 191 | 191 | if ( ! empty( $request['maximum'] ) ) { |
| 192 | 192 | $args['maximum'] = $request['maximum']; |
| 193 | 193 | } |