Created
March 6, 2014 21:10
-
-
Save aaronjorbin/9399693 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/* | |
Plugin name: Super LaFours | |
Description: Removes caps for actions that should take place in code, not in UI | |
Author: Aaron Jorbin | |
Author URI: http://aaron.jorb.in/ | |
Version: 0.1 | |
*/ | |
function super_lafours_map_meta_cap($caps, $cap, $user_id, $args) { | |
if ($cap !== 'read'){ | |
$caps = array(); | |
$caps[] = 'do_not_allow'; | |
} | |
return $caps; | |
} | |
add_filter('map_meta_cap', 'super_lafours_map_meta_cap', 10, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment