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 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 1078-1080 (lines=3) @@
|
| 1075 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 1076 |
|
} |
| 1077 |
|
|
| 1078 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 1079 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 1080 |
|
} |
| 1081 |
|
|
| 1082 |
|
return true; |
| 1083 |
|
} |