Created
July 5, 2017 08:36
-
-
Save ingozoell/28852f6fcb69cd4a5425f365fc3f5ff1 to your computer and use it in GitHub Desktop.
WordPress: Add user cap
https://codex.wordpress.org/Function_Reference/add_cap
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
function add_theme_caps() { | |
$role = get_role( 'author' ); | |
$role->add_cap( 'edit_others_posts' ); | |
} | |
add_action( 'admin_init', 'add_theme_caps'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment