Filters the array of extra elements to list in the ‘At a Glance’ dashboard widget.
Description
Prior to 3.8.0, the widget was named ‘Right Now’. Each element is wrapped in list-item tags on output.
Parameters
$items
string[]- Array of extra ‘At a Glance’ widget items.
Source
$elements = apply_filters( 'dashboard_glance_items', array() );
Changelog
Version | Description |
---|---|
3.8.0 | Introduced. |
Add Custom Post Type to ‘At a Glance’ dashboard widget:
The Custom Post Type is shown with the same style as default Posts, Pages and Comments use, including number of posts and link to CPT list.
dashboard_glance_items
as action – but it is a filter and not an action!