The new action is dashboard_glance_items
. It is a filter providing an array to which you can add items.
Example from my plugin T5 Taxonomy Location
add_filter(
'dashboard_glance_items',
array ( $this, 'add_to_glance' )
);
/**
* Add locations to the new "At a glance" dashboard widget.
*
* @param array $items
* @return array
*/
public function add_to_glance( Array $items )
{
$num = wp_count_terms( $this->taxonomy );
// Singular or Plural.
$text = _n(
'%s Location',
'%s Locations',
$num,
'plugin_t5_tax_location'
);
// thousands separator etc.
$text = sprintf( $text, number_format_i18n( $num ) );
if ( current_user_can( "manage_$this->taxonomy" ) )
{
$url = admin_url( "edit-tags.php?taxonomy=$this->taxonomy" );
$text = "<a href="https://wordpress.stackexchange.com/questions/127750/$url">$text</a>";
}
$items[] = $text;
return $items;
}
This change is not backwards compatible and rather … dirty. See ticket #26571 for problems and possible solutions.