@@ 368-377 (lines=10) @@ | ||
365 | ||
366 | // Return non existant post. |
|
367 | $post_type = get_post_type_object( $post->post_type ); |
|
368 | if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
|
369 | $non_existant_post = new \stdClass(); |
|
370 | $non_existant_post->ID = $post->ID; |
|
371 | $non_existant_post->post_modified = $post->post_modified; |
|
372 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
373 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
374 | $non_existant_post->post_type = $post->post_type; |
|
375 | ||
376 | return $non_existant_post; |
|
377 | } |
|
378 | /** |
|
379 | * Filters whether to prevent sending post data to .com |
|
380 | * |
|
@@ 392-402 (lines=11) @@ | ||
389 | * @param boolean false prevent post data from being synced to WordPress.com |
|
390 | * @param mixed $post \WP_Post object |
|
391 | */ |
|
392 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
393 | // We only send the bare necessary object to be able to create a checksum. |
|
394 | $blocked_post = new \stdClass(); |
|
395 | $blocked_post->ID = $post->ID; |
|
396 | $blocked_post->post_modified = $post->post_modified; |
|
397 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
398 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
399 | $blocked_post->post_type = $post->post_type; |
|
400 | ||
401 | return $blocked_post; |
|
402 | } |
|
403 | ||
404 | // lets not do oembed just yet. |
|
405 | $this->remove_embed(); |