@@ 246-254 (lines=9) @@ | ||
243 | ||
244 | // return non existant post |
|
245 | $post_type = get_post_type_object( $post->post_type ); |
|
246 | if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
|
247 | $non_existant_post = new stdClass(); |
|
248 | $non_existant_post->ID = $post->ID; |
|
249 | $non_existant_post->post_modified = $post->post_modified; |
|
250 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
251 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
252 | ||
253 | return $non_existant_post; |
|
254 | } |
|
255 | /** |
|
256 | * Filters whether to prevent sending post data to .com |
|
257 | * |
|
@@ 268-277 (lines=10) @@ | ||
265 | * @param boolean false prevent post data from being synced to WordPress.com |
|
266 | * @param mixed $post WP_POST object |
|
267 | */ |
|
268 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
269 | // We only send the bare necessary object to be able to create a checksum. |
|
270 | $blocked_post = new stdClass(); |
|
271 | $blocked_post->ID = $post->ID; |
|
272 | $blocked_post->post_modified = $post->post_modified; |
|
273 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
274 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
275 | ||
276 | return $blocked_post; |
|
277 | } |
|
278 | ||
279 | // lets not do oembed just yet. |
|
280 | $this->remove_embed(); |