Skip to content

Instantly share code, notes, and snippets.

@AlKov
Created October 6, 2017 09:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlKov/866b7c768ace2ee3ff2cf68e6743d80f to your computer and use it in GitHub Desktop.
Save AlKov/866b7c768ace2ee3ff2cf68e6743d80f to your computer and use it in GitHub Desktop.
Check whether our user is logged in
// display name and avatar
function alex_vitorials_get_user_unique_name(){
// check whether our user is logged in or not
if ( ! is_user_logged_in() ) { return; } // if not, return nothing
else { //our code would go here } // return something
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment