Skip to content

Instantly share code, notes, and snippets.

@mjangda
Created March 31, 2010 13:32
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 mjangda/350312 to your computer and use it in GitHub Desktop.
Save mjangda/350312 to your computer and use it in GitHub Desktop.
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