Ticket #16003: wp_category_ids-2.diff
File wp_category_ids-2.diff, 2.1 KB (added by , 14 years ago) |
---|
-
class-wp-xmlrpc-server.php
2303 2303 } 2304 2304 } 2305 2305 } 2306 if ( isset( $content_struct['wp_category_ids'] ) ) { 2307 $catids = array_map( 'intval', $content_struct['wp_category_ids'] ); 2308 logIO('O', 'Post cat ids: ' . var_export($catids, true)); 2306 2309 2310 if ( is_array($catids) ) { 2311 $post_category = array_merge( $post_category, array_diff( $catids, $post_category ) ); 2312 } 2313 } 2314 2307 2315 // We've got all the data -- post it: 2308 2316 $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'to_ping', 'post_type', 'post_name', 'post_password', 'post_parent', 'menu_order', 'tags_input', 'page_template'); 2309 2317 … … 2567 2575 } 2568 2576 } 2569 2577 } 2578 if ( isset( $content_struct['wp_category_ids'] ) ) { 2579 $catids = array_map( 'intval', $content_struct['wp_category_ids'] ); 2580 logIO('O', 'Post cat ids: ' . var_export($catids, true)); 2570 2581 2582 if ( is_array($catids) ) { 2583 $post_category = array_merge( $post_category, array_diff( $catids, $post_category ) ); 2584 } 2585 } 2586 2571 2587 $post_excerpt = isset( $content_struct['mt_excerpt'] ) ? $content_struct['mt_excerpt'] : null; 2572 2588 $post_more = isset( $content_struct['mt_text_more'] ) ? $content_struct['mt_text_more'] : null; 2573 2589 … … 2755 2771 // commented out because no other tool seems to use this 2756 2772 // 'content' => $entry['post_content'], 2757 2773 'categories' => $categories, 2774 'wp_category_ids' => array_map( 'intval', $catids ), 2758 2775 'mt_excerpt' => $postdata['post_excerpt'], 2759 2776 'mt_text_more' => $post['extended'], 2760 2777 'mt_allow_comments' => $allow_comments, … … 2865 2882 // commented out because no other tool seems to use this 2866 2883 // 'content' => $entry['post_content'], 2867 2884 'categories' => $categories, 2885 'wp_category_ids' => array_map( 'intval', $catids ), 2868 2886 'mt_excerpt' => $entry['post_excerpt'], 2869 2887 'mt_text_more' => $post['extended'], 2870 2888 'mt_allow_comments' => $allow_comments,