Changeset 5981
- Timestamp:
- 08/29/2007 11:01:48 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r5898 r5981 990 990 $post_more = $content_struct['mt_text_more']; 991 991 992 $tags_input = $content_struct['mt_keywords']; 993 992 994 if(isset($content_struct["mt_allow_comments"])) { 993 995 if(!is_numeric($content_struct["mt_allow_comments"])) { … … 1084 1086 1085 1087 // We've got all the data -- post it: 1086 $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' );1088 $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'); 1087 1089 1088 1090 $post_ID = wp_insert_post($postdata); … … 1277 1279 $post_status = $publish ? 'publish' : 'draft'; 1278 1280 1281 $tags_input = $content_struct['mt_keywords']; 1282 1279 1283 if ( ('publish' == $post_status) ) { 1280 1284 if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') ) … … 1304 1308 1305 1309 // We've got all the data -- post it: 1306 $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' );1310 $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'); 1307 1311 1308 1312 $result = wp_update_post($newpost); … … 1345 1349 $categories[] = get_cat_name($catid); 1346 1350 } 1351 1352 $tagnames = array(); 1353 $tags = wp_get_post_tags( $post_ID ); 1354 if ( !empty( $tags ) ) { 1355 foreach ( $tags as $tag ) { 1356 $tagnames[] = $tag->name; 1357 } 1358 $tagnames = implode( ', ', $tagnames ); 1359 } else { 1360 $tagnames = ''; 1361 } 1347 1362 1348 1363 $post = get_extended($postdata['post_content']); … … 1370 1385 'mt_allow_comments' => $allow_comments, 1371 1386 'mt_allow_pings' => $allow_pings, 1387 'mt_keywords' => $tagnames, 1372 1388 'wp_slug' => $postdata['post_name'], 1373 1389 'wp_password' => $postdata['post_password'], … … 1414 1430 foreach($catids as $catid) { 1415 1431 $categories[] = get_cat_name($catid); 1432 } 1433 1434 $tagnames = array(); 1435 $tags = wp_get_post_tags( $entry['ID'] ); 1436 if ( !empty( $tags ) ) { 1437 foreach ( $tags as $tag ) { 1438 $tagnames[] = $tag->name; 1439 } 1440 $tagnames = implode( ', ', $tagnames ); 1441 } else { 1442 $tagnames = ''; 1416 1443 } 1417 1444 … … 1440 1467 'mt_allow_comments' => $allow_comments, 1441 1468 'mt_allow_pings' => $allow_pings, 1469 'mt_keywords' => $tagnames, 1442 1470 'wp_slug' => $entry['post_name'], 1443 1471 'wp_password' => $entry['post_password'],
Note: See TracChangeset
for help on using the changeset viewer.