Call to a member function add_cap() in single site (not multi)
-
Hi!
I create plugin with custom post type and new user role.This role is only to have access to the new post type, so I used add_cap() to determine what the user can and cannot do.
Unfortunately the page returns an error:
Fatal error: Uncaught Error: Call to a member function add_cap() on nullI checked with the database. There is no record of wp_user_roles in the wp_options table.
I try to create such a row with an empty option_value field, but the error is still displayed. I copy the contents of option_value field from another side, but nothing changes.
The page is not a multisite
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Call to a member function add_cap() in single site (not multi)’ is closed to new replies.