Code Duplication    Length = 6-6 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1038-1043 (lines=6) @@
1035
			return false;
1036
		}
1037
1038
		if ( 'inherit' === $post->post_status ) {
1039
			$parent_post = get_post( $post->post_parent );
1040
			$post_status_obj = get_post_status_object( $parent_post->post_status );
1041
		} else {
1042
			$post_status_obj = get_post_status_object( $post->post_status );
1043
		}
1044
1045
		if ( !$post_status_obj->public ) {
1046
			if ( is_user_logged_in() ) {

sal/class.json-api-site-base.php 1 location

@@ 265-270 (lines=6) @@
262
			return false;
263
		}
264
265
		if ( 'inherit' === $post->post_status ) {
266
			$parent_post = get_post( $post->post_parent );
267
			$post_status_obj = get_post_status_object( $parent_post->post_status );
268
		} else {
269
			$post_status_obj = get_post_status_object( $post->post_status );
270
		}
271
272
		$authorized = (
273
			$post_status_obj->public ||