[wp-trac] [WordPress Trac] #26571: Increase flexibility of "At a Glance" Dashboard Widget to match "Right Now" Widget
WordPress Trac
noreply at wordpress.org
Thu Dec 12 18:00:27 UTC 2013
#26571: Increase flexibility of "At a Glance" Dashboard Widget to match "Right Now"
Widget
----------------------------+-----------------------------
Reporter: mrwweb | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 3.8
Severity: normal | Keywords:
----------------------------+-----------------------------
Following the changes in #26495, the "At a Glance" Dashboard widget is now
much less flexible for extending.
Primarily, the issue is the new `dashboard_glance_items` filter which is
significantly less flexible than the previous collection of actions.
Two main issues:
1. The filter forces all items to be in a single list along with the core
"glance items."
1. The filter does not add any classes to added list items, making them
impossible to style.
This last issue is particularly bad, since a class is required to change
the icon associated with a list item in the "At a Glance" list.
Here's a use case for why a more flexible filter or an action following
the list but before Version and Privacy info is important from my plugin
Post Status Menu Items:
[[Image(http://mrwweb.com/files/wp-trac/at-a-glance-statuses.png)]]
Note the separate list and list-item icons. To get that at the present
time, I had to hack out of the existing list with an empty list item in
the first list and a new empty list with one empty item at the end:
{{{
...</li>
<li class="comment-count"><a href="edit-comments.php">28 Comments</a></li>
<li></li>
</ul>
<h4>Post Statuses</h4>
<ul class="ps-post-statuses">
<li class="publish-status-post-count">...
}}}
{{{
...<a href="http://localhost/wp3.6/wp-admin/edit.php?post_status=trash">1
Trash</a></li>
</ul>
<ul><li></li></ul>
}}}
At a bare minimum, the filter should allow for classes, and the ability to
create multiple lists would be even better.
There is a `rightnow_end` action, but it comes after the version and
privacy information which feels like a "footer" to me.
The easiest solution for allowing separate lists and wouldn't require
reverting #26495 would be to simply add an action following the closing
tag of the At a Glance list. Then the `dashboard_glance_items` could just
be extended a bit to add unique classes for styling.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26571>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list