Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: comment_email

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
111  * @uses apply_filters() Calls 'comment_email' hook for the display of the comment author's email
112  * @global object $comment The current Comment row object
113  *
114  * @param string $linktext The text to display instead of the comment author's email address
115  * @param string $before The text or HTML to display before the email link.
116  * @param string $after The text or HTML to display after the email link.
117  */
118 function get_comment_author_email_link($linktext='', $before='', $after='') {
119      global $comment;
120      $email = apply_filters('comment_email', $comment->comment_author_email);
121      if ((!empty($email)) && ($email != '@')) {
122      $display = ($linktext != '') ? $linktext : $email;
123           $return  = $before;
124           $return .= "<a href='mailto:$email'>$display</a>";
125            $return .= $after;
126           return $return;
127      } else {
128           return '';
129      }