Changeset 33891
- Timestamp:
- 09/03/2015 06:16:35 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/edit-form-comment.php
r33774 r33891 172 172 * @since 3.0.0 173 173 * 174 * @param object $comment Comment object.174 * @param WP_Comment $comment Comment object. 175 175 */ 176 176 do_action( 'add_meta_boxes_comment', $comment ); -
trunk/src/wp-admin/includes/comment.php
r32672 r33891 75 75 76 76 /** 77 * Returns a comment object based on comment ID.77 * Returns a WP_Comment object based on comment ID. 78 78 * 79 79 * @since 2.0.0 80 80 * 81 81 * @param int $id ID of comment to retrieve. 82 * @return object|false Comment if found. False on failure.82 * @return WP_Comment|false Comment if found. False on failure. 83 83 */ 84 84 function get_comment_to_edit( $id ) { -
trunk/src/wp-admin/includes/dashboard.php
r33833 r33891 549 549 550 550 /** 551 * @global object $comment552 * 553 * @param object $comment554 * @param bool $show_date551 * @global WP_Comment $comment 552 * 553 * @param WP_Comment $comment 554 * @param bool $show_date 555 555 */ 556 556 function _wp_dashboard_recent_comments_row( &$comment, $show_date = true ) { … … 604 604 * @since 2.6.0 605 605 * 606 * @param array $actions An array of comment actions. Default actions include:607 * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam',608 * 'Delete', and 'Trash'.609 * @param object $comment The comment object.606 * @param array $actions An array of comment actions. Default actions include: 607 * 'Approve', 'Unapprove', 'Edit', 'Reply', 'Spam', 608 * 'Delete', and 'Trash'. 609 * @param WP_Comment $comment The comment object. 610 610 */ 611 611 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); -
trunk/src/wp-admin/includes/export.php
r32964 r33891 474 474 <?php endforeach; 475 475 476 $comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); 476 $_comments = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); 477 $comments = array_map( 'get_comment', $_comments ); 477 478 foreach ( $comments as $c ) : ?> 478 479 <wp:comment> -
trunk/src/wp-admin/includes/template.php
r33774 r33891 744 744 * @since 0.71 745 745 * 746 * @global WP_Locale $wp_locale747 * @global object$comment746 * @global WP_Locale $wp_locale 747 * @global WP_Comment $comment 748 748 * 749 749 * @param int|bool $edit Accepts 1|true for editing the date, 0|false for adding the date. -
trunk/src/wp-comments-post.php
r31090 r33891 147 147 * @since 3.4.0 148 148 * 149 * @param object $comment Comment object.150 * @param WP_User $userUser object. The user may not exist.149 * @param WP_Comment $comment Comment object. 150 * @param WP_User $user User object. The user may not exist. 151 151 */ 152 152 do_action( 'set_comment_cookies', $comment, $user ); … … 159 159 * @since 2.0.5 160 160 * 161 * @param string $location The 'redirect_to' URI sent via $_POST.162 * @param object $comment Comment object.161 * @param string $location The 'redirect_to' URI sent via $_POST. 162 * @param WP_Comment $comment Comment object. 163 163 */ 164 164 $location = apply_filters( 'comment_post_redirect', $location, $comment ); -
trunk/src/wp-includes/class-wp-comment-query.php
r33750 r33891 666 666 * @param WP_Comment_Query &$this Current instance of WP_Comment_Query, passed by reference. 667 667 */ 668 $comments = apply_filters_ref_array( 'the_comments', array( $results, &$this ) ); 668 $_comments = apply_filters_ref_array( 'the_comments', array( $results, &$this ) ); 669 670 // Convert to WP_Comment instances 671 $comments = array_map( 'get_comment', $_comments ); 669 672 670 673 wp_cache_add( $cache_key, $comments, 'comment' ); -
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r33885 r33891 1043 1043 * @since 3.4.0 1044 1044 * 1045 * @param array $_comment An array of prepared comment data.1046 * @param object $comment Comment object.1045 * @param array $_comment An array of prepared comment data. 1046 * @param WP_Comment $comment Comment object. 1047 1047 */ 1048 1048 return apply_filters( 'xmlrpc_prepare_comment', $_comment, $comment ); -
trunk/src/wp-includes/comment-functions.php
r33822 r33891 165 165 * @global object $comment 166 166 * 167 * @param object|string|int $comment Comment to retrieve.167 * @param WP_Comment|string|int $comment Comment to retrieve. 168 168 * @param string $output Optional. OBJECT or ARRAY_A or ARRAY_N constants. 169 * @return object|array|null Depends on $output value.169 * @return WP_Comment|array|null Depends on $output value. 170 170 */ 171 171 function get_comment(&$comment, $output = OBJECT) { 172 global $wpdb; 173 174 if ( empty($comment) ) { 175 if ( isset($GLOBALS['comment']) ) 176 $_comment = & $GLOBALS['comment']; 177 else 178 $_comment = null; 179 } elseif ( is_object($comment) ) { 180 wp_cache_add($comment->comment_ID, $comment, 'comment'); 172 if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) { 173 $comment = $GLOBALS['comment']; 174 } 175 176 if ( $comment instanceof WP_Comment ) { 181 177 $_comment = $comment; 178 } elseif ( is_object( $comment ) ) { 179 $_comment = new WP_Comment( $comment ); 182 180 } else { 183 if ( isset($GLOBALS['comment']) && ($GLOBALS['comment']->comment_ID == $comment) ) { 184 $_comment = & $GLOBALS['comment']; 185 } elseif ( ! $_comment = wp_cache_get($comment, 'comment') ) { 186 $_comment = $wpdb->get_row($wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment)); 187 if ( ! $_comment ) 188 return null; 189 wp_cache_add($_comment->comment_ID, $_comment, 'comment'); 190 } 181 $_comment = WP_Comment::get_instance( $comment ); 182 } 183 184 if ( ! $_comment ) { 185 return null; 191 186 } 192 187 … … 203 198 return $_comment; 204 199 } elseif ( $output == ARRAY_A ) { 205 $__comment = get_object_vars($_comment); 206 return $__comment; 200 return $_comment->to_array(); 207 201 } elseif ( $output == ARRAY_N ) { 208 $__comment = array_values(get_object_vars($_comment)); 209 return $__comment; 210 } else { 211 return $_comment; 212 } 202 return array_values( $_comment->to_array() ); 203 } 204 return $_comment; 213 205 } 214 206 … … 480 472 * to recall previous comments by this commentator that are still held in moderation. 481 473 * 482 * @param object $comment Comment object.483 * @param object $userComment author's object.474 * @param WP_Comment $comment Comment object. 475 * @param object $user Comment author's object. 484 476 * 485 477 * @since 3.4.0 … … 761 753 * @global WP_Query $wp_query 762 754 * 763 * @param array $comments Optional array of comment objects. Defaults to $wp_query->comments755 * @param array $comments Optional array of WP_Comment objects. Defaults to $wp_query->comments 764 756 * @param int $per_page Optional comments per page. 765 757 * @param bool $threaded Optional control over flat or threaded comments. … … 1289 1281 * @since 2.7.0 1290 1282 * 1291 * @param object $comment Comment object.1283 * @param WP_Comment $comment Comment object. 1292 1284 */ 1293 1285 do_action( "comment_{$old_status}_to_{$new_status}", $comment ); … … 1304 1296 * @since 2.7.0 1305 1297 * 1306 * @param int $comment_ID The comment ID.1307 * @param obj$comment Comment object.1298 * @param int $comment_ID The comment ID. 1299 * @param WP_Comment $comment Comment object. 1308 1300 */ 1309 1301 do_action( "comment_{$new_status}_{$comment->comment_type}", $comment->comment_ID, $comment ); … … 1424 1416 * @since 2.8.0 1425 1417 * 1426 * @param int $id The comment ID.1427 * @param obj$comment Comment object.1418 * @param int $id The comment ID. 1419 * @param WP_Comment $comment Comment object. 1428 1420 */ 1429 1421 do_action( 'wp_insert_comment', $id, $comment ); -
trunk/src/wp-includes/comment-template.php
r33047 r33891 38 38 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 39 39 * 40 * @param string $author The comment author's username. 41 * @param int $comment_ID The comment ID. 42 * @param WP_Comment $comment The comment object. 43 */ 44 return apply_filters( 'get_comment_author', $author, $comment_ID, $comment ); 45 } 46 47 /** 48 * Displays the author of the current comment. 49 * 50 * @since 0.71 51 * 52 * @param int $comment_ID Optional. The ID of the comment for which to print the author. Default current comment. 53 */ 54 function comment_author( $comment_ID = 0 ) { 55 $author = get_comment_author( $comment_ID ); 56 57 /** 58 * Filter the comment author's name for display. 59 * 60 * @since 1.2.0 61 * @since 4.1.0 The `$comment_ID` parameter was added. 62 * 40 63 * @param string $author The comment author's username. 41 64 * @param int $comment_ID The comment ID. 42 * @param object $comment The comment object.43 */44 return apply_filters( 'get_comment_author', $author, $comment_ID, $comment );45 }46 47 /**48 * Displays the author of the current comment.49 *50 * @since 0.7151 *52 * @param int $comment_ID Optional. The ID of the comment for which to print the author. Default current comment.53 */54 function comment_author( $comment_ID = 0 ) {55 $author = get_comment_author( $comment_ID );56 57 /**58 * Filter the comment author's name for display.59 *60 * @since 1.2.061 * @since 4.1.0 The `$comment_ID` parameter was added.62 *63 * @param string $author The comment author's username.64 * @param int $comment_ID The comment ID.65 65 */ 66 66 echo apply_filters( 'comment_author', $author, $comment_ID ); … … 84 84 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 85 85 * 86 * @param string $comment_author_email The comment author's email address.87 * @param int $comment_ID The comment ID.88 * @param object $comment The comment object.86 * @param string $comment_author_email The comment author's email address. 87 * @param int $comment_ID The comment ID. 88 * @param WP_Comment $comment The comment object. 89 89 */ 90 90 return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment_ID, $comment ); … … 171 171 * @since 4.1.0 The `$comment` parameter was added. 172 172 * 173 * @param string $comment_author_email The comment author's email address.174 * @param object $comment The comment object.173 * @param string $comment_author_email The comment author's email address. 174 * @param WP_Comment $comment The comment object. 175 175 */ 176 176 $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment ); … … 251 251 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 252 252 * 253 * @param string $comment_author_IP The comment author's IP address.254 * @param int $comment_ID The comment ID.255 * @param object $comment The comment object.253 * @param string $comment_author_IP The comment author's IP address. 254 * @param int $comment_ID The comment ID. 255 * @param WP_Comment $comment The comment object. 256 256 */ 257 257 return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment_ID, $comment ); … … 290 290 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 291 291 * 292 * @param string $url The comment author's URL.293 * @param int $comment_ID The comment ID.294 * @param object $comment The comment object.292 * @param string $url The comment author's URL. 293 * @param int $comment_ID The comment ID. 294 * @param WP_Comment $comment The comment object. 295 295 */ 296 296 return apply_filters( 'get_comment_author_url', $url, $comment_ID, $comment ); … … 509 509 * @param string|int $date Formatted date string or Unix timestamp. 510 510 * @param string $d The format of the date. 511 * @param object$comment The comment object.511 * @param WP_Comment $comment The comment object. 512 512 */ 513 513 return apply_filters( 'get_comment_date', $date, $d, $comment ); … … 564 564 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 565 565 * 566 * @param string $excerpt The comment excerpt text.567 * @param int $comment_ID The comment ID.568 * @param object $comment The comment object.566 * @param string $excerpt The comment excerpt text. 567 * @param int $comment_ID The comment ID. 568 * @param WP_Comment $comment The comment object. 569 569 */ 570 570 return apply_filters( 'get_comment_excerpt', $excerpt, $comment_ID, $comment ); … … 612 612 * @since 4.1.0 The `$comment_ID` parameter was added. 613 613 * 614 * @param int $comment_ID The current comment ID.615 * @param object $comment The comment object.614 * @param int $comment_ID The current comment ID. 615 * @param WP_Comment $comment The comment object. 616 616 */ 617 617 return apply_filters( 'get_comment_ID', $comment->comment_ID, $comment ); … … 637 637 * @global bool $in_comment_loop 638 638 * 639 * @param mixed$comment Comment to retrieve. Default current comment.640 * @param array $args Optional. An array of arguments to override the defaults.639 * @param WP_Comment|int|null $comment Comment to retrieve. Default current comment. 640 * @param array $args Optional. An array of arguments to override the defaults. 641 641 * @return string The permalink to the given comment. 642 642 */ … … 682 682 * @see get_page_of_comment() 683 683 * 684 * @param string $link The comment permalink with '#comment-$id' appended.685 * @param object $comment The current comment object.686 * @param array $args An array of arguments to override the defaults.684 * @param string $link The comment permalink with '#comment-$id' appended. 685 * @param WP_Comment $comment The current comment object. 686 * @param array $args An array of arguments to override the defaults. 687 687 */ 688 688 return apply_filters( 'get_comment_link', $link, $comment, $args ); … … 826 826 * @see Walker_Comment::comment() 827 827 * 828 * @param string $comment_content Text of the comment.829 * @param object $comment The comment object.830 * @param array $args An array of arguments.828 * @param string $comment_content Text of the comment. 829 * @param WP_Comment $comment The comment object. 830 * @param array $args An array of arguments. 831 831 */ 832 832 return apply_filters( 'get_comment_text', $comment->comment_content, $comment, $args ); … … 854 854 * @see Walker_Comment::comment() 855 855 * 856 * @param string $comment_text Text of the current comment.857 * @param object $comment The comment object.858 * @param array $args An array of arguments.856 * @param string $comment_text Text of the current comment. 857 * @param WP_Comment $comment The comment object. 858 * @param array $args An array of arguments. 859 859 */ 860 860 echo apply_filters( 'comment_text', $comment_text, $comment, $args ); … … 891 891 * @param bool $gmt Whether the GMT date is in use. 892 892 * @param bool $translate Whether the time is translated. 893 * @param object$comment The comment object.893 * @param WP_Comment $comment The comment object. 894 894 */ 895 895 return apply_filters( 'get_comment_time', $date, $d, $gmt, $translate, $comment ); … … 926 926 * @since 4.1.0 The `$comment_ID` and `$comment` parameters were added. 927 927 * 928 * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.929 * @param int $comment_ID The comment ID.930 * @param object $comment The comment object.928 * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. 929 * @param int $comment_ID The comment ID. 930 * @param WP_Comment $comment The comment object. 931 931 */ 932 932 return apply_filters( 'get_comment_type', $comment->comment_type, $comment_ID, $comment ); … … 1859 1859 * @see wp_list_comments() 1860 1860 * 1861 * @param string $output Passed by reference. Used to append additional content.1862 * @param object $comment The comment object. Default current comment.1863 * @param int $depth Depth of comment.1864 * @param array $args An array of arguments.1861 * @param string $output Passed by reference. Used to append additional content. 1862 * @param WP_Comment $comment The comment object. Default current comment. 1863 * @param int $depth Depth of comment. 1864 * @param array $args An array of arguments. 1865 1865 */ 1866 1866 public function end_el( &$output, $comment, $depth = 0, $args = array() ) { … … 1885 1885 * @see wp_list_comments() 1886 1886 * 1887 * @param object $comment The comment object.1888 * @param int $depth Depth of comment.1889 * @param array $args An array of arguments.1887 * @param WP_Comment $comment The comment object. 1888 * @param int $depth Depth of comment. 1889 * @param array $args An array of arguments. 1890 1890 */ 1891 1891 protected function ping( $comment, $depth, $args ) { … … 2049 2049 * @type bool $echo Whether to echo the output or return it. Default true. 2050 2050 * } 2051 * @param array $comments Optional. Array of comment objects.2051 * @param array $comments Optional. Array of WP_Comment objects. 2052 2052 */ 2053 2053 function wp_list_comments( $args = array(), $comments = null ) { -
trunk/src/wp-includes/comment.php
r33750 r33891 7 7 */ 8 8 9 require_once( ABSPATH . WPINC . '/class-wp-comment.php' ); 9 10 require_once( ABSPATH . WPINC . '/class-wp-comment-query.php' ); 10 11 require_once( ABSPATH . WPINC . '/comment-functions.php' ); -
trunk/src/wp-includes/feed.php
r33605 r33891 265 265 * @since 2.5.0 266 266 * 267 * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. 267 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 268 * user email, WP_User object, WP_Post object, or WP_Comment object. 268 269 */ 269 270 function comment_guid($comment_id = null) { … … 276 277 * @since 2.5.0 277 278 * 278 * @param int|object $comment_id Optional comment object or id. Defaults to global comment object. 279 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 280 * user email, WP_User object, WP_Post object, or WP_Comment object. 279 281 * @return false|string false on failure or guid for comment on success. 280 282 */ -
trunk/src/wp-includes/link-template.php
r33805 r33891 3455 3455 * 3456 3456 * @param mixed $id_or_email The Gravatar to retrieve a URL for. Accepts a user_id, gravatar md5 hash, 3457 * user email, WP_User object, WP_Post object, or comment object.3457 * user email, WP_User object, WP_Post object, or WP_Comment object. 3458 3458 * @param array $args { 3459 3459 * Optional. Arguments to return instead of the default arguments. … … 3486 3486 * @since 4.2.0 3487 3487 * 3488 * @param mixed $id_or_email The Gravatar to check the data against. Accepts a user_id, gravatar md5 hash,3489 * user email, WP_User object, WP_Post object, or comment object.3488 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 3489 * user email, WP_User object, WP_Post object, or WP_Comment object. 3490 3490 * @param array $args { 3491 3491 * Optional. Arguments to return instead of the default arguments. … … 3587 3587 * @since 4.2.0 3588 3588 * 3589 * @param array $args Arguments passed to get_avatar_data(), after processing. 3590 * @param int|object|string $id_or_email A user ID, email address, or comment object. 3589 * @param array $args Arguments passed to get_avatar_data(), after processing. 3590 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 3591 * user email, WP_User object, WP_Post object, or WP_Comment object. 3591 3592 */ 3592 3593 $args = apply_filters( 'pre_get_avatar_data', $args, $id_or_email ); … … 3617 3618 // Post Object 3618 3619 $user = get_user_by( 'id', (int) $id_or_email->post_author ); 3619 } elseif ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) { 3620 // Comment Object 3621 3620 } elseif ( $id_or_email instanceof WP_Comment ) { 3622 3621 /** 3623 3622 * Filter the list of allowed comment types for retrieving avatars. … … 3682 3681 * @since 4.2.0 3683 3682 * 3684 * @param string $url The URL of the avatar. 3685 * @param int|object|string $id_or_email A user ID, email address, or comment object. 3686 * @param array $args Arguments passed to get_avatar_data(), after processing. 3683 * @param string $url The URL of the avatar. 3684 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 3685 * user email, WP_User object, WP_Post object, or WP_Comment object. 3686 * @param array $args Arguments passed to get_avatar_data(), after processing. 3687 3687 */ 3688 3688 $args['url'] = apply_filters( 'get_avatar_url', $url, $id_or_email, $args ); … … 3693 3693 * @since 4.2.0 3694 3694 * 3695 * @param array $args Arguments passed to get_avatar_data(), after processing. 3696 * @param int|object|string $id_or_email A user ID, email address, or comment object. 3695 * @param array $args Arguments passed to get_avatar_data(), after processing. 3696 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 3697 * user email, WP_User object, WP_Post object, or WP_Comment object. 3697 3698 */ 3698 3699 return apply_filters( 'get_avatar_data', $args, $id_or_email ); -
trunk/src/wp-includes/pluggable.php
r33827 r33891 2191 2191 * 2192 2192 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 2193 * user email, WP_User object, WP_Post object, or comment object.2193 * user email, WP_User object, WP_Post object, or WP_Comment object. 2194 2194 * @param int $size Optional. Height and width of the avatar image file in pixels. Default 96. 2195 2195 * @param string $default Optional. URL for the default image or a default type. Accepts '404' … … 2259 2259 * @since 4.2.0 2260 2260 * 2261 * @param string $avatar HTML for the user's avatar. Default null. 2262 * @param int|object|string $id_or_email A user ID, email address, or comment object. 2263 * @param array $args Arguments passed to get_avatar_url(), after processing. 2261 * @param string $avatar HTML for the user's avatar. Default null. 2262 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 2263 * user email, WP_User object, WP_Post object, or WP_Comment object. 2264 * @param array $args Arguments passed to get_avatar_url(), after processing. 2264 2265 */ 2265 2266 $avatar = apply_filters( 'pre_get_avatar', null, $id_or_email, $args ); … … 2315 2316 * @since 4.2.0 The `$args` parameter was added. 2316 2317 * 2317 * @param string $avatar <img> tag for the user's avatar. 2318 * @param int|object|string $id_or_email A user ID, email address, or comment object. 2319 * @param int $size Square avatar width and height in pixels to retrieve. 2320 * @param string $alt Alternative text to use in the avatar image tag. 2318 * @param string $avatar <img> tag for the user's avatar. 2319 * @param mixed $id_or_email The Gravatar to retrieve. Accepts a user_id, gravatar md5 hash, 2320 * user email, WP_User object, WP_Post object, or WP_Comment object. 2321 * @param int $size Square avatar width and height in pixels to retrieve. 2322 * @param string $alt Alternative text to use in the avatar image tag. 2321 2323 * Default empty. 2322 * @param array 2324 * @param array $args Arguments passed to get_avatar_data(), after processing. 2323 2325 */ 2324 2326 return apply_filters( 'get_avatar', $avatar, $id_or_email, $args['size'], $args['default'], $args['alt'], $args ); -
trunk/src/wp-includes/query.php
r33734 r33891 3187 3187 $corderby = ( ! empty( $corderby ) ) ? 'ORDER BY ' . $corderby : ''; 3188 3188 3189 $this->comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"); 3189 $comments = (array) $wpdb->get_results("SELECT $distinct $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"); 3190 // Convert to WP_Comment 3191 $this->comments = array_map( 'get_comment', $comments ); 3190 3192 $this->comment_count = count($this->comments); 3191 3193 … … 3558 3560 3559 3561 $comments_request = "SELECT $wpdb->comments.* FROM $wpdb->comments $cjoin $cwhere $cgroupby $corderby $climits"; 3560 $this->comments = $wpdb->get_results($comments_request); 3562 $comments = $wpdb->get_results($comments_request); 3563 // Convert to WP_Comment 3564 $this->comments = array_map( 'get_comment', $comments ); 3561 3565 $this->comment_count = count($this->comments); 3562 3566 } … … 3813 3817 3814 3818 /** 3815 * Iterate current comment index and return comment object.3819 * Iterate current comment index and return WP_Comment object. 3816 3820 * 3817 3821 * @since 2.2.0 3818 3822 * @access public 3819 3823 * 3820 * @return object Comment object.3824 * @return WP_Comment Comment object. 3821 3825 */ 3822 3826 public function next_comment() {
Note: See TracChangeset
for help on using the changeset viewer.