get_comment_author [ WordPress Function ]
get_comment_author ( $comment_ID = 0 )
| Parameters: |
|
| Uses: | |
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: get_comment_author_ip, get_comment_author_rss, get_comment_author_url, get_comment_author_link, comment_author
Retrieve the author of the current comment.
If the comment has an empty comment_author field, then 'Anonymous' person is assumed.
Source
<?php
function get_comment_author( $comment_ID = 0 ) {
$comment = get_comment( $comment_ID );
if ( empty($comment->comment_author) ) {
if (!empty($comment->user_id)){
$user=get_userdata($comment->user_id);
$author=$user->user_login;
} else {
$author = __('Anonymous');
}
} else {
$author = $comment->comment_author;
}
return apply_filters('get_comment_author', $author);
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- get_comment_author Wordpress hook details -- Adam Brown, BYU ...
Applied to the comment author's name retrieved from the database by get_comment_author, which is also called by comment_author. See also comment_author ...
adambrown.info - WordPress › Support » Tags — get_comment_author
Forums. Username or Email Address Password (forgot?) Register · WordPress › Support » get_comment_author. Tag: get_comment_author Add New » ...
wordpress.org - get_comment_author | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_comment_author( $comment_ID = 0 ) { $comment = get_comment( $ comment_ID ); if ( empty($comment->comment_author) ) { if ...
hitchhackerguide.com - get_comment_author
Function and Method Cross Reference. get_comment_author(). Defined at: /wp- includes/comment-template.php -> line 11. Referenced 6 times: ...
phpxref.ftwr.co.uk
Gebruikersdiscussies [ wordpress.org ]
- typenerd on "need lowercase output for comment_author_link"
- typenerd on "need lowercase output for comment_author_link"
- alexleonard on "need lowercase output for comment_author_link"
- Jeremy Clark on "need lowercase output for comment_author_link"
- typenerd on "need lowercase output for comment_author_link"