json-endpoints/class.wpcom-json-api-list-posts-endpoint.php 1 location
|
@@ 85-87 (lines=3) @@
|
| 82 |
|
return new WP_Error( 'invalid_number', 'The NUMBER parameter must be less than or equal to 100.', 400 ); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
if ( isset( $args['type'] ) && ! $this->is_post_type_allowed( $args['type'] ) ) { |
| 86 |
|
return new WP_Error( 'unknown_post_type', 'Unknown post type', 404 ); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
// Normalize post_type |
| 90 |
|
if ( isset( $args['type'] ) && 'any' == $args['type'] ) { |
json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php 1 location
|
@@ 94-96 (lines=3) @@
|
| 91 |
|
$this->load_theme_functions(); |
| 92 |
|
} |
| 93 |
|
|
| 94 |
|
if ( isset( $args['type'] ) && ! $site->is_post_type_allowed( $args['type'] ) ) { |
| 95 |
|
return new WP_Error( 'unknown_post_type', 'Unknown post type', 404 ); |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
// Normalize post_type |
| 99 |
|
if ( isset( $args['type'] ) && 'any' == $args['type'] ) { |