I'm writing my first plugin and I am trying to add in capabilities so the functionality can be restricted to certain roles, however no matter where I put the line:
if ( $user->has_cap('edit_resource_links') )
it breaks the plugin!
I'd also like to know if there's a quick way to remove all capabilities matching a certain name from *every role*, as a cleanup exercise. Is this possible without looping through all roles manually?
Does anyone know any good tutes on using capabilities in plugins? I've had a look around but the documentation on this is sparse!