Step 3: Grant Capabilities to Administrators
Finally, you must grant administrators access to execute the newly defined
task. You can accomplish this in one of two ways:
-
Directly assign the new capability.
-
Add the new capability to an Admin Role (either directly
or by using a capabilities rule), and then assign it.