Created
June 12, 2014 08:51
-
-
Save fahidjavid/c95e015c9d3cc9a5f9dc to your computer and use it in GitHub Desktop.
Make Your Own Admin Bar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function MyFirstAdminBar(){ | |
//global variables | |
global $user_ID,$current_user,$user_identity; | |
//the following obtains all of the user's profile data | |
get_currentuserinfo(); | |
//the following will execute if the user is logged in | |
if(is_user_logged_in()){ | |
?> | |
place your logged-in code here | |
<?php | |
} else { | |
?> | |
place your logged-out code here | |
<? | |
} | |
} // end of function | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment