class.json-api-endpoints.php 1 location
|
@@ 1045-1047 (lines=3) @@
|
| 1042 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 1043 |
|
} |
| 1044 |
|
|
| 1045 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 1046 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 1047 |
|
} |
| 1048 |
|
|
| 1049 |
|
return true; |
| 1050 |
|
} |
sal/class.json-api-site-base.php 1 location
|
@@ 271-273 (lines=3) @@
|
| 268 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 269 |
|
} |
| 270 |
|
|
| 271 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 272 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 273 |
|
} |
| 274 |
|
|
| 275 |
|
return true; |
| 276 |
|
} |