WPDev.one
Visualizer
PHP 7.4+

Add Custom User Role

Define custom access levels for your clients or team. Toggle capabilities and see exactly what menu items they will access in the dashboard.

Role Settings

Capabilities

General

Posts

Pages

System (Dangerous)

Dashboard
Posts
Media
Pages
P

Hello, Project Manager

This simulation shows exactly which menu items will be visible to a user with the project_manager role.

Access Level:Editor

How Capabilities Work

WordPress uses a capability-based system. Instead of checking if a user is an "Editor", you check if they can('edit_others_posts'). This generator creates a new Role bucket that holds these capabilities.

When does this run?

add_role() writes to the database (options table). It is a persistent operation. You only need to run it ONCE.

That is why we wrap it in register_activation_hook. If you put it in init, it wastes a DB write on every page load!