Make WordPress Core

Ticket #36571: 36571.diff

File 36571.diff, 2.7 KB (added by flixos90, 8 years ago)

patch adding the parameter

  • src/wp-includes/comment-template.php

     
    138138 * address and use it for their own means good and bad.
    139139 *
    140140 * @since 0.71
     141 * @since 4.6.0 The `$comment` argument was added.
    141142 *
    142  * @param string $linktext Optional. Text to display instead of the comment author's email address.
     143 * @param string         $linktext Optional. Text to display instead of the comment author's email address.
    143144 *                         Default empty.
    144  * @param string $before   Optional. Text or HTML to display before the email link. Default empty.
    145  * @param string $after    Optional. Text or HTML to display after the email link. Default empty.
     145 * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
     146 * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
     147 * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
    146148 */
    147 function comment_author_email_link( $linktext = '', $before = '', $after = '' ) {
    148         if ( $link = get_comment_author_email_link( $linktext, $before, $after ) )
     149function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
     150        if ( $link = get_comment_author_email_link( $linktext, $before, $after, $comment ) )
    149151                echo $link;
    150152}
    151153
     
    159161 * address and use it for their own means good and bad.
    160162 *
    161163 * @since 2.7.0
     164 * @since 4.6.0 The `$comment` argument was added.
    162165 *
    163  * @param string $linktext Optional. Text to display instead of the comment author's email address.
     166 * @param string         $linktext Optional. Text to display instead of the comment author's email address.
    164167 *                         Default empty.
    165  * @param string $before   Optional. Text or HTML to display before the email link. Default empty.
    166  * @param string $after    Optional. Text or HTML to display after the email link. Default empty.
     168 * @param string         $before   Optional. Text or HTML to display before the email link. Default empty.
     169 * @param string         $after    Optional. Text or HTML to display after the email link. Default empty.
     170 * @param int|WP_Comment $comment  Optional. Comment ID or WP_Comment object.
    167171 * @return string
    168172 */
    169 function get_comment_author_email_link( $linktext = '', $before = '', $after = '' ) {
    170         $comment = get_comment();
     173function get_comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = 0 ) {
     174        $comment = get_comment( $comment );
    171175        /**
    172176         * Filter the comment author's email for display.
    173177         *