[wp-trac] [WordPress Trac] #45418: Admin notices lose custom id and class attributes in Gutenberg editor
WordPress Trac
noreply at wordpress.org
Mon Nov 26 14:46:35 UTC 2018
#45418: Admin notices lose custom id and class attributes in Gutenberg editor
--------------------------+-----------------------------
Reporter: ianmjones | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.0
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45418>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list