Code Duplication    Length = 3-3 lines in 2 locations

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

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

class.json-api-endpoints.php 1 location

@@ 1375-1377 (lines=3) @@
1372
1373
		// add VideoPress link to the meta
1374
		if ( isset ( $response['videopress_guid'] ) ) {
1375
			if ( function_exists( 'video_get_info_by_blogpostid' ) ) {
1376
				$response['meta']->links->videopress = (string) $this->links->get_link( '/videos/%s', $response['videopress_guid'], '' );
1377
			}
1378
		}
1379
1380
		if ( $media_item->post_parent > 0 ) {