Introduce dashboard_glance_items filter which replaces 3.7 right_now_* hooks that were tied to table markup.

fixes #26495.

Built from https://develop.svn.wordpress.org/trunk@26832


git-svn-id: http://core.svn.wordpress.org/trunk@26719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-12-09 19:12:10 +00:00
parent dc4c8e91aa
commit 659334bd59
1 changed files with 13 additions and 2 deletions

View File

@ -184,7 +184,6 @@ function wp_dashboard_right_now() {
<div class="main"> <div class="main">
<ul> <ul>
<?php <?php
do_action( 'rightnow_list_start' );
// Posts and Pages // Posts and Pages
foreach ( array( 'post', 'page' ) as $post_type ) { foreach ( array( 'post', 'page' ) as $post_type ) {
$num_posts = wp_count_posts( $post_type ); $num_posts = wp_count_posts( $post_type );
@ -213,7 +212,19 @@ function wp_dashboard_right_now() {
<?php <?php
} }
} }
do_action( 'rightnow_list_end' );
/**
* Include additional elements in the 'At a Glance' dashboard widget.
* This widget was previously 'Right Now'.
*
* @since 3.8.0
* @param array $items Array of items.
*/
$elements = apply_filters( 'dashboard_glance_items', array() );
if ( $elements ) {
echo '<li>' . implode( "</li>\n<li>", $elements ) . "</li>\n";
}
?> ?>
</ul> </ul>
<p><?php printf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p> <p><?php printf( __( 'WordPress %1$s running %2$s theme.' ), get_bloginfo( 'version', 'display' ), $theme_name ); ?></p>