Code Duplication    Length = 3-3 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1478-1480 (lines=3) @@
1475
1476
		// add VideoPress link to the meta
1477
		if ( isset( $response['videopress_guid'] ) ) {
1478
			if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
1479
				$response['meta']->links->videopress = (string) $this->links->get_link( '/videos/%s', $response['videopress_guid'], '' );
1480
			}
1481
		}
1482
1483
		if ( $media_item->post_parent > 0 ) {

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

@@ 675-677 (lines=3) @@
672
673
		// add VideoPress link to the meta
674
		if ( in_array( $ext, array( 'ogv', 'mp4', 'mov', 'wmv', 'avi', 'mpg', '3gp', '3g2', 'm4v' ) ) ) {
675
			if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
676
				$response['meta']->links->videopress = (string) $this->links->get_link( '/videos/%s', $response['videopress_guid'], '' );
677
			}
678
		}
679
680
		if ( $media_item->post_parent > 0 ) {