From within a WordPress plugin, is there any way to get the name and email of the current user, when s/he is not logged in, but has recently submitted a comment, and specified name and email in the comment reply form?
Or is the name & email only available during the HTTP request in which [the comment posted by the user] is being processed?
(When the the user is not logged in, the WP_User
returned by wp_get_current_user()
contains no info on the user's email or name, I've noticed when debugging.)
(Background: I'm writing a comment rating plugin, and I'd like to highlight the user's ratings, even if s/he isn't a registered user. As mentioned in the comments below, perhaps some cookie will be needed in any case. I'm still interested in knowing the answer to this question however, perhaps I could reuse some existing functionality or something)