Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 231-239 (lines=9) @@
228
229
		// return non existant post
230
		$post_type = get_post_type_object( $post->post_type );
231
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
232
			$non_existant_post                    = new stdClass();
233
			$non_existant_post->ID                = $post->ID;
234
			$non_existant_post->post_modified     = $post->post_modified;
235
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
236
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
237
238
			return $non_existant_post;
239
		}
240
		/**
241
		 * Filters whether to prevent sending post data to .com
242
		 *
@@ 253-262 (lines=10) @@
250
		 * @param boolean false prevent post data from being synced to WordPress.com
251
		 * @param mixed $post WP_POST object
252
		 */
253
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
254
			// We only send the bare necessary object to be able to create a checksum.
255
			$blocked_post                    = new stdClass();
256
			$blocked_post->ID                = $post->ID;
257
			$blocked_post->post_modified     = $post->post_modified;
258
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
259
			$blocked_post->post_status       = 'jetpack_sync_blocked';
260
261
			return $blocked_post;
262
		}
263
264
		// lets not do oembed just yet.
265
		$this->remove_embed();