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