humanmade / humanmade/authorship
Error message not correctly displayed
- Dominant language
- PHP
- Stars
- 68
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
I have customized the capabilities, removing the possibility of creating guest users, but the editor is showing an error on displaying the error:

I'm aware of https://github.com/humanmade/authorship/issues/76, but this issue is about showing the right error message provided from the backend.
### How to reproduce:
1. Add in a plugin a code like this
```
add_filter('user_has_cap', 'removeGuestAuthorCap', 9999);
function removeGuestAuthorCap(array $user_caps): array
{
unset($user_caps['create_guest_authors']);
return $user_caps;
}
```
2. Login to WordPress admin panel as an user that's not a Super Admin
3. Try to add a guest author to a post
4. The error message shown in the editor should report "undefined"
Contributor guide
Assessment
This issue has not been assessed yet.