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 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 1121-1123 (lines=3) @@
|
| 1118 |
|
); |
| 1119 |
|
} |
| 1120 |
|
|
| 1121 |
|
if ( strlen( $post->post_password ) && ! current_user_can( 'edit_post', $post->ID ) ) { |
| 1122 |
|
return new WP_Error( |
| 1123 |
|
'unauthorized', |
| 1124 |
|
'User cannot view password protected post', |
| 1125 |
|
array( |
| 1126 |
|
'status_code' => 403, |