Get name and email of current unregistered user, who has recently submitted name and email in comment form?

An unregistered user’s name and email are available in cookies, once s/he has left a comment. The cookies are named like: comment_author_3e6aea64ec43ed661a5dee3433f1e8bc comment_author_email_3e6aea64ec43ed661a5dee3433f1e8bc You can retrieve them like so: sanitize_comment_cookies(); wp_get_current_commenter(); // returns comment_author, // comment_author_email, comment_author_url They’re created here in comment.php: /** * Sets the cookies used to store an unauthenticated commentator’s identity. Typically … Read more

how do you prevent showing a particular category on the admin dashboard for specific user roles?

Based on the first Answer from Mike Schinkel. For testing purposes in a default installation, the category is “Uncategorized”. add_filter( ‘list_terms_exclusions’, ‘wpse_59652_list_terms_exclusions’, 10, 2 ); function wpse_59652_list_terms_exclusions( $exclusions, $args ) { global $current_screen; if( ‘post’ != $current_screen->post_type ) return $exclusions; if( !current_user_can(‘delete_others_pages’) ) return $exclusions; return $exclusions . ” AND ( t.name <> ‘Uncategorized’ )”; … Read more