/** * @param EE_Event $item * * @return string */ public function column_author(EE_Event $item) { //user author info $event_author = get_userdata($item->wp_user()); $gravatar = get_avatar($item->wp_user(), '15'); //filter link $query_args = array('action' => 'default', 'EVT_wp_user' => $item->wp_user()); $filter_url = EE_Admin_Page::add_query_args_and_nonce($query_args, EVENTS_ADMIN_URL); return $gravatar . ' <a href="' . $filter_url . '" title="' . esc_attr__('Click to filter events by this author.', 'event_espresso') . '">' . $event_author->display_name . '</a>'; }
/** * Helper method to return the user object for the author of the given EE_Event * * @param EE_Event $event * * @return WP_User */ private function _get_author_for_event(EE_Event $event) { $author_id = $event->wp_user(); $user_data = get_userdata((int) $author_id); return $user_data; }