Code Duplication    Length = 9-10 lines in 2 locations

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

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