Changeset 30092
- Timestamp:
- 10/29/2014 07:07:00 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r30039 r30092 37 37 * @since 1.5.0 38 38 * 39 * @param string $author The comment author's username. 40 */ 41 return apply_filters( 'get_comment_author', $author ); 39 * @param string $author The comment author's username. 40 * @param int $comment_ID The comment ID 41 * @param object $comment The comment 42 */ 43 return apply_filters( 'get_comment_author', $author, $comment_ID, $comment ); 42 44 } 43 45 … … 57 59 * 58 60 * @param string $author The comment author's username. 59 */ 60 $author = apply_filters( 'comment_author', $author ); 61 * @param int $comment_ID The comment ID 62 */ 63 $author = apply_filters( 'comment_author', $author, $comment_ID ); 61 64 echo $author; 62 65 } … … 78 81 * 79 82 * @param string $comment_author_email The comment author's email address. 80 */ 81 return apply_filters( 'get_comment_author_email', $comment->comment_author_email ); 83 * @param int $comment_ID The comment ID 84 * @param object $comment The comment 85 */ 86 return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment_ID, $comment ); 82 87 } 83 88 … … 103 108 * 104 109 * @param string $author_email The comment author's email address. 105 */ 106 echo apply_filters( 'author_email', $author_email ); 110 * @param int $comment_ID The comment ID 111 */ 112 echo apply_filters( 'author_email', $author_email, $comment_ID ); 107 113 } 108 114 … … 157 163 * 158 164 * @param string $comment_author_email The comment author's email address. 159 */ 160 $email = apply_filters( 'comment_email', $comment->comment_author_email ); 165 * @param object $comment The comment 166 */ 167 $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment ); 161 168 if ((!empty($email)) && ($email != '@')) { 162 169 $display = ($linktext != '') ? $linktext : $email; … … 196 203 * @since 1.5.0 197 204 * 198 * @param string $return The HTML-formatted comment author link. 199 * Empty for an invalid URL. 200 */ 201 return apply_filters( 'get_comment_author_link', $return ); 205 * @param string $return The HTML-formatted comment author link. 206 * Empty for an invalid URL. 207 * @param int $comment_ID The comment ID 208 */ 209 return apply_filters( 'get_comment_author_link', $return, $author, $comment_ID ); 202 210 } 203 211 … … 234 242 * 235 243 * @param string $comment_author_IP The comment author's IP address. 236 */ 237 return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP ); 244 * @param int $comment_ID The comment ID 245 * @param object $comment The comment 246 */ 247 return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment_ID, $comment ); 238 248 } 239 249 … … 268 278 * @since 1.5.0 269 279 * 270 * @param string $url The comment author's URL. 271 */ 272 return apply_filters( 'get_comment_author_url', $url ); 280 * @param string $url The comment author's URL. 281 * @param int $comment_ID The comment ID 282 * @param object $comment The comment 283 */ 284 return apply_filters( 'get_comment_author_url', $url, $comment_ID, $comment ); 273 285 } 274 286 … … 289 301 * 290 302 * @param string $author_url The comment author's URL. 291 */ 292 echo apply_filters( 'comment_url', $author_url ); 303 * @param int $comment_ID The comment ID 304 */ 305 echo apply_filters( 'comment_url', $author_url, $comment_ID ); 293 306 } 294 307 … … 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 … … 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 … … 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; … … 514 532 $use_dotdotdot = 0; 515 533 } 534 516 535 $excerpt = ''; 517 536 for ($i=0; $i<$k; $i++) { … … 525 544 * @since 1.5.0 526 545 * 527 * @param string $excerpt The comment excerpt text. 528 */ 529 return apply_filters( 'get_comment_excerpt', $excerpt ); 546 * @param string $excerpt The comment excerpt text. 547 * @param int $comment_ID The comment ID 548 * @param object $comment The comment 549 */ 550 return apply_filters( 'get_comment_excerpt', $excerpt, $comment_ID, $comment ); 530 551 } 531 552 … … 545 566 * @since 1.2.0 546 567 * 547 * @param string $comment_excerpt The comment excerpt text. 548 */ 549 echo apply_filters( 'comment_excerpt', $comment_excerpt ); 568 * @param string $comment_excerpt The comment excerpt text. 569 * @param int $comment_ID The comment ID 570 */ 571 echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment_ID ); 550 572 } 551 573 … … 564 586 * @since 1.5.0 565 587 * 566 * @param int $comment_ID The current comment ID. 567 */ 568 return apply_filters( 'get_comment_ID', $comment->comment_ID ); 588 * @param int $comment_ID The current comment ID. 589 * @param object $comment The comment 590 */ 591 return apply_filters( 'get_comment_ID', $comment->comment_ID, $comment ); 569 592 } 570 593 … … 871 894 * @since 1.5.0 872 895 * 873 * @param string $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. 874 */ 875 return apply_filters( 'get_comment_type', $comment->comment_type ); 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 899 */ 900 return apply_filters( 'get_comment_type', $comment->comment_type, $comment_ID, $comment ); 876 901 } 877 902
Note: See TracChangeset
for help on using the changeset viewer.