Comments email

From Photostand Wiki

Jump to: navigation, search
comments_email()

The comments_email function will return the current comment author's email. This function must be placed within the the Comments_array loop.

Careful: Your visitors may not like to see their email adresses displayed on a website.

Parameters

This function has no parameters.

Examples

Displaying the comments email

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>

	<title>Article</title>

    </head>
    <body>

        <ul>
	    <?php
    	    foreach(comments_array('DESC') as $comment)
    	    { 
    	    ?>
     	    <li><?php echo comments_email(); ?></li>
	    <?php
    	    }
	    ?>
	</ul>

    </body>
</html>

Here, for each comment to be displayed, the email adress will appear.

Personal tools