Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#32625 closed defect (bug) (fixed)

About: all admin notices should be hidden

Reported by: jadpm's profile jadpm Owned by: obenland's profile obenland
Milestone: 4.3 Priority: normal
Severity: minor Version: 4.1
Component: Help/About Keywords: has-patch reporter-feedback
Focuses: ui Cc:

Description

Related to #26519, some admin notices are not being hidden on the About page. That ticket ensured that div.updated, div.error admin notices are hidden, but we also have other classnames like notice-warning and notice-info which were not included.

Also, we should think on normalizing the classnames for admin notices:

  • div.update equals .notice-success
  • div.error equals .notice-error
  • .notice-warning and .notice-info do not have a matching pair.

Attachments (2)

32625.patch (378 bytes) - added by jadpm 9 years ago.
about.css diff
32625-2.patch (343 bytes) - added by jadpm 9 years ago.
Patch updated

Download all attachments as: .zip

Change History (8)

@jadpm
9 years ago

about.css diff

#1 @MikeHansenMe
9 years ago

  • Keywords has-patch added

#2 @johnbillion
9 years ago

  • Milestone changed from Awaiting Review to 4.3
  • Severity changed from normal to minor
  • Version changed from trunk to 4.1

Culprit: #27418

#3 @obenland
9 years ago

How can I reproduce the notices showing?
Shouldn't it be enough to add .about-wrap .notice to cover all new cases?

#4 @obenland
9 years ago

  • Keywords reporter-feedback added

#5 @jadpm
9 years ago

Yes, .about-wrap .notice should produce the same effect and it would also be much more similar to the styling we already have in common.css where we define styling for .wrap .notice, .wrap div.updated, .wrap div.error on the same place. I'm updating the patch to apply this solution better.

It is easy to get an admin notice on the About page:

add_action( 'admin_notices', 'ek_display_admin_notices' );
function ek_display_admin_notices() {
	echo '<div id="ek-admin-notice" class="notice notice-warning">';
	echo 'Whatever';
	echo "</div>";
}

@jadpm
9 years ago

Patch updated

#6 @obenland
9 years ago

  • Owner set to obenland
  • Resolution set to fixed
  • Status changed from new to closed

In 33113:

Hide notices introduced in [30505] on about page.

See #19237.

Props jadpm.
Fixes #32625.

Note: See TracTickets for help on using tickets.