@@ 394-403 (lines=10) @@ | ||
391 | ||
392 | // Return non existant post. |
|
393 | $post_type = get_post_type_object( $post->post_type ); |
|
394 | if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
|
395 | $non_existant_post = new \stdClass(); |
|
396 | $non_existant_post->ID = $post->ID; |
|
397 | $non_existant_post->post_modified = $post->post_modified; |
|
398 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
399 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
400 | $non_existant_post->post_type = $post->post_type; |
|
401 | ||
402 | return $non_existant_post; |
|
403 | } |
|
404 | /** |
|
405 | * Filters whether to prevent sending post data to .com |
|
406 | * |
|
@@ 418-428 (lines=11) @@ | ||
415 | * @param boolean false prevent post data from being synced to WordPress.com |
|
416 | * @param mixed $post \WP_Post object |
|
417 | */ |
|
418 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
419 | // We only send the bare necessary object to be able to create a checksum. |
|
420 | $blocked_post = new \stdClass(); |
|
421 | $blocked_post->ID = $post->ID; |
|
422 | $blocked_post->post_modified = $post->post_modified; |
|
423 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
424 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
425 | $blocked_post->post_type = $post->post_type; |
|
426 | ||
427 | return $blocked_post; |
|
428 | } |
|
429 | ||
430 | // lets not do oembed just yet. |
|
431 | $this->remove_embed(); |