|
@@ 5057-5064 (lines=8) @@
|
| 5054 |
|
$post_ID = $postdata['ID'] = get_default_post_to_edit( $post_type, true )->ID; |
| 5055 |
|
|
| 5056 |
|
// Only posts can be sticky |
| 5057 |
|
if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) { |
| 5058 |
|
$data = $postdata; |
| 5059 |
|
$data['sticky'] = $content_struct['sticky']; |
| 5060 |
|
$error = $this->_toggle_sticky( $data ); |
| 5061 |
|
if ( $error ) { |
| 5062 |
|
return $error; |
| 5063 |
|
} |
| 5064 |
|
} |
| 5065 |
|
|
| 5066 |
|
if ( isset($content_struct['custom_fields']) ) |
| 5067 |
|
$this->set_custom_fields($post_ID, $content_struct['custom_fields']); |
|
@@ 5413-5421 (lines=9) @@
|
| 5410 |
|
return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.')); |
| 5411 |
|
|
| 5412 |
|
// Only posts can be sticky |
| 5413 |
|
if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) { |
| 5414 |
|
$data = $newpost; |
| 5415 |
|
$data['sticky'] = $content_struct['sticky']; |
| 5416 |
|
$data['post_type'] = 'post'; |
| 5417 |
|
$error = $this->_toggle_sticky( $data, true ); |
| 5418 |
|
if ( $error ) { |
| 5419 |
|
return $error; |
| 5420 |
|
} |
| 5421 |
|
} |
| 5422 |
|
|
| 5423 |
|
if ( isset($content_struct['custom_fields']) ) |
| 5424 |
|
$this->set_custom_fields($post_ID, $content_struct['custom_fields']); |