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
|
@@ 1073-1075 (lines=3) @@
|
1070 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
1071 |
|
} |
1072 |
|
|
1073 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
1074 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
1075 |
|
} |
1076 |
|
|
1077 |
|
return true; |
1078 |
|
} |