sal/class.json-api-site-base.php 1 location
|
@@ 309-311 (lines=3) @@
|
306 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
307 |
|
} |
308 |
|
|
309 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
310 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
311 |
|
} |
312 |
|
|
313 |
|
return true; |
314 |
|
} |
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 |
|
} |