Code Duplication    Length = 9-9 lines in 2 locations

includes/acf/fields/post_object.php 1 location

@@ 521-529 (lines=9) @@
518
		
519
		
520
		// load posts if needed
521
		if( $field['return_format'] == 'object' ) {
522
			
523
			// get posts
524
			$value = acf_get_posts(array(
525
				'post__in' => $value,
526
				'post_type'	=> $field['post_type']
527
			));
528
		
529
		}
530
		
531
		
532
		// convert back from array if neccessary

includes/acf/fields/relationship.php 1 location

@@ 813-821 (lines=9) @@
810
		
811
		
812
		// load posts if needed
813
		if( $field['return_format'] == 'object' ) {
814
			
815
			// get posts
816
			$value = acf_get_posts(array(
817
				'post__in' => $value,
818
				'post_type'	=> $field['post_type']
819
			));
820
			
821
		}
822
		
823
		
824
		// return