Code Duplication    Length = 9-10 lines in 2 locations

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

@@ 113-121 (lines=9) @@
110
111
		// return non existant post 
112
		$post_type = get_post_type_object( $post->post_type );
113
		if ( empty( $post_type) || ! is_object( $post_type ) ) {
114
			$non_existant_post                    = new stdClass();
115
			$non_existant_post->ID                = $post->ID;
116
			$non_existant_post->post_modified     = $post->post_modified;
117
			$non_existant_post->post_modified_gmt = $post->post_modified_gmt;
118
			$non_existant_post->post_status       = 'jetpack_sync_non_registered_post_type';
119
			
120
			return $non_existant_post;
121
		}
122
		/**
123
		 * Filters whether to prevent sending post data to .com
124
		 *
@@ 135-144 (lines=10) @@
132
		 * @param boolean false prevent post data from being synced to WordPress.com
133
		 * @param mixed $post WP_POST object
134
		 */
135
		if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) {
136
			// We only send the bare necessary object to be able to create a checksum.
137
			$blocked_post                    = new stdClass();
138
			$blocked_post->ID                = $post->ID;
139
			$blocked_post->post_modified     = $post->post_modified;
140
			$blocked_post->post_modified_gmt = $post->post_modified_gmt;
141
			$blocked_post->post_status       = 'jetpack_sync_blocked';
142
143
			return $blocked_post;
144
		}
145
146
		// lets not do oembed just yet.
147
		$this->remove_embed();