Web & Software Developer

List All Capabilities of Current User in WordPress

This is how to get an array of capabilities of the current logged-in user’s capabilities. If you don’t want to print it to the screen, omit the last line. The $current_user_caps variable on line 4 will hold the array of the current WordPress user’s capabilities so that you can use it however you need to. See below for an example of the returned array.

Example output

If you use the code above on a template file, it will print something like this on the screen. This example shows how it would look if an administrator is logged in. This is an array of all the capabilities assigned to the current logged-in WordPress user. If you’ve added any custom capabilities, they will also be included.