WordPress.org

Make WordPress Core

Changeset 23531


Ignore:
Timestamp:
02/28/2013 07:40:26 PM (5 years ago)
Author:
nacin
Message:

Revert [23359]. The post_author and comment_count post object fields will remain numeric strings for back compat. see #22324.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r23416 r23531  
    625625            'post_type'         => $post['post_type'],
    626626            'post_name'         => $post['post_name'],
    627             'post_author'       => (string) $post['post_author'],
     627            'post_author'       => $post['post_author'],
    628628            'post_password'     => $post['post_password'],
    629629            'post_excerpt'      => $post['post_excerpt'],
     
    807807        $_page = array(
    808808            'dateCreated'            => $page_date,
    809             'userid'                 => (string) $page->post_author,
     809            'userid'                 => $page->post_author,
    810810            'page_id'                => $page->ID,
    811811            'page_status'            => $page->post_status,
     
    36483648
    36493649        $struct = array(
    3650             'userid'      => (string) $post_data['post_author'],
     3650            'userid'    => $post_data['post_author'],
    36513651            'dateCreated' => $this->_convert_date( $post_data['post_date'] ),
    36523652            'content'     => $content,
    3653             'postid'      => (string) $post_data['ID']
     3653            'postid'  => (string) $post_data['ID']
    36543654        );
    36553655
     
    36993699
    37003700            $struct[] = array(
    3701                 'userid'      => (string) $entry['post_author'],
     3701                'userid' => $entry['post_author'],
    37023702                'dateCreated' => $post_date,
    3703                 'content'     => $content,
    3704                 'postid'      => (string) $entry['ID'],
     3703                'content' => $content,
     3704                'postid' => (string) $entry['ID'],
    37053705            );
    37063706
     
    45714571            $resp = array(
    45724572                'dateCreated' => $post_date,
    4573                 'userid' => (string) $postdata['post_author'],
     4573                'userid' => $postdata['post_author'],
    45744574                'postid' => $postdata['ID'],
    45754575                'description' => $post['main'],
     
    46824682            $struct[] = array(
    46834683                'dateCreated' => $post_date,
    4684                 'userid' => (string) $entry['post_author'],
     4684                'userid' => $entry['post_author'],
    46854685                'postid' => (string) $entry['ID'],
    46864686                'description' => $post['main'],
     
    48974897            $struct[] = array(
    48984898                'dateCreated' => $post_date,
    4899                 'userid' => (string) $entry['post_author'],
     4899                'userid' => $entry['post_author'],
    49004900                'postid' => (string) $entry['ID'],
    49014901                'title' => $entry['post_title'],
  • trunk/wp-includes/post.php

    r23466 r23531  
    19771977 */
    19781978function sanitize_post_field($field, $value, $post_id, $context) {
    1979     $int_fields = array('ID', 'post_parent', 'menu_order', 'post_author', 'comment_count');
     1979    $int_fields = array('ID', 'post_parent', 'menu_order');
    19801980    if ( in_array($field, $int_fields) )
    19811981        $value = (int) $value;
Note: See TracChangeset for help on using the changeset viewer.