|
@@ 426-435 (lines=10) @@
|
| 423 |
|
|
| 424 |
|
// Return non existant post. |
| 425 |
|
$post_type = get_post_type_object( $post->post_type ); |
| 426 |
|
if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
| 427 |
|
$non_existant_post = new \stdClass(); |
| 428 |
|
$non_existant_post->ID = $post->ID; |
| 429 |
|
$non_existant_post->post_modified = $post->post_modified; |
| 430 |
|
$non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
| 431 |
|
$non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
| 432 |
|
$non_existant_post->post_type = $post->post_type; |
| 433 |
|
|
| 434 |
|
return $non_existant_post; |
| 435 |
|
} |
| 436 |
|
/** |
| 437 |
|
* Filters whether to prevent sending post data to .com |
| 438 |
|
* |
|
@@ 450-460 (lines=11) @@
|
| 447 |
|
* @param boolean false prevent post data from being synced to WordPress.com |
| 448 |
|
* @param mixed $post \WP_Post object |
| 449 |
|
*/ |
| 450 |
|
if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
| 451 |
|
// We only send the bare necessary object to be able to create a checksum. |
| 452 |
|
$blocked_post = new \stdClass(); |
| 453 |
|
$blocked_post->ID = $post->ID; |
| 454 |
|
$blocked_post->post_modified = $post->post_modified; |
| 455 |
|
$blocked_post->post_modified_gmt = $post->post_modified_gmt; |
| 456 |
|
$blocked_post->post_status = 'jetpack_sync_blocked'; |
| 457 |
|
$blocked_post->post_type = $post->post_type; |
| 458 |
|
|
| 459 |
|
return $blocked_post; |
| 460 |
|
} |
| 461 |
|
|
| 462 |
|
// lets not do oembed just yet. |
| 463 |
|
$this->remove_embed(); |