@@ 5169-5176 (lines=8) @@ | ||
5166 | $post_ID = $postdata['ID'] = get_default_post_to_edit( $post_type, true )->ID; |
|
5167 | ||
5168 | // Only posts can be sticky |
|
5169 | if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) { |
|
5170 | $data = $postdata; |
|
5171 | $data['sticky'] = $content_struct['sticky']; |
|
5172 | $error = $this->_toggle_sticky( $data ); |
|
5173 | if ( $error ) { |
|
5174 | return $error; |
|
5175 | } |
|
5176 | } |
|
5177 | ||
5178 | if ( isset($content_struct['custom_fields']) ) |
|
5179 | $this->set_custom_fields($post_ID, $content_struct['custom_fields']); |
|
@@ 5528-5536 (lines=9) @@ | ||
5525 | return new IXR_Error(500, __('Sorry, your entry could not be edited.')); |
|
5526 | ||
5527 | // Only posts can be sticky |
|
5528 | if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) { |
|
5529 | $data = $newpost; |
|
5530 | $data['sticky'] = $content_struct['sticky']; |
|
5531 | $data['post_type'] = 'post'; |
|
5532 | $error = $this->_toggle_sticky( $data, true ); |
|
5533 | if ( $error ) { |
|
5534 | return $error; |
|
5535 | } |
|
5536 | } |
|
5537 | ||
5538 | if ( isset($content_struct['custom_fields']) ) |
|
5539 | $this->set_custom_fields($post_ID, $content_struct['custom_fields']); |