Introduce dashboard_glance_items filter which replaces 3.7 right_now_* hooks that were tied to table markup.
fixes #26495. git-svn-id: https://develop.svn.wordpress.org/trunk@26832 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
47d7a18739
commit
6c96d3e787
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user