Make WordPress Core

Changeset 5089 for trunk/xmlrpc.php


Ignore:
Timestamp:
03/23/2007 02:05:29 AM (19 years ago)
Author:
matt
Message:

Ryan slays the dragon. (Some of these return WP_Error objects.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r5087 r5089  
    513513        );
    514514
    515         $cat_id = (int) wp_insert_category($new_category);
     515        $cat_id = wp_insert_category($new_category);
    516516        if(!$cat_id) {
    517517            return(new IXR_Error(500, "Sorry, the new category failed."));
     
    803803      $post_data = compact('blog_ID', 'post_author', 'post_date', 'post_date_gmt', 'post_content', 'post_title', 'post_category', 'post_status');
    804804
    805       $post_ID = (int) wp_insert_post($post_data);
     805      $post_ID = wp_insert_post($post_data);
    806806
    807807      if (!$post_ID) {
     
    10311031      $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');
    10321032
    1033       $post_ID = (int) wp_insert_post($postdata);
     1033      $post_ID = wp_insert_post($postdata);
    10341034
    10351035      if (!$post_ID) {
     
    14481448
    14491449        // Save the data
    1450         $id = (int) wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
     1450        $id = wp_insert_attachment( $attachment, $upload[ 'file' ], $post_id );
    14511451        wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $upload['file'] ) );
    14521452
     
    18381838        $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_url', 'comment_content', 'comment_type');
    18391839
    1840         $comment_ID = (int) wp_new_comment($commentdata);
     1840        $comment_ID = wp_new_comment($commentdata);
    18411841        do_action('pingback_post', $comment_ID);
    18421842
     
    18561856        $url = $args;
    18571857
    1858         $post_ID = (int) url_to_postid($url);
     1858        $post_ID = url_to_postid($url);
    18591859        if (!$post_ID) {
    18601860            // We aren't sure that the resource is available and/or pingback enabled
Note: See TracChangeset for help on using the changeset viewer.