|
@@ 355-364 (lines=10) @@
|
| 352 |
|
|
| 353 |
|
// Return non existant post. |
| 354 |
|
$post_type = get_post_type_object( $post->post_type ); |
| 355 |
|
if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
| 356 |
|
$non_existant_post = new \stdClass(); |
| 357 |
|
$non_existant_post->ID = $post->ID; |
| 358 |
|
$non_existant_post->post_modified = $post->post_modified; |
| 359 |
|
$non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
| 360 |
|
$non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
| 361 |
|
$non_existant_post->post_type = $post->post_type; |
| 362 |
|
|
| 363 |
|
return $non_existant_post; |
| 364 |
|
} |
| 365 |
|
/** |
| 366 |
|
* Filters whether to prevent sending post data to .com |
| 367 |
|
* |
|
@@ 379-389 (lines=11) @@
|
| 376 |
|
* @param boolean false prevent post data from being synced to WordPress.com |
| 377 |
|
* @param mixed $post \WP_Post object |
| 378 |
|
*/ |
| 379 |
|
if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
| 380 |
|
// We only send the bare necessary object to be able to create a checksum. |
| 381 |
|
$blocked_post = new \stdClass(); |
| 382 |
|
$blocked_post->ID = $post->ID; |
| 383 |
|
$blocked_post->post_modified = $post->post_modified; |
| 384 |
|
$blocked_post->post_modified_gmt = $post->post_modified_gmt; |
| 385 |
|
$blocked_post->post_status = 'jetpack_sync_blocked'; |
| 386 |
|
$blocked_post->post_type = $post->post_type; |
| 387 |
|
|
| 388 |
|
return $blocked_post; |
| 389 |
|
} |
| 390 |
|
|
| 391 |
|
// lets not do oembed just yet. |
| 392 |
|
$this->remove_embed(); |