Changeset 33891 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 09/03/2015 06:16:35 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 ) {
Note: See TracChangeset
for help on using the changeset viewer.