Changeset 33961
- Timestamp:
- 09/09/2015 02:33:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r33925 r33961 17 17 * @since 1.5.0 18 18 * 19 * @param int $comment_ID Optional. The ID of the comment for which to retrieve the author. Default current comment. 19 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to retrieve the author. 20 * Default current comment. 20 21 * @return string The comment author 21 22 */ … … 50 51 * @since 0.71 51 52 * 52 * @param int $comment_ID Optional. The ID of the comment for which to print the author. Default current comment. 53 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author. 54 * Default current comment. 53 55 */ 54 56 function comment_author( $comment_ID = 0 ) { … … 72 74 * @since 1.5.0 73 75 * 74 * @param int $comment_ID Optional. The ID of the comment for which to get the author's email. Default current comment. 76 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's email. 77 * Default current comment. 75 78 * @return string The current comment author's email 76 79 */ … … 102 105 * @since 0.71 103 106 * 104 * @param int $comment_ID Optional. The ID of the comment for which to print the author's email. Default current comment. 107 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's email. 108 * Default current comment. 105 109 */ 106 110 function comment_author_email( $comment_ID = 0 ) { … … 194 198 * @since 1.5.0 195 199 * 196 * @param int $comment_IDID of the comment for which to get the author's link.197 * 200 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's link. 201 * Default current comment. 198 202 * @return string The comment author name or HTML link for author's URL. 199 203 */ … … 226 230 * @since 0.71 227 231 * 228 * @param int $comment_ID ID of the comment for which to print the author's229 * link.Default current comment.232 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's link. 233 * Default current comment. 230 234 */ 231 235 function comment_author_link( $comment_ID = 0 ) { … … 238 242 * @since 1.5.0 239 243 * 240 * @param int $comment_ID ID of the comment for which to get the author's IP241 * address.Default current comment.244 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's IP address. 245 * Default current comment. 242 246 * @return string Comment author's IP address. 243 247 */ … … 263 267 * @since 0.71 264 268 * 265 * @param int $comment_ID ID of the comment for which to print the author's IP266 * address.Default current comment.269 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address. 270 * Default current comment. 267 271 */ 268 272 function comment_author_IP( $comment_ID = 0 ) { … … 275 279 * @since 1.5.0 276 280 * 277 * @param int $comment_IDID of the comment for which to get the author's URL.278 * 281 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's URL. 282 * Default current comment. 279 283 * @return string 280 284 */ … … 302 306 * @since 0.71 303 307 * 304 * @param int $comment_IDID of the comment for which to print the author's URL.305 * 308 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's URL. 309 * Default current comment. 306 310 */ 307 311 function comment_author_url( $comment_ID = 0 ) { … … 383 387 * @since 2.7.0 384 388 * 385 * @param string|array $classOptional. One or more classes to add to the class list.389 * @param string|array $class Optional. One or more classes to add to the class list. 386 390 * Default empty. 387 * @param int $comment_id Comment ID. Default current comment.388 * @param int|WP_Post $post_idPost ID or WP_Post object. Default current post.389 * @param bool $echoOptional. Whether to cho or return the output.391 * @param int|WP_Comment $comment Comment ID or WP_Comment object. Default current comment. 392 * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post. 393 * @param bool $echo Optional. Whether to cho or return the output. 390 394 * Default true. 391 395 * @return string|void 392 396 */ 393 function comment_class( $class = '', $comment _id= null, $post_id = null, $echo = true ) {397 function comment_class( $class = '', $comment = null, $post_id = null, $echo = true ) { 394 398 // Separates classes with a single space, collates classes for comment DIV 395 $class = 'class="' . join( ' ', get_comment_class( $class, $comment _id, $post_id ) ) . '"';399 $class = 'class="' . join( ' ', get_comment_class( $class, $comment, $post_id ) ) . '"'; 396 400 if ( $echo) 397 401 echo $class; … … 409 413 * @global int $comment_thread_alt 410 414 * 411 * @param string|array $class Optional. One or more classes to add to the class list. Default empty.412 * @param int $comment_id Comment ID. Default current comment.413 * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post.415 * @param string|array $class Optional. One or more classes to add to the class list. Default empty. 416 * @param int|WP_Comment $comment_id Comment ID or WP_Comment object. Default current comment. 417 * @param int|WP_Post $post_id Post ID or WP_Post object. Default current post. 414 418 * @return array An array of classes. 415 419 */ … … 492 496 * @since 1.5.0 493 497 * 494 * @param string $d Optional. The format of the date. Default user's setting. 495 * @param int $comment_ID ID of the comment for which to get the date. Default current comment. 498 * @param string $d Optional. The format of the date. Default user's setting. 499 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the date. 500 * Default current comment. 496 501 * @return string The comment's date. 497 502 */ … … 519 524 * @since 0.71 520 525 * 521 * @param string $d Optional. The format of the date. Default user's settings. 522 * @param int $comment_ID ID of the comment for which to print the date. Default current comment. 526 * @param string $d Optional. The format of the date. Default user's settings. 527 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date. 528 * Default current comment. 523 529 */ 524 530 function comment_date( $d = '', $comment_ID = 0 ) { … … 535 541 * @since 1.5.0 536 542 * 537 * @param int $comment_IDID of the comment for which to get the excerpt.538 * Default current comment.543 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the excerpt. 544 * Default current comment. 539 545 * @return string The maybe truncated comment with 20 words or less. 540 546 */ … … 576 582 * @since 1.2.0 577 583 * 578 * @param int $comment_IDID of the comment for which to print the excerpt.579 * Default current comment.584 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the excerpt. 585 * Default current comment. 580 586 */ 581 587 function comment_excerpt( $comment_ID = 0 ) { … … 812 818 * @see Walker_Comment::comment() 813 819 * 814 * @param int $comment_ID ID of the comment for which to get the text. Default current comment. 815 * @param array $args Optional. An array of arguments. Default empty. 820 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the text. 821 * Default current comment. 822 * @param array $args Optional. An array of arguments. Default empty. 816 823 * @return string The comment content. 817 824 */ … … 840 847 * @see Walker_Comment::comment() 841 848 * 842 * @param int $comment_ID ID of the comment for which to print the text. Default 0. 843 * @param array $args Optional. An array of arguments. Default empty array. Default empty. 849 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the text. 850 * Default current comment. 851 * @param array $args Optional. An array of arguments. Default empty array. Default empty. 844 852 */ 845 853 function comment_text( $comment_ID = 0, $args = array() ) { … … 912 920 * @since 1.5.0 913 921 * 914 * @param int $comment_ID ID of the comment for which to get the type. Default current comment. 922 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the type. 923 * Default current comment. 915 924 * @return string The comment type. 916 925 */
Note: See TracChangeset
for help on using the changeset viewer.