WordPress.org

Make WordPress Core

Ticket #33714: glance-icons.diff

File glance-icons.diff, 3.7 KB (added by GaryJ, 6 years ago)
  • src/wp-admin/css/dashboard.css

    diff --git src/wp-admin/css/dashboard.css src/wp-admin/css/dashboard.css
    index 6c145fa..a96af6d 100644
    body #dashboard-widgets .postbox form .submit { 
    392392}
    393393
    394394/* Dashboard right now - Icons */
    395 #dashboard_right_now li a:before,
    396 #dashboard_right_now li span:before {
    397         content: "\f159";
     395.glance-counts a:before,
     396.glance-counts span:before {
    398397        font: normal 20px/1 dashicons;
    399398        speak: none;
    400399        display: block;
    body #dashboard-widgets .postbox form .submit { 
    408407        text-decoration: none !important;
    409408}
    410409
    411 #dashboard_right_now .page-count a:before,
    412 #dashboard_right_now .page-count span:before {
    413         content: "\f105";
    414 }
    415 
    416 #dashboard_right_now .post-count a:before,
    417 #dashboard_right_now .post-count span:before {
    418         content: "\f109";
    419 }
    420 
    421 #dashboard_right_now .comment-count a:before {
    422         content: "\f101";
    423 }
    424 
    425 #dashboard_right_now .comment-mod-count a:before {
    426         content: "\f125";
    427 }
    428 
    429 #dashboard_right_now .storage-count a:before {
    430         content: "\f104";
    431 }
    432 
    433 #dashboard_right_now .storage-count.warning a:before {
    434         content: "\f153";
     410.glance-counts a:not(.dashicons-before):before,
     411.glance-counts span:not(.dashicons-before):before {
     412        content: "\f159";
    435413}
    436414
    437415/* Dashboard Quick Draft */
  • src/wp-admin/includes/dashboard.php

    diff --git src/wp-admin/includes/dashboard.php src/wp-admin/includes/dashboard.php
    index 2d10b06..347b2da 100644
    function wp_dashboard() { 
    231231function wp_dashboard_right_now() {
    232232?>
    233233        <div class="main">
    234         <ul>
     234        <ul class="glance-counts">
    235235        <?php
    236236        // Posts and Pages
    237237        foreach ( array( 'post', 'page' ) as $post_type ) {
    function wp_dashboard_right_now() { 
    239239                if ( $num_posts && $num_posts->publish ) {
    240240                        if ( 'post' == $post_type ) {
    241241                                $text = _n( '%s Post', '%s Posts', $num_posts->publish );
     242                                $icon = 'admin-post';
    242243                        } else {
    243244                                $text = _n( '%s Page', '%s Pages', $num_posts->publish );
     245                                $icon = 'admin-page';
    244246                        }
    245247                        $text = sprintf( $text, number_format_i18n( $num_posts->publish ) );
    246248                        $post_type_object = get_post_type_object( $post_type );
    247249                        if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) {
    248                                 printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text );
     250                                printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s" class="dashicons-before dashicons-%3$s">%2$s</a></li>', $post_type, $text, $icon );
    249251                        } else {
    250                                 printf( '<li class="%1$s-count"><span>%2$s</span></li>', $post_type, $text );
     252                                printf( '<li class="%1$s-count"><span class="dashicons-before dashicons-%3$s">%2$s</span></li>', $post_type, $text, $icon );
    251253                        }
    252254
    253255                }
    function wp_dashboard_right_now() { 
    257259        if ( $num_comm && $num_comm->approved ) {
    258260                $text = sprintf( _n( '%s Comment', '%s Comments', $num_comm->approved ), number_format_i18n( $num_comm->approved ) );
    259261                ?>
    260                 <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
     262                <li class="comment-count"><a href="edit-comments.php" class="dashicons-before dashicons-admin-comments"><?php echo $text; ?></a></li>
    261263                <?php
    262264                if ( $num_comm->moderated ) {
    263265                        /* translators: Number of comments in moderation */
    264266                        $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) );
    265267                        ?>
    266                         <li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated"><?php echo $text; ?></a></li>
     268                        <li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated" class="dashicons-before dashicons-format-chat"><?php echo $text; ?></a></li>
    267269                        <?php
    268270                }
    269271        }