Code Duplication    Length = 3-3 lines in 2 locations

class.json-api-endpoints.php 1 location

@@ 1260-1262 (lines=3) @@
1257
			}
1258
		}
1259
1260
		if ( $media_item->post_parent > 0 ) {
1261
			$response['meta']->links->parent = (string) $this->get_post_link( $this->api->get_blog_id_for_output(), $media_item->post_parent );
1262
		}
1263
1264
		return (object) $response;
1265
	}

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

@@ 645-647 (lines=3) @@
642
			}
643
		}
644
645
		if ( $media_item->post_parent > 0 ) {
646
			$response['meta']->links->parent = (string) $this->links->get_post_link( $this->site->blog_id, $media_item->post_parent );
647
		}
648
649
		return (object) $response;
650
	}