@@ 141-149 (lines=9) @@ | ||
138 | ||
139 | // return non existant post |
|
140 | $post_type = get_post_type_object( $post->post_type ); |
|
141 | if ( empty( $post_type) || ! is_object( $post_type ) ) { |
|
142 | $non_existant_post = new stdClass(); |
|
143 | $non_existant_post->ID = $post->ID; |
|
144 | $non_existant_post->post_modified = $post->post_modified; |
|
145 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
146 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
147 | ||
148 | return $non_existant_post; |
|
149 | } |
|
150 | /** |
|
151 | * Filters whether to prevent sending post data to .com |
|
152 | * |
|
@@ 163-172 (lines=10) @@ | ||
160 | * @param boolean false prevent post data from being synced to WordPress.com |
|
161 | * @param mixed $post WP_POST object |
|
162 | */ |
|
163 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
164 | // We only send the bare necessary object to be able to create a checksum. |
|
165 | $blocked_post = new stdClass(); |
|
166 | $blocked_post->ID = $post->ID; |
|
167 | $blocked_post->post_modified = $post->post_modified; |
|
168 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
169 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
170 | ||
171 | return $blocked_post; |
|
172 | } |
|
173 | ||
174 | // lets not do oembed just yet. |
|
175 | $this->remove_embed(); |