Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 149-157 (lines=9) @@
146
147
		// return non existant post 
148
		$post_type = get_post_type_object( $post->post_type );
149
		if ( empty( $post_type) || ! is_object( $post_type ) ) {
150
			$non_existant_post                    = new stdClass();
151
			$non_existant_post->ID                = $post->ID;
152
			$non_existant_post->post_modified     = $post->post_modified;
153
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
154
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
155
			
156
			return $non_existant_post;
157
		}
158
		/**
159
		 * Filters whether to prevent sending post data to .com
160
		 *
@@ 171-180 (lines=10) @@
168
		 * @param boolean false prevent post data from being synced to WordPress.com
169
		 * @param mixed $post WP_POST object
170
		 */
171
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
172
			// We only send the bare necessary object to be able to create a checksum.
173
			$blocked_post                    = new stdClass();
174
			$blocked_post->ID                = $post->ID;
175
			$blocked_post->post_modified     = $post->post_modified;
176
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
177
			$blocked_post->post_status       = 'jetpack_sync_blocked';
178
179
			return $blocked_post;
180
		}
181
182
		// lets not do oembed just yet.
183
		$this->remove_embed();