sal/class.json-api-site-base.php 1 location
|
@@ 273-278 (lines=6) @@
|
270 |
|
return false; |
271 |
|
} |
272 |
|
|
273 |
|
if ( 'inherit' === $post->post_status ) { |
274 |
|
$parent_post = get_post( $post->post_parent ); |
275 |
|
$post_status_obj = get_post_status_object( $parent_post->post_status ); |
276 |
|
} else { |
277 |
|
$post_status_obj = get_post_status_object( $post->post_status ); |
278 |
|
} |
279 |
|
|
280 |
|
$authorized = ( |
281 |
|
$post_status_obj->public || |
class.json-api-endpoints.php 1 location
|
@@ 1047-1052 (lines=6) @@
|
1044 |
|
return false; |
1045 |
|
} |
1046 |
|
|
1047 |
|
if ( 'inherit' === $post->post_status ) { |
1048 |
|
$parent_post = get_post( $post->post_parent ); |
1049 |
|
$post_status_obj = get_post_status_object( $parent_post->post_status ); |
1050 |
|
} else { |
1051 |
|
$post_status_obj = get_post_status_object( $post->post_status ); |
1052 |
|
} |
1053 |
|
|
1054 |
|
if ( !$post_status_obj->public ) { |
1055 |
|
if ( is_user_logged_in() ) { |