Skip to content

Instantly share code, notes, and snippets.

@brendannee
Created December 14, 2014 22:42
Show Gist options
  • Save brendannee/c4a28e02589d38db4ad9 to your computer and use it in GitHub Desktop.
Save brendannee/c4a28e02589d38db4ad9 to your computer and use it in GitHub Desktop.
Upgrade a specific Wordpress user's permissions
//to add capability to user
//Add to functions.php
//List of capabilities: http://codex.wordpress.org/Roles_and_Capabilities
$user = new WP_User( $user_id );
$user->add_cap( 'edit_pages');
$user->add_cap( 'edit_published_pages' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment