Changeset 37348 for trunk/src/wp-includes/comment-template.php
- Timestamp:
- 05/02/2016 07:58:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment-template.php
r37342 r37348 139 139 * 140 140 * @since 0.71 141 * @since 4.6.0 The `$comment` parameter was added. 141 142 * 142 143 * @param string $linktext Optional. Text to display instead of the comment author's email address. … … 144 145 * @param string $before Optional. Text or HTML to display before the email link. Default empty. 145 146 * @param string $after Optional. Text or HTML to display after the email link. Default empty. 146 */ 147 function comment_author_email_link( $linktext = '', $before = '', $after = '' ) { 148 if ( $link = get_comment_author_email_link( $linktext, $before, $after ) ) 147 * @param int|WP_Comment $comment Optional. Comment ID or WP_Comment object. Default is the current comment. 148 */ 149 function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) { 150 if ( $link = get_comment_author_email_link( $linktext, $before, $after, $comment ) ) { 149 151 echo $link; 152 } 150 153 } 151 154 … … 160 163 * 161 164 * @since 2.7.0 165 * @since 4.6.0 The `$comment` parameter was added. 162 166 * 163 167 * @param string $linktext Optional. Text to display instead of the comment author's email address. … … 165 169 * @param string $before Optional. Text or HTML to display before the email link. Default empty. 166 170 * @param string $after Optional. Text or HTML to display after the email link. Default empty. 171 * @param int|WP_Comment $comment Optional. Comment ID or WP_Comment object. Default is the current comment. 167 172 * @return string 168 173 */ 169 function get_comment_author_email_link( $linktext = '', $before = '', $after = '' ) { 170 $comment = get_comment(); 174 function get_comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) { 175 $comment = get_comment( $comment ); 176 171 177 /** 172 178 * Filter the comment author's email for display. … … 182 188 */ 183 189 $email = apply_filters( 'comment_email', $comment->comment_author_email, $comment ); 190 184 191 if ((!empty($email)) && ($email != '@')) { 185 192 $display = ($linktext != '') ? $linktext : $email;
Note: See TracChangeset
for help on using the changeset viewer.