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