json-endpoints/class.wpcom-json-api-list-posts-endpoint.php 1 location
|
@@ 90-96 (lines=7) @@
|
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
// Normalize post_type |
| 90 |
|
if ( isset( $args['type'] ) && 'any' == $args['type'] ) { |
| 91 |
|
if ( version_compare( $this->api->version, '1.1', '<' ) ) { |
| 92 |
|
$args['type'] = array( 'post', 'page' ); |
| 93 |
|
} else { // 1.1+ |
| 94 |
|
$args['type'] = $this->_get_whitelisted_post_types(); |
| 95 |
|
} |
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
// determine statuses |
| 99 |
|
$status = $args['status']; |
json-endpoints/class.wpcom-json-api-list-posts-v1-1-endpoint.php 1 location
|
@@ 99-105 (lines=7) @@
|
| 96 |
|
} |
| 97 |
|
|
| 98 |
|
// Normalize post_type |
| 99 |
|
if ( isset( $args['type'] ) && 'any' == $args['type'] ) { |
| 100 |
|
if ( version_compare( $this->api->version, '1.1', '<' ) ) { |
| 101 |
|
$args['type'] = array( 'post', 'page' ); |
| 102 |
|
} else { // 1.1+ |
| 103 |
|
$args['type'] = $site->get_whitelisted_post_types(); |
| 104 |
|
} |
| 105 |
|
} |
| 106 |
|
|
| 107 |
|
// determine statuses |
| 108 |
|
$status = ( ! empty( $args['status'] ) ) ? explode( ',', $args['status'] ) : array( 'publish' ); |