Make WordPress Core

Ticket #28373: 28373.diff

File 28373.diff, 1.4 KB (added by kwight, 10 years ago)
  • src/wp-includes/link-template.php

     
    12971297 *
    12981298 * @since 1.0.0
    12991299 *
    1300  * @param string $link Optional. Anchor text.
     1300 * @param string $text Optional. Anchor text.
    13011301 * @param string $before Optional. Display before edit link.
    13021302 * @param string $after Optional. Display after edit link.
    13031303 */
    1304 function edit_comment_link( $link = null, $before = '', $after = '' ) {
     1304function edit_comment_link( $text = null, $before = '', $after = '' ) {
    13051305        global $comment;
    13061306
    13071307        if ( !current_user_can( 'edit_comment', $comment->comment_ID ) )
    13081308                return;
    13091309
    1310         if ( null === $link )
    1311                 $link = __('Edit This');
     1310        if ( null === $text )
     1311                $text = __('Edit This');
    13121312
    1313         $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '">' . $link . '</a>';
     1313        $link = '<a class="comment-edit-link" href="' . get_edit_comment_link( $comment->comment_ID ) . '">' . $text . '</a>';
    13141314
    13151315        /**
    13161316         * Filter the comment edit link anchor tag.
     
    13201320         * @param string $link       Anchor tag for the edit link.
    13211321         * @param int    $comment_id Comment ID.
    13221322         */
    1323         echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID ) . $after;
     1323        echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID, $text ) . $after;
    13241324}
    13251325
    13261326/**