Changeset 9436 for trunk/wp-includes/comment-template.php
- Timestamp:
- 10/31/2008 06:05:25 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-template.php
r9424 r9436 81 81 * @since 0.71 82 82 * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email 83 * @uses get_comment_author_email_link() For generating the link 83 84 * @global object $comment The current Comment row object 84 85 * … … 88 89 */ 89 90 function comment_author_email_link($linktext='', $before='', $after='') { 91 if ( $link = get_comment_author_email_link( $linktext, $before, $after ) ) 92 echo $link; 93 } 94 95 /** 96 * Return the html email link to the author of the current comment. 97 * 98 * Care should be taken to protect the email address and assure that email 99 * harvesters do not capture your commentors' email address. Most assume that 100 * their email address will not appear in raw form on the blog. Doing so will 101 * enable anyone, including those that people don't want to get the email 102 * address and use it for their own means good and bad. 103 * 104 * @since 2.7 105 * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email 106 * @global object $comment The current Comment row object 107 * 108 * @param string $linktext The text to display instead of the comment author's email address 109 * @param string $before The text or HTML to display before the email link. 110 * @param string $after The text or HTML to display after the email link. 111 */ 112 function get_comment_author_email_link($linktext='', $before='', $after='') { 90 113 global $comment; 91 114 $email = apply_filters('comment_email', $comment->comment_author_email); 92 115 if ((!empty($email)) && ($email != '@')) { 93 116 $display = ($linktext != '') ? $linktext : $email; 94 echo $before; 95 echo "<a href='mailto:$email'>$display</a>"; 96 echo $after; 117 $return = $before; 118 $return .= "<a href='mailto:$email'>$display</a>"; 119 $return .= $after; 120 return $return; 121 } else { 122 return ''; 97 123 } 98 124 }
Note: See TracChangeset
for help on using the changeset viewer.