Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Allow WordPress authors to edit all posts (not just their own)
<?php
global $wp_roles;
if ( ! isset( $wp_roles ) )
$wp_roles = new WP_Roles();
if( $wp_roles->is_role('author') ) {
$author_role =& get_role('author');
$author_role->add_cap('edit_others_posts');
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment