Code Duplication    Length = 9-10 lines in 2 locations

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

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