sal/class.json-api-site-base.php 1 location
|
@@ 297-302 (lines=6) @@
|
294 |
|
return false; |
295 |
|
} |
296 |
|
|
297 |
|
if ( 'inherit' === $post->post_status ) { |
298 |
|
$parent_post = get_post( $post->post_parent ); |
299 |
|
$post_status_obj = get_post_status_object( $parent_post->post_status ); |
300 |
|
} else { |
301 |
|
$post_status_obj = get_post_status_object( $post->post_status ); |
302 |
|
} |
303 |
|
|
304 |
|
$authorized = ( |
305 |
|
$post_status_obj->public || |
class.json-api-endpoints.php 1 location
|
@@ 1079-1084 (lines=6) @@
|
1076 |
|
return false; |
1077 |
|
} |
1078 |
|
|
1079 |
|
if ( 'inherit' === $post->post_status ) { |
1080 |
|
$parent_post = get_post( $post->post_parent ); |
1081 |
|
$post_status_obj = get_post_status_object( $parent_post->post_status ); |
1082 |
|
} else { |
1083 |
|
$post_status_obj = get_post_status_object( $post->post_status ); |
1084 |
|
} |
1085 |
|
|
1086 |
|
if ( ! $post_status_obj->public ) { |
1087 |
|
if ( is_user_logged_in() ) { |