Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Tenzing
/
Tz Tools
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
486be7eb
authored
2010-10-28 16:33:20 +0000
by
Chris Boden
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added getCurrentUser function
1 parent
3c15cc88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
tz-tools.php
tz-tools.php
View file @
486be7e
...
...
@@ -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
);
...
...
Please
register
or
sign in
to post a comment