Code Duplication    Length = 9-10 lines in 2 locations

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

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