[wp-trac] [WordPress Trac] #33714: Add custom post types to the 'At a Glance' widget

WordPress Trac noreply at wordpress.org
Fri Sep 18 15:37:26 UTC 2015


#33714: Add custom post types to the 'At a Glance' widget
------------------------------------------------+--------------------------
 Reporter:  paulwilde                           |       Owner:
     Type:  enhancement                         |      Status:  new
 Priority:  low                                 |   Milestone:  4.4
Component:  Posts, Post Types                   |     Version:  3.8
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch needs-refresh needs-docs  |     Focuses:  ui,
                                                |  administration
------------------------------------------------+--------------------------

Comment (by GaryJ):

 I wrote [attachment:glance-icons.diff] with the intent on solving
 basically the same problem (further identified
 [https://github.com/GaryJones/Gamajo-Dashboard-Glancer/issues/7 here])
 then found this ticket already exists.

 My approach re-uses the dashicon rulesets that already exist, and
 eliminates most uses of the heavy ID selector for targeting the icons.
 This allows CPT icons to be added via filter customisations that include
 the necessary HTML classes. There doesn't have on be a reliance on the
 post type object or the `menu_icon` value.

 For existing filter callbacks that won't have those classes, it falls back
 to using the `dashicons-marker` via CSS `:not()`. The existing generic
 ruleset is kept, so that fixes like [https://github.com/devinsays
 /portfolio-post-
 type/blob/2e18c018eaa49ed05f50cd1bf96c231408e696f2/includes/class-
 portfolio-post-type-admin.php#L202-L204 this] will also still work.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33714#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list