Jeg har brug for at få author ID af comment ID 
Eksempel
functionName($commentID){ return $authorID; } Kommentarer
Svar
 Brug  get_comment  for at returnere oplysninger om kommentaren som comment_author_email. 
 Du kan derefter prøve at få en bruger via e-mail ved hjælp af  get_user_by (“email”, $ comment_author_email) . 
 Når du har  WP_User , skal du have adgang til ID for den bruger. 
Alt dette forudsætter, at kommentarforfatterens e-mail bruges som brugerens registrerings-e-mail.
Kommentarer
- get_comment returnerer user_id Du behøver ikke ' behøver ikke at bruge comment_author_email for at få user_id af kommentaren. Hvis brugeren ikke var ' ikke logget ind, bliver den 0.
Svar
 du skal bruge det: <?php get_comment( $id, $output ); ?> 
Returner
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) Endelig kode
$comment_id = $commentID; //$commentID your var $comment = get_comment( $comment_id ); $comment_author_id = $comment -> user_id; 
get_comment()??????