Code Duplication    Length = 9-10 lines in 2 locations

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

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