Make WordPress Core

Changeset 17667

Timestamp:
04/20/2011 06:02:41 PM (13 years ago)
Author:
ryan
Message:

Allow retrieving comments by post type, status, author, author, name, or parent. Fetch only published posts for recent comments widget. Props filosofo. fixes #16506 #12904

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r17613 r17667  
    214214            'post_ID' => '',
    215215            'post_id' => 0,
     216
     217
     218
     219
     220
    216221            'status' => '',
    217222            'type' => '',
     
    320325            $where .= $this->get_search_sql( $search, array( 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_author_IP', 'comment_content' ) );
    321326
     327
     328
     329
     330
     331
     332
     333
    322334        $pieces = array( 'fields', 'join', 'where', 'orderby', 'order', 'limits' );
    323335        $clauses = apply_filters_ref_array( 'comments_clauses', array( compact( $pieces ), &$this ) );
  • trunk/wp-includes/default-widgets.php

    r17655 r17667  
    641641            $number = 5;
    642642
    643         $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) );
     643        $comments = get_comments( array( 'number' => $number, 'status' => 'approve' ) );
    644644        $output .= $before_widget;
    645645        if ( $title )
Note: See TracChangeset for help on using the changeset viewer.