Ik moet author ID krijgen door comment ID 
Voorbeeld
functionName($commentID){ return $authorID; } Reacties
Antwoord
 Gebruik  get_comment  om informatie over de opmerking te retourneren, zoals comment_author_email. 
 Je kunt dan proberen om een gebruiker te krijgen via e-mail met  get_user_by (“email”, $ comment_author_email) . 
 Zodra je de  WP_User  hebt, zou je toegang moeten hebben tot de ID van die gebruiker. 
Dit alles veronderstelt dat het e-mailadres van de auteur van de opmerking wordt gebruikt als het registratie-e-mailadres van de gebruiker.
Opmerkingen
- get_comment geeft user_id terug. Je hoeft ' niet de comment_author_email te gebruiken om de user_id van de reactie te krijgen. Als de gebruiker niet ' t was ingelogd, dan is dit 0.
Antwoord
 je moet het gebruiken: <?php get_comment( $id, $output ); ?> 
Return
comment_ID (integer) The comment ID comment_post_ID (integer) The post ID of the associated post comment_author (string) The comment author"s name comment_author_email (string) The comment author"s email comment_author_url (string) The comment author"s webpage comment_author_IP (string) The comment author"s IP comment_date (string) The datetime of the comment (YYYY-MM-DD HH:MM:SS) comment_date_gmt (string) The GMT datetime of the comment (YYYY-MM-DD HH:MM:SS) comment_content (string) The comment"s contents comment_karma (integer) The comment"s karma comment_approved (string) The comment approbation (0, 1 or "spam") comment_agent (string) The comment"s agent (browser, Operating System, etc.) comment_type (string) The comment"s type if meaningfull (pingback|trackback), and empty for normal comments comment_parent (string) The parent comment"s ID user_id (integer) The comment author"s ID if he is registered (0 otherwise) Laatste code
$comment_id = $commentID; //$commentID your var $comment = get_comment( $comment_id ); $comment_author_id = $comment -> user_id; 
get_comment()??????