@@ 232-240 (lines=9) @@ | ||
229 | ||
230 | // return non existant post |
|
231 | $post_type = get_post_type_object( $post->post_type ); |
|
232 | if ( empty( $post_type ) || ! is_object( $post_type ) ) { |
|
233 | $non_existant_post = new stdClass(); |
|
234 | $non_existant_post->ID = $post->ID; |
|
235 | $non_existant_post->post_modified = $post->post_modified; |
|
236 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
237 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
238 | ||
239 | return $non_existant_post; |
|
240 | } |
|
241 | /** |
|
242 | * Filters whether to prevent sending post data to .com |
|
243 | * |
|
@@ 254-263 (lines=10) @@ | ||
251 | * @param boolean false prevent post data from being synced to WordPress.com |
|
252 | * @param mixed $post WP_POST object |
|
253 | */ |
|
254 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
255 | // We only send the bare necessary object to be able to create a checksum. |
|
256 | $blocked_post = new stdClass(); |
|
257 | $blocked_post->ID = $post->ID; |
|
258 | $blocked_post->post_modified = $post->post_modified; |
|
259 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
260 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
261 | ||
262 | return $blocked_post; |
|
263 | } |
|
264 | ||
265 | // lets not do oembed just yet. |
|
266 | $this->remove_embed(); |