sal/class.json-api-site-base.php 1 location
|
@@ 237-239 (lines=3) @@
|
| 234 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 235 |
|
} |
| 236 |
|
|
| 237 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 238 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
return true; |
| 242 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 1024-1026 (lines=3) @@
|
| 1021 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 1022 |
|
} |
| 1023 |
|
|
| 1024 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 1025 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 1026 |
|
} |
| 1027 |
|
|
| 1028 |
|
return true; |
| 1029 |
|
} |