Make WordPress Core

Ticket #12202: 12202.1.diff

File 12202.1.diff, 6.9 KB (added by matveb, 15 years ago)

updated patch to only change dashboard.dev.css - test with SCRIPT_DEBUG

  • wp-admin/includes/dashboard.php

     
    212212
    213213        $num_comm = wp_count_comments( );
    214214
    215         echo "\n\t".'<p class="sub">' . __('At a Glance') . '</p>';
    216         echo "\n\t".'<div class="table">'."\n\t".'<table>';
     215        echo "\n\t".'<div class="table table_content">'."\n\t".'<table>';
     216        echo "\n\t".'<caption>' . __('Content') . '</caption>';
    217217        echo "\n\t".'<tr class="first">';
    218218
    219219        // Posts
     
    225225        }
    226226        echo '<td class="first b b-posts">' . $num . '</td>';
    227227        echo '<td class="t posts">' . $text . '</td>';
     228       
     229        echo '</tr><tr>';
    228230        /* TODO: Show status breakdown on hover
    229231        if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds.  Don't show if !current_user_can
    230232                $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>';
     
    241243                $pending_text = '';
    242244        }
    243245        */
     246       
     247        // Pages
     248        $num = number_format_i18n( $num_pages->publish );
     249        $text = _n( 'Page', 'Pages', $num_pages->publish );
     250        if ( current_user_can( 'edit_pages' ) ) {
     251                $num = "<a href='edit.php?post_type=page'>$num</a>";
     252                $text = "<a href='edit.php?post_type=page'>$text</a>";
     253        }
     254        echo '<td class="first b b_pages">' . $num . '</td>';
     255        echo '<td class="t pages">' . $text . '</td>';
     256       
     257        echo '</tr><tr>';
    244258
     259        // Categories
     260        $num = number_format_i18n( $num_cats );
     261        $text = _n( 'Category', 'Categories', $num_cats );
     262        if ( current_user_can( 'manage_categories' ) ) {
     263                $num = "<a href='categories.php'>$num</a>";
     264                $text = "<a href='categories.php'>$text</a>";
     265        }
     266        echo '<td class="first b b-cats">' . $num . '</td>';
     267        echo '<td class="t cats">' . $text . '</td>';
     268       
     269        echo '</tr><tr>';
     270       
     271        // Tags
     272        $num = number_format_i18n( $num_tags );
     273        $text = _n( 'Tag', 'Tags', $num_tags );
     274        if ( current_user_can( 'manage_categories' ) ) {
     275                $num = "<a href='edit-tags.php'>$num</a>";
     276                $text = "<a href='edit-tags.php'>$text</a>";
     277        }
     278        echo '<td class="first b b-tags">' . $num . '</td>';
     279        echo '<td class="t tags">' . $text . '</td>';
     280       
     281        echo "</tr>";
     282        echo "\n\t</table>\n\t</div>";
     283       
     284        echo "\n\t".'<div class="table table_discussion">'."\n\t".'<table>';
     285        echo "\n\t".'<caption>' . __('Discussion') . '</caption>';
     286        echo "\n\t".'<tr class="first">';
     287       
    245288        // Total Comments
    246289        $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
    247290        $text = _n( 'Comment', 'Comments', $num_comm->total_comments );
     
    254297
    255298        echo '</tr><tr>';
    256299
    257         // Pages
    258         $num = number_format_i18n( $num_pages->publish );
    259         $text = _n( 'Page', 'Pages', $num_pages->publish );
    260         if ( current_user_can( 'edit_pages' ) ) {
    261                 $num = "<a href='edit.php?post_type=page'>$num</a>";
    262                 $text = "<a href='edit.php?post_type=page'>$text</a>";
    263         }
    264         echo '<td class="first b b_pages">' . $num . '</td>';
    265         echo '<td class="t pages">' . $text . '</td>';
    266 
    267300        // Approved Comments
    268301        $num = '<span class="approved-count">' . number_format_i18n($num_comm->approved) . '</span>';
    269302        $text = _nx( 'Approved', 'Approved', $num_comm->approved, 'Right Now' );
     
    276309
    277310        echo "</tr>\n\t<tr>";
    278311
    279         // Categories
    280         $num = number_format_i18n( $num_cats );
    281         $text = _n( 'Category', 'Categories', $num_cats );
    282         if ( current_user_can( 'manage_categories' ) ) {
    283                 $num = "<a href='edit-tags.php?taxonomy=category'>$num</a>";
    284                 $text = "<a href='edit-tags.php?taxonomy=category'>$text</a>";
    285         }
    286         echo '<td class="first b b-cats">' . $num . '</td>';
    287         echo '<td class="t cats">' . $text . '</td>';
    288 
    289312        // Pending Comments
    290313        $num = '<span class="pending-count">' . number_format_i18n($num_comm->moderated) . '</span>';
    291314        $text = _n( 'Pending', 'Pending', $num_comm->moderated );
     
    298321
    299322        echo "</tr>\n\t<tr>";
    300323
    301         // Tags
    302         $num = number_format_i18n( $num_tags );
    303         $text = _n( 'Tag', 'Tags', $num_tags );
    304         if ( current_user_can( 'manage_categories' ) ) {
    305                 $num = "<a href='edit-tags.php'>$num</a>";
    306                 $text = "<a href='edit-tags.php'>$text</a>";
    307         }
    308         echo '<td class="first b b-tags">' . $num . '</td>';
    309         echo '<td class="t tags">' . $text . '</td>';
    310 
    311324        // Spam Comments
    312325        $num = number_format_i18n($num_comm->spam);
    313326        $text = _n( 'Spam', 'Spam', $num_comm->spam );
     
    321334        echo "</tr>";
    322335        do_action('right_now_table_end');
    323336        echo "\n\t</table>\n\t</div>";
    324 
     337       
    325338        echo "\n\t".'<div class="versions">';
    326339        $ct = current_theme_info();
    327340
     
    418431                <p class="submit">
    419432                        <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" />
    420433                        <input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" />
    421                         <input type="hidden" name="post_type" value="post" />
    422434                        <?php wp_nonce_field('add-post'); ?>
    423435                        <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />
    424436                        <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" />
     
    9951007 */
    9961008function wp_dashboard_empty() {}
    9971009
    998 ?>
     1010?>
     1011 No newline at end of file
  • wp-admin/css/dashboard.dev.css

     
    9191
    9292#dashboard_right_now .inside {
    9393        font-size: 12px;
     94        padding-top: 20px;
    9495}
    9596
    96 #dashboard_right_now p.sub {
     97#dashboard_right_now caption {
    9798        font-style: italic;
    9899        font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    99100        padding: 5px 10px 15px;
    100101        color: #777;
    101102        font-size: 13px;
     103        position: absolute;
     104        top: -26px;
     105        left: 3px;
    102106}
    103107
    104108#dashboard_right_now .table {
     109        width: 45%;
     110        margin: 0 -9px;
     111        padding: 0 10px;
    105112        background: #f9f9f9;
    106113        border-top: #ececec 1px solid;
    107114        border-bottom: #ececec 1px solid;
    108         margin: 0 -9px 10px;
    109         padding: 0 10px;
     115        position: relative;
    110116}
    111117
    112 #dashboard_right_now table {
    113         width: 100%;
     118#dashboard_right_now .table_content {
     119        float: left;
     120        border-right: #ececec 1px solid;
    114121}
    115122
     123#dashboard_right_now .table_discussion {
     124        float: right;
     125        border-left: #ececec 1px solid;
     126}
     127
    116128#dashboard_right_now table  td {
    117129        border-top: #ececec 1px solid;
    118130        padding: 3px 0;
     
    128140        text-align: right;
    129141        font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
    130142        font-size: 14px;
     143        width: 1%;
    131144}
    132145
    133146#dashboard_right_now td.b a {
     
    149162        white-space: nowrap;
    150163}
    151164
    152 #dashboard_right_now td.first,
    153 #dashboard_right_now td.last {
    154         width: 1%;
    155 }
    156 
    157165#dashboard_right_now .spam {
    158166        color: red;
    159167}
     
    168176
    169177#dashboard_right_now .versions {
    170178        padding: 6px 10px 12px;
     179        clear: left;
    171180}
    172181
    173182#dashboard_right_now .versions .b {
     
    396405.dashboard-comment-wrap {
    397406        overflow: hidden;
    398407        word-wrap: break-word;
    399 }
    400 
     408}
     409 No newline at end of file