User management on WordPress is based on roles and capabilities. A role is an entity made of a unique name and a set of capabilities. Each capability is used to define if the role has access to a particular feature of the platform. Let’s take a closer look at how WordPress Roles and Capabilities work. Under the Hood The list of default roles and capabilities is available on the WordPress Codex. The database stores this list in the wp_options table. It uses the serialized wp_user_roles key. The unserialized data looks like this: array( 'administrator' => array( 'name' => 'Administrator', 'capabilities' => array( 'switch_themes' => true, 'edit_themes' => true, 'activate_plugins' => true, 'edit_plugins' => true, 'edit_users' => true, // [...] ) ), 'contributor' => array( 'name' => 'Contributor', 'capabilities' => array( 'delete_pages' => true, 'delete_others_pages' => true, 'delete_published_pages' => true, 'delete_posts' => true,
Share This