Make WordPress Core

Ticket #21733: fields-count.diff

File fields-count.diff, 695 bytes (added by wonderboymusic, 11 years ago)
  • wp-includes/query.php

     
    26142614                }
    26152615
    26162616                if ( 'ids' == $q['fields'] ) {
    2617                         $this->posts = $wpdb->get_col($this->request);
    2618 
     2617                        $this->posts = $wpdb->get_col( $this->request );
     2618                        $this->post_count = count( $this->posts );
     2619                       
    26192620                        return $this->posts;
    26202621                }
    26212622
    26222623                if ( 'id=>parent' == $q['fields'] ) {
    2623                         $this->posts = $wpdb->get_results($this->request);
     2624                        $this->posts = $wpdb->get_results( $this->request );
     2625                        $this->post_count = count( $this->posts );
    26242626
    26252627                        $r = array();
    26262628                        foreach ( $this->posts as $post )