Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 258-266 (lines=9) @@
255
256
		// return non existant post
257
		$post_type = get_post_type_object( $post->post_type );
258
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
259
			$non_existant_post                    = new stdClass();
260
			$non_existant_post->ID                = $post->ID;
261
			$non_existant_post->post_modified     = $post->post_modified;
262
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
263
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
264
265
			return $non_existant_post;
266
		}
267
		/**
268
		 * Filters whether to prevent sending post data to .com
269
		 *
@@ 280-289 (lines=10) @@
277
		 * @param boolean false prevent post data from being synced to WordPress.com
278
		 * @param mixed $post WP_POST object
279
		 */
280
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
281
			// We only send the bare necessary object to be able to create a checksum.
282
			$blocked_post                    = new stdClass();
283
			$blocked_post->ID                = $post->ID;
284
			$blocked_post->post_modified     = $post->post_modified;
285
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
286
			$blocked_post->post_status       = 'jetpack_sync_blocked';
287
288
			return $blocked_post;
289
		}
290
291
		// lets not do oembed just yet.
292
		$this->remove_embed();