All features

Cherry Blossom feature

Theme framework: User Roles

Manages the theme's ICT Manager and SEO Manager roles.

Manages the theme's ICT Manager and SEO Manager roles.

Capabilities and extension points

Manages the theme's ICT Manager and SEO Manager roles.

The roles inherit the current Editor capabilities when first registered. ICT Manager receives additional user, menu, and Gravity Forms capabilities.

Registers role setup and admin-access restrictions.

Registers the theme's custom manager roles.

Registers the ICT Manager role from the Editor capability set.

Registration is skipped when WordPress cannot resolve the Editor role. Existing roles are retained by add_role(), after which the intended extra capabilities are applied to the resolved ICT Manager role.

Add the role

Get the role and add additional capabilities

Blocks ICT Managers from restricted Appearance administration screens.

Runs during admin_init. Menu administration remains accessible because the role is intended to manage navigation menus.

Check if user has the "ict_manager" role active

Removes restricted Appearance submenu entries for ICT Managers.

Restrict submenus appearance

Registers the SEO Manager role from the Editor capability set.

Registration is skipped when WordPress cannot resolve the Editor role.

Adds user-management capabilities to a role.

  • param \WP_Role $role Role receiving the capabilities.

Adds Gravity Forms management capabilities to a role.

  • param \WP_Role $role Role receiving the capabilities.

Removes the theme's custom manager roles.

Source reference

This editable reference page is based on the PHP documentation in class-user-roles.php.