Created
May 31, 2015 20:38
-
-
Save thoronas/3dbeb74d64193e039eab to your computer and use it in GitHub Desktop.
WordPress: Run code only if user is logged in and an editor or admin
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 | |
if( current_user_can('edit_others_pages') ) { | |
// do something | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment