Opened 8 years ago
Closed 8 years ago
#45418 closed defect (bug) (reported-upstream)
Admin notices lose custom id and class attributes in Gutenberg editor
| Reported by: | ianmjones | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 5.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | administration |
Description
If a plugin creates a custom notice for display in the admin it usually includes an id and/or class attributes in the div that can be used to identify actions on it, such as dismiss.
In the Gutenberg editor admin notices are being displayed with new styling and class attributes different to when displayed in the rest of the WordPress admin dashboard and seem to have the id and custom class attributes stripped.
This makes it impossible for a plugin to identify its own notices and attach JavaScript handlers for the dismiss button and therefore properly register that the admin notice is no longer to be displayed.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I've opened GB-12320 for this because this needs to be solved in the Notices package of the new editor.