#19237 closed defect (bug) (fixed)
admin_notices clutter the new about.php, freedoms.php, credits.php admin pages
Reported by: | devinreams | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Administration | Keywords: | has-patch dev-feedback |
Focuses: | Cc: |
Description
Regarding the new about.php et al, I'm not sure if you think this should be in another ticket like #18742 but, since the h2 for the page (nav-tab-wrapper) doesn't show up until the middle of the page (in the form of tabs) instead of intended at the top of the page, all admin_notices get cluttered up down here.
Perhaps we change the h2s to h3 and update the styles? That way the notices don't clutter the content.
- Screenshot with admin_notices at h2: http://cl.ly/1K1n0D2P3j0d3b0G1s27
- Screenshot with admin_notices at top of page: http://cl.ly/1V1o0I0F0A123M0v2s0F
(this may be an opportunity to standardize on the tabbed styles for multisite, see site-info.php)
Diff attached, didn't take a stab at the styles yet as I wasn't sure if I would nab it all correctly.
Attachments (4)
Change History (18)
#2
@
13 years ago
Tempted to avoid these hooks for these special pages. That screen is a mess with notices.
We need Menu Humility for plugin notices. Looking at you, Automattic.
#3
@
13 years ago
I thought about removing the hooks, too.
Then, I wasn't sure if it wen't against the point of having these universal hooks (e.g.: a theme or plugin dev may intentionally want to add a notice on the 'About' page, perhaps?).
#4
@
13 years ago
If users venture to any of these pages, I doubt they are concerned about the current admin notices that barrage them on every other screen. I'd be a fan of removing admin notices from these pages, too.
#5
@
13 years ago
- Owner set to devinreams
- Status changed from new to accepted
OK, so I'm fairly convinced there's no good reason to show notices on these pages at all. So: remove all of them! (and don't touch the fancy h2's).
Attaching to remove_all_actions to all admin notices (in order seen in admin-header.php) to these 3 pages (about, credits, freedoms).
#7
@
13 years ago
Clever. I didn't think about using remove_all_actions(). Unfortunately this means that any notices that get attached on admin_head or some hook in admin-header.php would still appear. Here's an alternative hack.
#9
@
13 years ago
Gave my thumbs up to @nacin in irc the other day on removing all notices on the post-update screen. Just documenting here as well.
#10
@
13 years ago
- Owner changed from devinreams to nacin
- Status changed from accepted to assigned
@nacin, do you want to stick with my patch (brute-force remove the notices) or go another route? I'm happy to help either way...
#11
@
13 years ago
devinreams pointed out that 19237.diff didn't cover all_admin_notices. It was also pointed out that CSS might be doable here, since the notices are specifically being moved to be with the h2s based on class-targeting. Essentially:
/* added to 22.0 - About Pages, wp-admin.dev.css */ .about-wrap div.updated, .about-wrap div.error { display: none;
Any code that does not use these classes will still appear, but at the very top of the page.
Devin, if this works for you (since you have a testbed full of them), can you turn that into a patch?
Switching h2s for admin page tabs to h3 to demonstrate admin_notice placement