Code Duplication    Length = 3-3 lines in 2 locations

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

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

class.json-api-endpoints.php 1 location

@@ 1452-1454 (lines=3) @@
1449
1450
		// add VideoPress link to the meta
1451
		if ( isset( $response['videopress_guid'] ) ) {
1452
			if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
1453
				$response['meta']->links->videopress = (string) $this->links->get_link( '/videos/%s', $response['videopress_guid'], '' );
1454
			}
1455
		}
1456
1457
		if ( $media_item->post_parent > 0 ) {