WordPress.org

Make WordPress Core

Ticket #26574: 26574.diff

File 26574.diff, 2.2 KB (added by mattheu, 6 years ago)
  • src/wp-admin/includes/dashboard.php

     
    182182                $theme_name = $theme->display('Name');
    183183?>
    184184        <div class="main">
     185
    185186        <ul>
    186187        <?php
    187188        // Posts and Pages
     
    194195                                $text = _n( '%s Page', '%s Pages', $num_posts->publish );
    195196                        }
    196197                        $text = sprintf( $text, number_format_i18n( $num_posts->publish ) );
    197                         printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text );
     198                       
     199                        $post_type_object = get_post_type_object( $post_type );
     200
     201                        if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) )
     202                                printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text );
     203                        else
     204                                printf( '<li class="%1$s-count"><span href="edit.php?post_type=%1$s">%2$s</span></li>', $post_type, $text );
     205
    198206                }
    199207        }
    200208        // Comments
  • src/wp-admin/css/wp-admin.css

     
    29622962
    29632963/* Dashboard right now - Colors */
    29642964
    2965 #dashboard_right_now li a:before {
     2965#dashboard_right_now li a:before,
     2966#dashboard_right_now li span:before {
    29662967        color: #888;
    29672968}
    29682969
     
    29812982        margin: 0 0 1em;
    29822983}
    29832984
    2984 #dashboard_right_now .warning a:before {
     2985#dashboard_right_now .warning a:before,
     2986#dashboard_right_now .warning span:before {
    29852987        color: #d54e21;
    29862988}
    29872989
    29882990/* Dashboard right now - Icons */
    2989 #dashboard_right_now li a:before {
     2991#dashboard_right_now li a:before,
     2992#dashboard_right_now li span:before {
    29902993        content: '\f159';
    29912994        font: normal 20px/1 'dashicons';
    29922995        speak: none;
     
    30013004        text-decoration: none !important;
    30023005}
    30033006
    3004 #dashboard_right_now .page-count a:before {
     3007#dashboard_right_now .page-count a:before,
     3008#dashboard_right_now .page-count span:before {
    30053009        content: '\f105';
    30063010}
    30073011
    3008 #dashboard_right_now .post-count a:before {
     3012#dashboard_right_now .post-count a:before,
     3013#dashboard_right_now .post-count span:before {
    30093014        content: '\f109';
    30103015}
    30113016