@@ 222-230 (lines=9) @@ | ||
219 | ||
220 | // return non existant post |
|
221 | $post_type = get_post_type_object( $post->post_type ); |
|
222 | if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
|
223 | $non_existant_post = new stdClass(); |
|
224 | $non_existant_post->ID = $post->ID; |
|
225 | $non_existant_post->post_modified = $post->post_modified; |
|
226 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
227 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
228 | ||
229 | return $non_existant_post; |
|
230 | } |
|
231 | /** |
|
232 | * Filters whether to prevent sending post data to .com |
|
233 | * |
|
@@ 244-253 (lines=10) @@ | ||
241 | * @param boolean false prevent post data from being synced to WordPress.com |
|
242 | * @param mixed $post WP_POST object |
|
243 | */ |
|
244 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
245 | // We only send the bare necessary object to be able to create a checksum. |
|
246 | $blocked_post = new stdClass(); |
|
247 | $blocked_post->ID = $post->ID; |
|
248 | $blocked_post->post_modified = $post->post_modified; |
|
249 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
250 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
251 | ||
252 | return $blocked_post; |
|
253 | } |
|
254 | ||
255 | // lets not do oembed just yet. |
|
256 | $this->remove_embed(); |