Changeset 37215
- Timestamp:
- 04/15/2016 08:58:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r37213 r37215 1403 1403 * 1404 1404 * @since 1.0.0 1405 * 1406 * @param string $text Optional. Anchor text. 1407 * @param string $before Optional. Display before edit link. 1408 * @param string $after Optional. Display after edit link. 1409 */ 1410 function edit_comment_link( $text = null, $before = '', $after = '' ) { 1411 $comment = get_comment(); 1405 * @since 4.6.0 The `$comment` and `$class` arguments were added. 1406 * 1407 * @param string $text Optional. Anchor text. 1408 * @param string $before Optional. Display before edit link. 1409 * @param string $after Optional. Display after edit link. 1410 * @param int|WP_Comment $comment Optional. Comment ID or WP_Comment object. 1411 * @param string $class Optional. Add custom class to link. 1412 */ 1413 function edit_comment_link( $text = null, $before = '', $after = '', $comment = 0, $class = 'comment-edit-link' ) { 1414 $comment = get_comment( $comment ); 1412 1415 1413 1416 if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) { … … 1419 1422 } 1420 1423 1421 $link = '<a class=" comment-edit-link" href="' . esc_url( get_edit_comment_link( $comment ) ) . '">' . $text . '</a>';1424 $link = '<a class="' . esc_attr( $class ) . '" href="' . esc_url( get_edit_comment_link( $comment ) ) . '">' . $text . '</a>'; 1422 1425 1423 1426 /**
Note: See TracChangeset
for help on using the changeset viewer.