get_comment_author_email example


function comment_author_email( $comment_id = 0 ) {
    $comment = get_comment( $comment_id );

    $comment_author_email = get_comment_author_email( $comment );

    /** * Filters the comment author's email for display. * * @since 1.2.0 * @since 4.1.0 The `$comment_id` parameter was added. * * @param string $comment_author_email The comment author's email address. * @param string $comment_id The comment ID as a numeric string. */
    echo apply_filters( 'author_email', $comment_author_email$comment->comment_ID );
}
echo '<div id="message" class="notice notice-info"><p>' . $message . '</p></div>';
            }
        }
        ?> <div id="message" class="notice notice-warning"><p><strong><?php _e( 'Caution:' ); ?></strong> <?php echo $caution_msg; ?></p></div> <table class="form-table comment-ays"> <tr> <th scope="row"><?php _e( 'Author' ); ?></th> <td><?php comment_author( $comment ); ?></td> </tr> <?php if ( get_comment_author_email( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'Email' ); ?></th> <td><?php comment_author_email( $comment ); ?></td> </tr> <?php } ?> <?php if ( get_comment_author_url( $comment ) ) { ?> <tr> <th scope="row"><?php _e( 'URL' ); ?></th> <td><a href="<?php comment_author_url( $comment ); ?>"><?php comment_author_url( $comment ); ?></a></td> </tr> <?php } ?>
Home | Imprint | This part of the site doesn't use cookies.