Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 186-194 (lines=9) @@
183
184
		// return non existant post
185
		$post_type = get_post_type_object( $post->post_type );
186
		if ( empty( $post_type ) || ! is_object( $post_type ) ) {
187
			$non_existant_post                    = new stdClass();
188
			$non_existant_post->ID                = $post->ID;
189
			$non_existant_post->post_modified     = $post->post_modified;
190
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
191
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
192
193
			return $non_existant_post;
194
		}
195
		/**
196
		 * Filters whether to prevent sending post data to .com
197
		 *
@@ 208-217 (lines=10) @@
205
		 * @param boolean false prevent post data from being synced to WordPress.com
206
		 * @param mixed $post WP_POST object
207
		 */
208
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
209
			// We only send the bare necessary object to be able to create a checksum.
210
			$blocked_post                    = new stdClass();
211
			$blocked_post->ID                = $post->ID;
212
			$blocked_post->post_modified     = $post->post_modified;
213
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
214
			$blocked_post->post_status       = 'jetpack_sync_blocked';
215
216
			return $blocked_post;
217
		}
218
219
		// lets not do oembed just yet.
220
		$this->remove_embed();