sal/class.json-api-site-base.php 1 location
|
@@ 295-297 (lines=3) @@
|
292 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
293 |
|
} |
294 |
|
|
295 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
296 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
297 |
|
} |
298 |
|
|
299 |
|
return true; |
300 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 1090-1092 (lines=3) @@
|
1087 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
1088 |
|
} |
1089 |
|
|
1090 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
1091 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
1092 |
|
} |
1093 |
|
|
1094 |
|
return true; |
1095 |
|
} |