\WP_User Object | What’s the Difference Between {caps} and {allcaps}?

Examining the comments for the properties in the WP_User class reveals that allcaps is:

All capabilities the user has, including individual and role based.

And caps is:

The individual capabilities the user has been given.

But you probably shouldn’t be using the properties directly. WP_User has a has_cap method that should be used instead, as it checks the appropriate properties and runs the result through the relevant filters.

Leave a Comment