Opened 10 years ago
Closed 10 years ago
#28930 closed defect (bug) (fixed)
Remove unused dashboard-widget-* CSS classes
Reported by: | michalzuber | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.0 | Priority: | normal |
Severity: | normal | Version: | 2.7 |
Component: | General | Keywords: | has-patch |
Focuses: | ui, administration | Cc: |
Description
I was researching /* @todo: are these actually used anywhere? no non-CSS results in plugin search */
and for me the result is that .dashboard-widget-title, .dashboard-widget-notice, .dashboard-widget-error
are not used. Am I missing here something?
wordpress-svn$ grep -ir 'dashboard-widget-error' src src/wp-admin/css/dashboard.css:305:div.dashboard-widget-error {
wordpress-svn$ grep -ir 'dashboard-widget-notice' src src/wp-admin/css/dashboard.css:309:div.dashboard-widget-notice {
wordpress-svn$ grep -ir 'dashboard-widget-' src src/wp-admin/css/colors/_admin.scss:24:div.dashboard-widget-submit input:hover, src/wp-admin/css/common.css:711:h3.dashboard-widget-title, src/wp-admin/css/common.css:712:h3.dashboard-widget-title span, src/wp-admin/css/common.css:713:h3.dashboard-widget-title small, src/wp-admin/css/dashboard.css:77:h3.dashboard-widget-title, src/wp-admin/css/dashboard.css:78:h3.dashboard-widget-title span, src/wp-admin/css/dashboard.css:79:h3.dashboard-widget-title small { src/wp-admin/css/dashboard.css:83:h3.dashboard-widget-title small a { src/wp-admin/css/dashboard.css:87:h3.dashboard-widget-title small a:hover { src/wp-admin/css/dashboard.css:288:#dashboard_primary .dashboard-widget-control-form { src/wp-admin/css/dashboard.css:296:.dashboard-widget-control-form { src/wp-admin/css/dashboard.css:300:.dashboard-widget-control-form p { src/wp-admin/css/dashboard.css:305:div.dashboard-widget-error { src/wp-admin/css/dashboard.css:309:div.dashboard-widget-notice { src/wp-admin/includes/dashboard.php:113: check_admin_referer( 'edit-dashboard-widget_' . $_POST['widget_id'], 'dashboard-widget-nonce' ); src/wp-admin/includes/dashboard.php:158: echo '<form action="" method="post" class="dashboard- widget-control-form">'; src/wp-admin/includes/dashboard.php:160: wp_nonce_field( 'edit-dashboard-widget_' . $meta_box['id'], 'dashboard-widget-nonce' );
Attachments (6)
Change History (16)
#2
@
10 years ago
They're not used in core - my concern was plugins/custom development. Hence the note that I had searched the plugin repo.
#3
@
10 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 4.0
- Version set to 2.7
Unused since [9103]. Looks like they can be safely removed.
#4
@
10 years ago
- Keywords commit removed
I think we need to take a step back here. A quick ack shows many plugins leveraging these classes for styling or even for their own meta boxes, including bbpress.
#5
@
10 years ago
Looking at bbPress, they only appear as unused legacy styles there. Let me see if I can find legitimate usage in other plugins.
#6
@
10 years ago
dashboard-widget-title.txt has plugin usages of .dashboard-widget-title
. I stripped out the minified CSS/other for brevity. Running the others now.
#8
@
10 years ago
To clarify, these styles apply to pre-2.7 dashboard widgets: 28930.png.
Most of the plugins in question just copied the admin styles, and haven't been updated in several years.
Keep in mind that we're just removing font colors here, which doesn't break anything. We did much more significant redesign in 2.7 and 3.8.
I'm OK with not pushing this change, but I also don't see a strong reason to punt or wontfix it.
#9
@
10 years ago
Should the TODO line stay or this ticket number added to it 28930.2.diff ?
Removed CSS classes .dashboard-widget-title, .dashboard-widget-notice, .dashboard-widget-error