Code Duplication    Length = 9-10 lines in 2 locations

sync/class.jetpack-sync-module-posts.php 2 locations

@@ 250-258 (lines=9) @@
247
248
		// return non existant post
249
		$post_type = get_post_type_object( $post->post_type );
250
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
251
			$non_existant_post                    = new stdClass();
252
			$non_existant_post->ID                = $post->ID;
253
			$non_existant_post->post_modified     = $post->post_modified;
254
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
255
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
256
257
			return $non_existant_post;
258
		}
259
		/**
260
		 * Filters whether to prevent sending post data to .com
261
		 *
@@ 272-281 (lines=10) @@
269
		 * @param boolean false prevent post data from being synced to WordPress.com
270
		 * @param mixed $post WP_POST object
271
		 */
272
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
273
			// We only send the bare necessary object to be able to create a checksum.
274
			$blocked_post                    = new stdClass();
275
			$blocked_post->ID                = $post->ID;
276
			$blocked_post->post_modified     = $post->post_modified;
277
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
278
			$blocked_post->post_status       = 'jetpack_sync_blocked';
279
280
			return $blocked_post;
281
		}
282
283
		// lets not do oembed just yet.
284
		$this->remove_embed();