Changeset 34237 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 09/16/2015 01:51:13 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r34216 r34237 16 16 * 17 17 * @since 1.5.0 18 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 18 19 * 19 20 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to retrieve the author. … … 50 51 * 51 52 * @since 0.71 53 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 52 54 * 53 55 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author. … … 74 76 * 75 77 * @since 1.5.0 78 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 76 79 * 77 80 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's email. … … 105 108 * 106 109 * @since 0.71 110 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 107 111 * 108 112 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's email. … … 196 200 * 197 201 * @since 1.5.0 202 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 198 203 * 199 204 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's link. … … 229 234 * 230 235 * @since 0.71 236 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 231 237 * 232 238 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's link. … … 241 247 * 242 248 * @since 1.5.0 249 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 243 250 * 244 251 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's IP address. … … 266 273 * 267 274 * @since 0.71 275 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 268 276 * 269 277 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's IP address. … … 278 286 * 279 287 * @since 1.5.0 288 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 280 289 * 281 290 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to get the author's URL. 282 291 * Default current comment. 283 * @return string 292 * @return string Comment author URL. 284 293 */ 285 294 function get_comment_author_url( $comment_ID = 0 ) { … … 305 314 * 306 315 * @since 0.71 316 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 307 317 * 308 318 * @param int|WP_Comment $comment_ID Optional. WP_Comment or the ID of the comment for which to print the author's URL. … … 387 397 * 388 398 * @since 2.7.0 399 * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object. 389 400 * 390 401 * @param string|array $class Optional. One or more classes to add to the class list. … … 394 405 * @param bool $echo Optional. Whether to cho or return the output. 395 406 * Default true. 396 * @return string |void407 * @return string If `$echo` is false, the class will be returned. Void otherwise. 397 408 */ 398 409 function comment_class( $class = '', $comment = null, $post_id = null, $echo = true ) { … … 409 420 * 410 421 * @since 2.7.0 422 * @since 4.4.0 Added the ability for `$comment_id` to also accept a WP_Comment object. 411 423 * 412 424 * @global int $comment_alt … … 486 498 * @param string $class A comma-separated list of additional classes added to the list. 487 499 * @param int $comment_id The comment id. 488 * @param object $comment The comment500 * @param WP_Comment $comment The comment object. 489 501 * @param int|WP_Post $post_id The post ID or WP_Post object. 490 502 */ … … 496 508 * 497 509 * @since 1.5.0 510 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 498 511 * 499 512 * @param string $d Optional. The format of the date. Default user's setting. … … 524 537 * 525 538 * @since 0.71 526 * 527 * @param string $d Optional. The format of the date. Default user's settings. 528 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date. 529 * Default current comment. 539 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 540 * 541 * @param string $d Optional. The format of the date. Default user's settings. 542 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the date. 543 * Default current comment. 530 544 */ 531 545 function comment_date( $d = '', $comment_ID = 0 ) { … … 541 555 * 542 556 * @since 1.5.0 557 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 543 558 * 544 559 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the excerpt. … … 582 597 * 583 598 * @since 1.2.0 599 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 584 600 * 585 601 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to print the excerpt. … … 637 653 * 638 654 * @since 1.5.0 655 * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object. 639 656 * 640 657 * @see get_page_of_comment() … … 696 713 697 714 /** 698 * Retrieve the link to the current post comments.715 * Retrieves the link to the current post comments. 699 716 * 700 717 * @since 1.5.0 … … 706 723 $hash = get_comments_number( $post_id ) ? '#comments' : '#respond'; 707 724 $comments_link = get_permalink( $post_id ) . $hash; 725 708 726 /** 709 727 * Filter the returned post comments permalink. … … 816 834 * 817 835 * @since 1.5.0 836 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 818 837 * 819 838 * @see Walker_Comment::comment() … … 845 864 * 846 865 * @since 0.71 866 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 847 867 * 848 868 * @see Walker_Comment::comment() … … 919 939 * 920 940 * @since 1.5.0 921 * 922 * @param int|WP_Comment $comment_ID WP_Comment or ID of the comment for which to get the type. 923 * Default current comment. 941 * @since 4.4.0 Added the ability for `$comment_ID` to also accept a WP_Comment object. 942 * 943 * @param int|WP_Comment $comment_ID Optional. WP_Comment or ID of the comment for which to get the type. 944 * Default current comment. 924 945 * @return string The comment type. 925 946 */ … … 1384 1405 * 1385 1406 * @since 2.7.0 1407 * @since 4.4.0 Added the ability for `$comment` to also accept a WP_Comment object. 1386 1408 * 1387 1409 * @param array $args { … … 1401 1423 * @type string $after The text or HTML to add after the reply link. Default empty. 1402 1424 * } 1403 * @param int 1404 * @param int|WP_Post $post Post ID or WP_Post object the comment is going to be displayed on.1405 * Default current post.1425 * @param int|WP_Comment $comment Comment being replied to. Default current comment. 1426 * @param int|WP_Post $post Post ID or WP_Post object the comment is going to be displayed on. 1427 * Default current post. 1406 1428 * @return void|false|string Link to show comment form, if successful. False, if comments are closed. 1407 1429 */ … … 1441 1463 * @since 4.1.0 1442 1464 * 1443 * @param array $args Comment reply link arguments. See {@see get_comment_reply_link()}1444 * for more information on accepted arguments.1445 * @param object$comment The object of the comment being replied to.1446 * @param WP_Post $post The {@see WP_Post}object.1465 * @param array $args Comment reply link arguments. See get_comment_reply_link() 1466 * for more information on accepted arguments. 1467 * @param WP_Comment $comment The object of the comment being replied to. 1468 * @param WP_Post $post The WP_Post object. 1447 1469 */ 1448 1470 $args = apply_filters( 'comment_reply_link_args', $args, $comment, $post ); … … 1465 1487 ); 1466 1488 } 1489 1467 1490 /** 1468 1491 * Filter the comment reply link. … … 1553 1576 } 1554 1577 $formatted_link = $args['before'] . $link . $args['after']; 1578 1555 1579 /** 1556 1580 * Filter the formatted post comments link HTML. … … 1596 1620 1597 1621 $formatted_link = '<a rel="nofollow" id="cancel-comment-reply-link" href="' . $link . '"' . $style . '>' . $text . '</a>'; 1622 1598 1623 /** 1599 1624 * Filter the cancel comment reply link HTML.
Note: See TracChangeset
for help on using the changeset viewer.