@@ 118-126 (lines=9) @@ | ||
115 | ||
116 | // return non existant post |
|
117 | $post_type = get_post_type_object( $post->post_type ); |
|
118 | if ( empty( $post_type) || ! is_object( $post_type ) ) { |
|
119 | $non_existant_post = new stdClass(); |
|
120 | $non_existant_post->ID = $post->ID; |
|
121 | $non_existant_post->post_modified = $post->post_modified; |
|
122 | $non_existant_post->post_modified_gmt = $post->post_modified_gmt; |
|
123 | $non_existant_post->post_status = 'jetpack_sync_non_registered_post_type'; |
|
124 | ||
125 | return $non_existant_post; |
|
126 | } |
|
127 | /** |
|
128 | * Filters whether to prevent sending post data to .com |
|
129 | * |
|
@@ 140-149 (lines=10) @@ | ||
137 | * @param boolean false prevent post data from being synced to WordPress.com |
|
138 | * @param mixed $post WP_POST object |
|
139 | */ |
|
140 | if ( apply_filters( 'jetpack_sync_prevent_sending_post_data', false, $post ) ) { |
|
141 | // We only send the bare necessary object to be able to create a checksum. |
|
142 | $blocked_post = new stdClass(); |
|
143 | $blocked_post->ID = $post->ID; |
|
144 | $blocked_post->post_modified = $post->post_modified; |
|
145 | $blocked_post->post_modified_gmt = $post->post_modified_gmt; |
|
146 | $blocked_post->post_status = 'jetpack_sync_blocked'; |
|
147 | ||
148 | return $blocked_post; |
|
149 | } |
|
150 | ||
151 | // lets not do oembed just yet. |
|
152 | $this->remove_embed(); |