WordPress.org

Make WordPress Core

Ticket #26571: 26571.2.diff

File 26571.2.diff, 652 bytes (added by swissspidy, 4 years ago)
  • src/wp-admin/includes/dashboard.php

    diff --git src/wp-admin/includes/dashboard.php src/wp-admin/includes/dashboard.php
    index 2a95212..a70d745 100644
    function wp_dashboard_right_now() { 
    286286         */
    287287        $elements = apply_filters( 'dashboard_glance_items', array() );
    288288
    289         if ( $elements ) {
    290                 echo '<li>' . implode( "</li>\n<li>", $elements ) . "</li>\n";
     289        foreach ( (array) $elements as $element ) {
     290                if ( is_array( $element ) ) {
     291                        printf( "<li class='%s'>%s</li>\n", esc_attr( $element['class'] ), $element['content'] );
     292                } else {
     293                        echo '<li>' . $element . "</li>\n";
     294                }
    291295        }
    292296
    293297        ?>