WordPress.org

Make WordPress Core

Changeset 26832


Ignore:
Timestamp:
12/09/2013 07:11:23 PM (7 years ago)
Author:
nacin
Message:

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

fixes #26495.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/dashboard.php

    r26813 r26832  
    185185    <ul>
    186186    <?php
    187     do_action( 'rightnow_list_start' );
    188187    // Posts and Pages
    189188    foreach ( array( 'post', 'page' ) as $post_type ) {
     
    214213        }
    215214    }
    216     do_action( 'rightnow_list_end' );
     215
     216    /**
     217     * Include additional elements in the 'At a Glance' dashboard widget.
     218     * This widget was previously 'Right Now'.
     219     *
     220     * @since 3.8.0
     221     * @param array $items Array of items.
     222     */
     223    $elements = apply_filters( 'dashboard_glance_items', array() );
     224    if ( $elements ) {
     225        echo '<li>' . implode( "</li>\n<li>", $elements ) . "</li>\n";
     226    }
     227
    217228    ?>
    218229    </ul>
Note: See TracChangeset for help on using the changeset viewer.