Ticket #8777: xmlrpc.php.2.diff
| File xmlrpc.php.2.diff, 1.8 KB (added by josephscott, 3 years ago) |
|---|
-
xmlrpc.php
2219 2219 return new IXR_Error(500, __('Sorry, your entry could not be posted. Something wrong happened.')); 2220 2220 } 2221 2221 2222 // Only posts can be sticky 2223 if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) 2224 if ( $content_struct['sticky'] == true ) 2225 stick_post( $post_ID ); 2226 elseif ( $content_struct['sticky'] == false ) 2227 unstick_post( $post_ID ); 2228 2222 2229 if ( isset($content_struct['custom_fields']) ) { 2223 2230 $this->set_custom_fields($post_ID, $content_struct['custom_fields']); 2224 2231 } … … 2502 2509 return new IXR_Error(500, __('Sorry, your entry could not be edited. Something wrong happened.')); 2503 2510 } 2504 2511 2512 // Only posts can be sticky 2513 if ( $post_type == 'post' && isset( $content_struct['sticky'] ) ) 2514 if ( $content_struct['sticky'] == true ) 2515 stick_post( $post_ID ); 2516 elseif ( $content_struct['sticky'] == false ) 2517 unstick_post( $post_ID ); 2518 2505 2519 if ( isset($content_struct['custom_fields']) ) { 2506 2520 $this->set_custom_fields($post_ID, $content_struct['custom_fields']); 2507 2521 } … … 2580 2594 $postdata['post_status'] = 'publish'; 2581 2595 } 2582 2596 2597 $sticky = false; 2598 if ( is_sticky( $post_ID ) ) 2599 $sticky = true; 2600 2583 2601 $enclosure = array(); 2584 2602 foreach ( (array) get_post_custom($post_ID) as $key => $val) { 2585 2603 if ($key == 'enclosure') { … … 2615 2633 'wp_author_display_name' => $author->display_name, 2616 2634 'date_created_gmt' => new IXR_Date($post_date_gmt), 2617 2635 'post_status' => $postdata['post_status'], 2618 'custom_fields' => $this->get_custom_fields($post_ID) 2636 'custom_fields' => $this->get_custom_fields($post_ID), 2637 'sticky' => $sticky 2619 2638 ); 2620 2639 2621 2640 if (!empty($enclosure)) $resp['enclosure'] = $enclosure;
