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
|
@@ 88-90 (lines=3) @@
|
| 85 |
|
return new WP_Error( 'invalid_number', 'The NUMBER parameter must be less than or equal to 100.', 400 ); |
| 86 |
|
} |
| 87 |
|
|
| 88 |
|
if ( isset( $args['type'] ) && ! $site->is_post_type_allowed( $args['type'] ) ) { |
| 89 |
|
return new WP_Error( 'unknown_post_type', 'Unknown post type', 404 ); |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
// Normalize post_type |
| 93 |
|
if ( isset( $args['type'] ) && 'any' == $args['type'] ) { |