Changeset 4833
- Timestamp:
- 01/30/2007 03:09:58 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r4814 r4833 1076 1076 } 1077 1077 1078 // Only s tethe menu_order if it was given.1078 // Only set the menu_order if it was given. 1079 1079 if(!empty($content_struct["wp_page_order"])) { 1080 1080 $menu_order = $content_struct["wp_page_order"]; 1081 } 1082 1083 // Only set the post_author if one is set. 1084 if(!empty($content_struct["wp_author"])) { 1085 $post_author = $content_struct["wp_author"]; 1081 1086 } 1082 1087 … … 1123 1128 1124 1129 // We've got all the data -- post it: 1125 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order' );1130 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping', 'post_name', 'post_password', 'post_parent', 'menu_order', 'post_author'); 1126 1131 1127 1132 $result = wp_update_post($newpost); … … 1234 1239 $link = post_permalink($entry['ID']); 1235 1240 1241 // Get the post author info. 1242 $author = get_userdata($entry['ID']); 1243 1236 1244 $allow_comments = ('open' == $entry['comment_status']) ? 1 : 0; 1237 1245 $allow_pings = ('open' == $entry['ping_status']) ? 1 : 0; … … 1251 1259 'mt_text_more' => $post['extended'], 1252 1260 'mt_allow_comments' => $allow_comments, 1253 'mt_allow_pings' => $allow_pings 1261 'mt_allow_pings' => $allow_pings, 1262 'wp_slug' => $entry['post_name'], 1263 'wp_password' => $entry['post_password'], 1264 'wp_author' => $author->user_nicename, 1265 'wp_author_username' => $author->user_login 1254 1266 ); 1255 1267
Note: See TracChangeset
for help on using the changeset viewer.