json-endpoints/class.wpcom-json-api-post-endpoint.php 1 location
|
@@ 151-153 (lines=3) @@
|
| 148 |
|
return new WP_Error( 'unknown_post', 'Unknown post', 404 ); |
| 149 |
|
} |
| 150 |
|
|
| 151 |
|
if ( ! $this->is_post_type_allowed( $post->post_type ) && ( ! function_exists( 'is_post_freshly_pressed' ) || ! is_post_freshly_pressed( $post->ID ) ) ) { |
| 152 |
|
return new WP_Error( 'unknown_post', 'Unknown post', 404 ); |
| 153 |
|
} |
| 154 |
|
|
| 155 |
|
// Permissions |
| 156 |
|
$capabilities = $this->get_current_user_capabilities( $post ); |
json-endpoints/class.wpcom-json-api-post-v1-1-endpoint.php 1 location
|
@@ 144-146 (lines=3) @@
|
| 141 |
|
return new WP_Error( 'unknown_post', 'Unknown post', 404 ); |
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
if ( ! $this->is_post_type_allowed( $post->post_type ) && ( ! function_exists( 'is_post_freshly_pressed' ) || ! is_post_freshly_pressed( $post->ID ) ) ) { |
| 145 |
|
return new WP_Error( 'unknown_post', 'Unknown post', 404 ); |
| 146 |
|
} |
| 147 |
|
|
| 148 |
|
// Permissions |
| 149 |
|
$capabilities = $this->get_current_user_capabilities( $post ); |