sal/class.json-api-site-base.php 1 location
|
@@ 238-240 (lines=3) @@
|
| 235 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 236 |
|
} |
| 237 |
|
|
| 238 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 239 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 240 |
|
} |
| 241 |
|
|
| 242 |
|
return true; |
| 243 |
|
} |
class.json-api-endpoints.php 1 location
|
@@ 998-1000 (lines=3) @@
|
| 995 |
|
return new WP_Error( 'unauthorized', 'User cannot view post', array( 'status_code' => 403, 'error' => 'private_blog' ) ); |
| 996 |
|
} |
| 997 |
|
|
| 998 |
|
if ( strlen( $post->post_password ) && !current_user_can( 'edit_post', $post->ID ) ) { |
| 999 |
|
return new WP_Error( 'unauthorized', 'User cannot view password protected post', array( 'status_code' => 403, 'error' => 'password_protected' ) ); |
| 1000 |
|
} |
| 1001 |
|
|
| 1002 |
|
return true; |
| 1003 |
|
} |