class.json-api-endpoints.php 1 location
|
@@ 1097-1099 (lines=3) @@
|
| 1094 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 1095 |
|
} |
| 1096 |
|
|
| 1097 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 1098 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 1099 |
|
} |
| 1100 |
|
|
| 1101 |
|
return true; |
| 1102 |
|
} |
sal/class.json-api-site-base.php 1 location
|
@@ 317-319 (lines=3) @@
|
| 314 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 315 |
|
} |
| 316 |
|
|
| 317 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 318 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 319 |
|
} |
| 320 |
|
|
| 321 |
|
return true; |
| 322 |
|
} |