sal/class.json-api-site-base.php 1 location
|
@@ 275-277 (lines=3) @@
|
272 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
273 |
|
} |
274 |
|
|
275 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
276 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
277 |
|
} |
278 |
|
|
279 |
|
return true; |
280 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 1079-1081 (lines=3) @@
|
1076 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
1077 |
|
} |
1078 |
|
|
1079 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
1080 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
1081 |
|
} |
1082 |
|
|
1083 |
|
return true; |
1084 |
|
} |