Fix Admin Notices not showing on the Dashboard (v2.4.2)
admin_notices fires everywhere, but prints inside #wpbody, which DashboardTakeover hides entirely on the Dashboard (to hide the *native* dashboard, not ours) — notices went down with it as collateral damage. Notices::render_for_dashboard() now renders directly inside the visible dashboard frame instead, called from DashboardTakeover::render_mount(); the normal admin_notices path bails on the Dashboard so it isn't rendered twice. Second, independent bug found along the way: wp-admin/js/common.js unconditionally relocates every .notice element on the page to right after the page's <h1>, regardless of where it was placed server-side — without opting out, it would've silently moved our notice right back into the hidden #wpbody. Used core's own documented `below-h2` class to opt out, only for the dashboard render path. Verified live: notice now shows correctly inside the dashboard frame with proper dark styling, and dismisses correctly. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
03c3c4fc89
commit
d8bf1ae049
@@ -5,6 +5,22 @@ version bump. Starts at 2.1.0 — earlier history (the theming rebuild,
|
||||
window chrome/taskbar, Site Editor support, etc.) lives in `git log` and
|
||||
`PROJECT_STATUS.md`, not reconstructed here.
|
||||
|
||||
## [2.4.2] - 2026-07-04
|
||||
|
||||
### Fixed
|
||||
- Admin Notices only ever showed on the Aurora Dashboard — everywhere
|
||||
else, `admin_notices` fired normally, but on the Dashboard specifically
|
||||
the notice was invisible: `DashboardTakeover` hides `#wpbody` entirely
|
||||
there (to hide the *native* dashboard, not our own), and that's exactly
|
||||
where WordPress prints `admin_notices` output. Notices now render
|
||||
directly inside the Aurora dashboard frame instead on that one page.
|
||||
Along the way, also worked around a separate WordPress core behavior
|
||||
(`common.js` unconditionally relocates every `.notice` element to right
|
||||
after the page's `<h1>`) using core's own documented `below-h2` opt-out
|
||||
class, since without it the notice would've just been silently moved
|
||||
back into the hidden `#wpbody` by that script regardless of where it
|
||||
was placed server-side.
|
||||
|
||||
## [2.4.1] - 2026-07-04
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user