486be7eb by Chris Boden

Added getCurrentUser function

1 parent 3c15cc88
......@@ -85,6 +85,16 @@ function tools_url() {
call_user_func_array(__NAMESPACE__ . '\url', $args);
}
/**
* @returns {WP_User} of the currently logged in user
*/
function getCurrentUser() {
global $current_user;
get_currentuserinfo();
return $current_user;
}
function buffer($callback) {
ob_start();
call_user_func($callback);
......