Code Duplication    Length = 3-3 lines in 2 locations

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

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

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 ) {