Make WordPress Core


Ignore:
Timestamp:
11/20/2013 07:43:36 PM (11 years ago)
Author:
nacin
Message:

Dash cleanup.

  • Use wp_add_dashboard_widget() rather than add_meta_box().
  • Use original functions like wp_dashboard_primary(), wp_dashboard_right_now(), wp_dashboard_quick_press() (where possible).
  • Only include plugins section of the news widget when appropriate, which necessitates the set_current_screen() via the ajax action.
  • Remove some debug cruft that was preventing caching and invalidation.
  • Simplify lots of things where possible.

see #25824.

File:
1 edited

Legend:

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

    r26288 r26291  
    9797        'confirmDelete' => __( "Are you sure you want to delete this theme?\n\nClick 'Cancel' to go back, 'OK' to confirm the delete." ),
    9898        'root'          => '/wp-admin/themes.php',
    99         'container'     => '#appearance',
    10099        'extraRoutes'   => '',
    101100    ),
    102     'i18n' => array(
    103         'addNew'        => __( 'Add New Theme' ),
    104     ),
     101    'l10n' => array(
     102        'addNew' => __( 'Add New Theme' ),
     103        'search'  => __( 'Search...' ),
     104    ),
    105105) );
    106106
     
    113113?>
    114114
    115 <div id="appearance" class="wrap">
     115<div class="wrap">
    116116    <h2><?php esc_html_e( 'Themes' ); ?>
    117         <span id="theme-count" class="theme-count"></span>
     117        <span class="theme-count"></span>
    118118    <?php if ( ! is_multisite() && current_user_can( 'install_themes' ) ) : ?>
    119119        <a href="<?php echo admin_url( 'theme-install.php' ); ?>" class="add-new-h2"><?php echo esc_html( _x( 'Add New', 'Add new theme' ) ); ?></a>
    120120    <?php endif; ?>
    121121    </h2>
     122
     123    <div class="theme-browser"></div>
    122124
    123125<?php
     
    184186?>
    185187
     188<div class="broken-themes">
    186189<h3><?php _e('Broken Themes'); ?></h3>
    187190<p><?php _e('The following themes are installed but incomplete. Themes must have a stylesheet and a template.'); ?></p>
    188191
    189 <table id="broken-themes">
     192<table>
    190193    <tr>
    191194        <th><?php _ex('Name', 'theme name'); ?></th>
     
    196199        echo "
    197200        <tr>
    198              <td>" . $broken_theme->get('Name') ."</td>
     201             <td>" . ( $broken_theme->get( 'Name' ) ? $broken_theme->get( 'Name' ) : $broken_theme->get_stylesheet() ) . "</td>
    199202             <td>" . $broken_theme->errors()->get_error_message() . "</td>
    200203        </tr>";
     
    202205?>
    203206</table>
     207</div>
     208
    204209<?php
    205210}
     
    236241</script>
    237242
    238 <script id="tmpl-theme-search" type="text/template">
    239     <input type="text" name="theme-search" id="theme-search" placeholder="<?php esc_attr_e( 'Search...' ); ?>" />
    240 </script>
    241 
    242243<script id="tmpl-theme-single" type="text/template">
    243244    <div class="theme-backdrop"></div>
     
    249250        </div>
    250251
    251         <div class="theme-screenshots" id="theme-screenshots">
     252        <div class="theme-screenshots">
    252253            <div class="screenshot first"><img src="{{ data.screenshot[0] }}" alt="" /></div>
    253254        <#
Note: See TracChangeset for help on using the changeset viewer.