Changeset 5279
- Timestamp:
- 04/17/2007 04:52:11 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r5278 r5279 990 990 $post_more = $content_struct['mt_text_more']; 991 991 992 $tags_input = $content_struct['mt_keywords'];993 994 992 $comment_status = (!isset($content_struct['mt_allow_comments'])) ? 995 993 get_option('default_comment_status') … … 1030 1028 1031 1029 // We've got all the data -- post it: 1032 $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');1030 $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'); 1033 1031 1034 1032 $post_ID = wp_insert_post($postdata); … … 1174 1172 $post_status = $publish ? 'publish' : 'draft'; 1175 1173 1176 $tags_input = $content_struct['mt_keywords'];1177 1178 1174 if ( ('publish' == $post_status) ) { 1179 1175 if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') ) … … 1207 1203 1208 1204 // We've got all the data -- post it: 1209 $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' , 'tags_input');1205 $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'); 1210 1206 1211 1207 $result = wp_update_post($newpost); … … 1247 1243 $categories[] = get_cat_name($catid); 1248 1244 } 1249 1250 $tagnames = array();1251 $tags = get_post_tags( $post_ID );1252 if ( !empty( $tags ) ) {1253 foreach ( $tags as $tag ) {1254 $tagnames[] = $tag->cat_name;1255 }1256 $tagnames = implode( ', ', $tagnames );1257 } else {1258 $tagnames = '';1259 }1260 1245 1261 1246 $post = get_extended($postdata['post_content']); … … 1283 1268 'mt_allow_comments' => $allow_comments, 1284 1269 'mt_allow_pings' => $allow_pings, 1285 'mt_keywords' => $tagnames,1286 1270 'wp_slug' => $postdata['post_name'], 1287 1271 'wp_password' => $postdata['post_password'], … … 1325 1309 foreach($catids as $catid) { 1326 1310 $categories[] = get_cat_name($catid); 1327 }1328 1329 $tagnames = array();1330 $tags = get_post_tags( $entry['ID'] );1331 if ( !empty( $tags ) ) {1332 foreach ( $tags as $tag ) {1333 $tagnames[] = $tag->cat_name;1334 }1335 $tagnames = implode( ', ', $tagnames );1336 } else {1337 $tagnames = '';1338 1311 } 1339 1312 … … 1362 1335 'mt_allow_comments' => $allow_comments, 1363 1336 'mt_allow_pings' => $allow_pings, 1364 'mt_keywords' => $tagnames,1365 1337 'wp_slug' => $entry['post_name'], 1366 1338 'wp_password' => $entry['post_password'],
Note: See TracChangeset
for help on using the changeset viewer.