diff --git a/CHANGELOG.md b/CHANGELOG.md index 606b2eb..80d8dd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 `

`) 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 diff --git a/PROJECT_STATUS.md b/PROJECT_STATUS.md index d7dd4f5..1e2b03c 100644 --- a/PROJECT_STATUS.md +++ b/PROJECT_STATUS.md @@ -1,6 +1,6 @@ # Aurora Admin v2 — Project Status -_Last updated: 2026-07-04 (latest session — file-integrity tamper protection for the license gate)_ +_Last updated: 2026-07-04 (latest session — remaining placeholder settings wired up, dashboard scrolling and admin notices fixed)_ ## What this project is @@ -628,6 +628,22 @@ compatibility, trust), which wasn't in scope here. ## Key bugs fixed (root causes, in case they resurface) +- **Admin Notices invisible on the Dashboard**: `admin_notices` prints + inside `#wpbody`, which `DashboardTakeover::hide_native()` hides + entirely (to hide the *native* dashboard, not ours) — collateral damage + for anything else relying on that hook there. Fixed with + `Notices::render_for_dashboard()`, called directly inside the visible + dashboard frame (`DashboardTakeover::render_mount()`), with `render()` + (the normal `admin_notices` hook) bailing on the Dashboard so it isn't + rendered twice. **Second, independent bug surfaced by the same fix**: + `wp-admin/js/common.js` unconditionally relocates every `.notice` + element on the page to right after the page's `

` + (`$('.notice').not('.inline, .below-h2').insertAfter($headerEnd)`) — + regardless of where it was placed server-side, it would've moved right + back into the hidden `#wpbody` on its own. Core's own `.below-h2` class + is the documented opt-out; added only for the dashboard render path + (`render_notices($keep_in_place)`), not the normal one, where the + relocation is harmless/expected. - **`.card` global class collision**: original Dashboard cards used `class="card"`, colliding with WP core's `.card { max-width: 520px }`. Fixed by renaming to `.aurora-card*` everywhere. Never use unprefixed diff --git a/admin/src/Notices/Notices.php b/admin/src/Notices/Notices.php index b683123..e406494 100644 --- a/admin/src/Notices/Notices.php +++ b/admin/src/Notices/Notices.php @@ -1,6 +1,8 @@ ($('div.notice').not('.inline, .below-h2').insertAfter(...)), + * regardless of where it was originally placed in the DOM. On every + * other page that's harmless (it's already heading there anyway); on + * the Dashboard it silently moves our notice into the native #wpbody, + * which is hidden entirely by DashboardTakeover — invisible, not gone. + * `below-h2` is core's own documented opt-out class for exactly this + * "leave this notice exactly where I put it" case. + */ + private static function render_notices($keep_in_place) { global $wpdb; $user = wp_get_current_user(); @@ -83,6 +126,9 @@ class Notices $type = in_array($row->type, ["success", "warning", "error", "info"], true) ? $row->type : "info"; $classes = "notice notice-{$type} aurora-native-notice"; + if ($keep_in_place) { + $classes .= " below-h2"; + } if ($row->dismissible) { $classes .= " is-dismissible"; } diff --git a/admin/src/Pages/DashboardTakeover.php b/admin/src/Pages/DashboardTakeover.php index 7039679..abacfbb 100644 --- a/admin/src/Pages/DashboardTakeover.php +++ b/admin/src/Pages/DashboardTakeover.php @@ -3,6 +3,7 @@ namespace AuroraAdmin\Pages; use AuroraAdmin\Utility\Assets; use AuroraAdmin\Options\Settings; +use AuroraAdmin\Notices\Notices; defined("ABSPATH") || exit(); @@ -80,6 +81,9 @@ class DashboardTakeover "settings" => Settings::get_safe(), ]; ?> +
+ +