Changeset 2653 for trunk/xmlrpc.php
- Timestamp:
- 06/19/2005 03:30:46 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r2649 r2653 508 508 $post_content = $post_content . "\n<!--more-->\n" . $post_more; 509 509 } 510 510 511 $to_ping = $content_struct['mt_tb_ping_urls']; 512 511 513 // Do some timestamp voodoo 512 514 $dateCreatedd = $content_struct['dateCreated']; … … 533 535 534 536 // We've got all the data -- post it: 535 $postdata = compact('post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status' );537 $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'); 536 538 537 539 $post_ID = wp_insert_post($postdata); … … 542 544 543 545 logIO('O', "Posted ! ID: $post_ID"); 544 545 // FIXME: do we pingback always? pingback($content, $post_ID);546 trackback_url_list($content_struct['mt_tb_ping_urls'],$post_ID);547 546 548 547 return strval($post_ID); … … 593 592 } 594 593 594 $to_ping = $content_struct['mt_tb_ping_urls']; 595 595 596 $comment_status = (empty($content_struct['mt_allow_comments'])) ? 596 597 get_settings('default_comment_status') … … 613 614 614 615 // We've got all the data -- post it: 615 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt' );616 617 $ post_ID= wp_update_post($newpost);618 if (!$ post_ID) {616 $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt', 'to_ping'); 617 618 $result = wp_update_post($newpost); 619 if (!$result) { 619 620 return new IXR_Error(500, 'Sorry, your entry could not be edited. Something wrong happened.'); 620 621 } 621 622 622 623 logIO('O',"(MW) Edited ! ID: $post_ID"); 623 624 // FIXME: do we pingback always? pingback($content, $post_ID);625 trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);626 624 627 625 return true;
Note: See TracChangeset
for help on using the changeset viewer.