diff --git src/wp-includes/comment-template.php src/wp-includes/comment-template.php
index ab03817..9b7b1d9 100644
|
|
|
function get_comment_author( $comment_ID = 0 ) { |
| 36 | 36 | * |
| 37 | 37 | * @since 1.5.0 |
| 38 | 38 | * |
| 39 | | * @param string $author The comment author's username. |
| | 39 | * @param string $author The comment author's username. |
| | 40 | * @param int $comment_ID The comment ID |
| | 41 | * @param object $comment The comment |
| 40 | 42 | */ |
| 41 | | return apply_filters( 'get_comment_author', $author ); |
| | 43 | return apply_filters( 'get_comment_author', $author, $comment_ID, $comment ); |
| 42 | 44 | } |
| 43 | 45 | |
| 44 | 46 | /** |
| … |
… |
function comment_author( $comment_ID = 0 ) { |
| 56 | 58 | * @since 1.2.0 |
| 57 | 59 | * |
| 58 | 60 | * @param string $author The comment author's username. |
| | 61 | * @param int $comment_ID The comment ID |
| 59 | 62 | */ |
| 60 | | $author = apply_filters( 'comment_author', $author ); |
| | 63 | $author = apply_filters( 'comment_author', $author, $comment_ID ); |
| 61 | 64 | echo $author; |
| 62 | 65 | } |
| 63 | 66 | |
| … |
… |
function get_comment_author_email( $comment_ID = 0 ) { |
| 77 | 80 | * @since 1.5.0 |
| 78 | 81 | * |
| 79 | 82 | * @param string $comment_author_email The comment author's email address. |
| | 83 | * @param int $comment_ID The comment ID |
| | 84 | * @param object $comment The comment |
| 80 | 85 | */ |
| 81 | | return apply_filters( 'get_comment_author_email', $comment->comment_author_email ); |
| | 86 | return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment_ID, $comment ); |
| 82 | 87 | } |
| 83 | 88 | |
| 84 | 89 | /** |
| … |
… |
function comment_author_email( $comment_ID = 0 ) { |
| 102 | 107 | * @since 1.2.0 |
| 103 | 108 | * |
| 104 | 109 | * @param string $author_email The comment author's email address. |
| | 110 | * @param int $comment_ID The comment ID |
| 105 | 111 | */ |
| 106 | | echo apply_filters( 'author_email', $author_email ); |
| | 112 | echo apply_filters( 'author_email', $author_email, $comment_ID ); |
| 107 | 113 | } |
| 108 | 114 | |
| 109 | 115 | /** |
| … |
… |
function get_comment_author_email_link( $linktext = '', $before = '', $after = ' |
| 156 | 162 | * @since 1.2.0 |
| 157 | 163 | * |
| 158 | 164 | * @param string $comment_author_email The comment author's email address. |
| | 165 | * @param object $comment The comment |
| 159 | 166 | */ |
| 160 | | $email = apply_filters( 'comment_email', $comment->comment_author_email ); |
| | 167 | $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment ); |
| 161 | 168 | if ((!empty($email)) && ($email != '@')) { |
| 162 | 169 | $display = ($linktext != '') ? $linktext : $email; |
| 163 | 170 | $return = $before; |
| … |
… |
function get_comment_author_link( $comment_ID = 0 ) { |
| 195 | 202 | * |
| 196 | 203 | * @since 1.5.0 |
| 197 | 204 | * |
| 198 | | * @param string $return The HTML-formatted comment author link. |
| 199 | | * Empty for an invalid URL. |
| | 205 | * @param string $return The HTML-formatted comment author link. |
| | 206 | * Empty for an invalid URL. |
| | 207 | * @param int $comment_ID The comment ID |
| 200 | 208 | */ |
| 201 | | return apply_filters( 'get_comment_author_link', $return ); |
| | 209 | return apply_filters( 'get_comment_author_link', $return, $author, $comment_ID ); |
| 202 | 210 | } |
| 203 | 211 | |
| 204 | 212 | /** |
| … |
… |
function get_comment_author_IP( $comment_ID = 0 ) { |
| 233 | 241 | * @since 1.5.0 |
| 234 | 242 | * |
| 235 | 243 | * @param string $comment_author_IP The comment author's IP address. |
| | 244 | * @param int $comment_ID The comment ID |
| | 245 | * @param object $comment The comment |
| 236 | 246 | */ |
| 237 | | return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP ); |
| | 247 | return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment_ID, $comment ); |
| 238 | 248 | } |
| 239 | 249 | |
| 240 | 250 | /** |
| … |
… |
function get_comment_author_url( $comment_ID = 0 ) { |
| 267 | 277 | * |
| 268 | 278 | * @since 1.5.0 |
| 269 | 279 | * |
| 270 | | * @param string $url The comment author's URL. |
| | 280 | * @param string $url The comment author's URL. |
| | 281 | * @param int $comment_ID The comment ID |
| | 282 | * @param object $comment The comment |
| 271 | 283 | */ |
| 272 | | return apply_filters( 'get_comment_author_url', $url ); |
| | 284 | return apply_filters( 'get_comment_author_url', $url, $comment_ID, $comment ); |
| 273 | 285 | } |
| 274 | 286 | |
| 275 | 287 | /** |
| … |
… |
function comment_author_url( $comment_ID = 0 ) { |
| 288 | 300 | * @since 1.2.0 |
| 289 | 301 | * |
| 290 | 302 | * @param string $author_url The comment author's URL. |
| | 303 | * @param int $comment_ID The comment ID |
| 291 | 304 | */ |
| 292 | | echo apply_filters( 'comment_url', $author_url ); |
| | 305 | echo apply_filters( 'comment_url', $author_url, $comment_ID ); |
| 293 | 306 | } |
| 294 | 307 | |
| 295 | 308 | /** |
| … |
… |
function get_comment_author_url_link( $linktext = '', $before = '', $after = '' |
| 317 | 330 | $display = ($linktext != '') ? $linktext : $url; |
| 318 | 331 | $display = str_replace( 'http://www.', '', $display ); |
| 319 | 332 | $display = str_replace( 'http://', '', $display ); |
| 320 | | if ( '/' == substr($display, -1) ) |
| | 333 | |
| | 334 | if ( '/' == substr($display, -1) ) { |
| 321 | 335 | $display = substr($display, 0, -1); |
| | 336 | } |
| | 337 | |
| 322 | 338 | $return = "$before<a href='$url' rel='external'>$display</a>$after"; |
| 323 | 339 | |
| 324 | 340 | /** |
| … |
… |
function get_comment_class( $class = '', $comment_id = null, $post_id = null ) { |
| 445 | 461 | * @param array $classes An array of comment classes. |
| 446 | 462 | * @param string $class A comma-separated list of additional classes added to the list. |
| 447 | 463 | * @param int $comment_id The comment id. |
| | 464 | * @param object $comment The comment |
| 448 | 465 | * @param int|WP_Post $post_id The post ID or WP_Post object. |
| 449 | 466 | */ |
| 450 | | return apply_filters( 'comment_class', $classes, $class, $comment_id, $post_id ); |
| | 467 | return apply_filters( 'comment_class', $classes, $class, $comment_id, $comment, $post_id ); |
| 451 | 468 | } |
| 452 | 469 | |
| 453 | 470 | /** |
| … |
… |
function get_comment_excerpt( $comment_ID = 0 ) { |
| 506 | 523 | $comment = get_comment( $comment_ID ); |
| 507 | 524 | $comment_text = strip_tags($comment->comment_content); |
| 508 | 525 | $blah = explode(' ', $comment_text); |
| | 526 | |
| 509 | 527 | if (count($blah) > 20) { |
| 510 | 528 | $k = 20; |
| 511 | 529 | $use_dotdotdot = 1; |
| … |
… |
function get_comment_excerpt( $comment_ID = 0 ) { |
| 513 | 531 | $k = count($blah); |
| 514 | 532 | $use_dotdotdot = 0; |
| 515 | 533 | } |
| | 534 | |
| 516 | 535 | $excerpt = ''; |
| 517 | 536 | for ($i=0; $i<$k; $i++) { |
| 518 | 537 | $excerpt .= $blah[$i] . ' '; |
| … |
… |
function get_comment_excerpt( $comment_ID = 0 ) { |
| 524 | 543 | * |
| 525 | 544 | * @since 1.5.0 |
| 526 | 545 | * |
| 527 | | * @param string $excerpt The comment excerpt text. |
| | 546 | * @param string $excerpt The comment excerpt text. |
| | 547 | * @param int $comment_ID The comment ID |
| | 548 | * @param object $comment The comment |
| 528 | 549 | */ |
| 529 | | return apply_filters( 'get_comment_excerpt', $excerpt ); |
| | 550 | return apply_filters( 'get_comment_excerpt', $excerpt, $comment_ID, $comment ); |
| 530 | 551 | } |
| 531 | 552 | |
| 532 | 553 | /** |
| … |
… |
function comment_excerpt( $comment_ID = 0 ) { |
| 544 | 565 | * |
| 545 | 566 | * @since 1.2.0 |
| 546 | 567 | * |
| 547 | | * @param string $comment_excerpt The comment excerpt text. |
| | 568 | * @param string $comment_excerpt The comment excerpt text. |
| | 569 | * @param int $comment_ID The comment ID |
| 548 | 570 | */ |
| 549 | | echo apply_filters( 'comment_excerpt', $comment_excerpt ); |
| | 571 | echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment_ID ); |
| 550 | 572 | } |
| 551 | 573 | |
| 552 | 574 | /** |
| … |
… |
function get_comment_ID() { |
| 563 | 585 | * |
| 564 | 586 | * @since 1.5.0 |
| 565 | 587 | * |
| 566 | | * @param int $comment_ID The current comment ID. |
| | 588 | * @param int $comment_ID The current comment ID. |
| | 589 | * @param object $comment The comment |
| 567 | 590 | */ |
| 568 | | return apply_filters( 'get_comment_ID', $comment->comment_ID ); |
| | 591 | return apply_filters( 'get_comment_ID', $comment->comment_ID, $comment ); |
| 569 | 592 | } |
| 570 | 593 | |
| 571 | 594 | /** |
| … |
… |
function get_comment_type( $comment_ID = 0 ) { |
| 870 | 893 | * |
| 871 | 894 | * @since 1.5.0 |
| 872 | 895 | * |
| 873 | | * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. |
| | 896 | * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. |
| | 897 | * @param int $comment_ID The comment ID |
| | 898 | * @param object $comment The comment |
| 874 | 899 | */ |
| 875 | | return apply_filters( 'get_comment_type', $comment->comment_type ); |
| | 900 | return apply_filters( 'get_comment_type', $comment->comment_type, $comment_ID, $comment ); |
| 876 | 901 | } |
| 877 | 902 | |
| 878 | 903 | /** |