Code Duplication    Length = 6-6 lines in 2 locations

projects/plugins/jetpack/modules/sitemaps/sitemap-builder.php 2 locations

@@ 1219-1224 (lines=6) @@
1216
1217
		// Do not include the image if the attached parent is not published.
1218
		// Unattached will be published. Otherwise, will inherit parent status.
1219
		if ( 'publish' !== get_post_status( $post ) ) {
1220
			return array(
1221
				'xml'           => null,
1222
				'last_modified' => null,
1223
			);
1224
		}
1225
1226
		$parent_url = get_permalink( get_post( $post->post_parent ) );
1227
		if ( '' == $parent_url ) { // WPCS: loose comparison ok.
@@ 1303-1308 (lines=6) @@
1300
1301
		// Do not include the video if the attached parent is not published.
1302
		// Unattached will be published. Otherwise, will inherit parent status.
1303
		if ( 'publish' !== get_post_status( $post ) ) {
1304
			return array(
1305
				'xml'           => null,
1306
				'last_modified' => null,
1307
			);
1308
		}
1309
1310
		$parent_url = esc_url( get_permalink( get_post( $post->post_parent ) ) );
1311
		if ( '' == $parent_url ) { // WPCS: loose comparison ok.