Make WordPress Core


Ignore:
Timestamp:
11/13/2013 10:08:47 PM (12 years ago)
Author:
nacin
Message:

Merge the new dashboard design into core.

Merges https://github.com/growthdesigner/wp-dash.

props lessbloat, joen, helen, dbernar1, kraftbj, ryelle, tillkruess, grapplerulrich, markjaquith.
see #25824.

File:
1 edited

Legend:

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

    r25880 r26144  
    3030$parent_file = 'index.php';
    3131
    32 if ( is_user_admin() )
    33     add_screen_option('layout_columns', array('max' => 4, 'default' => 1) );
    34 else
    35     add_screen_option('layout_columns', array('max' => 4, 'default' => 2) );
    36 
    3732$help = '<p>' . __( 'Welcome to your WordPress Dashboard! This is the screen you will see when you log in to your site, and gives you access to all the site management features of WordPress. You can get help for any screen by clicking the Help tab in the upper corner.' ) . '</p>';
    3833
     
    4843// Help tabs
    4944
    50 $help  = '<p>' . __('The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.') . '</p>';
    51 $help .= '<p>' . __('Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.') . '</p>';
     45$help  = '<p>' . __( 'The left-hand navigation menu provides links to all of the WordPress administration screens, with submenu items displayed on hover. You can minimize this menu to a narrow icon strip by clicking on the Collapse Menu arrow at the bottom.' ) . '</p>';
     46$help .= '<p>' . __( 'Links in the Toolbar at the top of the screen connect your dashboard and the front end of your site, and provide access to your profile and helpful WordPress information.' ) . '</p>';
    5247
    5348$screen->add_help_tab( array(
    5449    'id'      => 'help-navigation',
    55     'title'   => __('Navigation'),
     50    'title'   => __( 'Navigation' ),
    5651    'content' => $help,
    5752) );
    5853
    59 $help  = '<p>' . __('You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.') . '</p>';
    60 $help .= '<p>' . __('<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '</p>';
    61 $help .= '<p>' . __('<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.') . '</p>';
    62 $help .= '<p>' . __('<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some boxes have configurable content, and will show a &#8220;Configure&#8221; link in the title bar if you hover over it.') . '</p>';
     54$help  = '<p>' . __( 'You can use the following controls to arrange your Dashboard screen to suit your workflow. This is true on most other administration screens as well.' ) . '</p>';
     55$help .= '<p>' . __( '<strong>Screen Options</strong> - Use the Screen Options tab to choose which Dashboard boxes to show.' ) . '</p>';
     56$help .= '<p>' . __( '<strong>Drag and Drop</strong> - To rearrange the boxes, drag and drop by clicking on the title bar of the selected box and releasing when you see a gray dotted-line rectangle appear in the location you want to place the box.' ) . '</p>';
     57$help .= '<p>' . __( '<strong>Box Controls</strong> - Click the title bar of the box to expand or collapse it. In addition, some boxes have configurable content, and will show a &#8220;Configure&#8221; link in the title bar if you hover over it.' ) . '</p>';
    6358
    6459$screen->add_help_tab( array(
    6560    'id'      => 'help-layout',
    66     'title'   => __('Layout'),
     61    'title'   => __( 'Layout' ),
    6762    'content' => $help,
    6863) );
    6964
    70 $help  = '<p>' . __('The boxes on your Dashboard screen are:') . '</p>';
     65$help  = '<p>' . __( 'The boxes on your Dashboard screen are:' ) . '</p>';
    7166if ( current_user_can( 'edit_posts' ) )
    72     $help .= '<p>' . __('<strong>Right Now</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.') . '</p>';
    73 if ( current_user_can( 'moderate_comments' ) )
    74     $help .= '<p>' . __('<strong>Recent Comments</strong> - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '</p>';
    75 if ( current_user_can( 'publish_posts' ) )
    76     $help .= '<p>' . __('<strong>Incoming Links</strong> - Shows links to your site found by Google Blog Search.') . '</p>';
    77 if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) {
    78     $help .= '<p>' . __('<strong>QuickPress</strong> - Allows you to create a new post and either publish it or save it as a draft.') . '</p>';
    79     $help .= '<p>' . __('<strong>Recent Drafts</strong> - Displays links to the 5 most recent draft posts you&#8217;ve started.') . '</p>';
    80 }
    81 $help .= '<p>' . __('<strong>WordPress Blog</strong> - Latest news from the official WordPress project.') . '</p>';
    82 $help .= '<p>' . __('<strong>Other WordPress News</strong> - Shows the <a href="http://planet.wordpress.org" target="_blank">WordPress Planet</a> feed. You can configure it to show a different feed of your choosing.') . '</p>';
     67    $help .= '<p>' . __( '<strong>Site Content</strong> - Displays a summary of the content on your site and identifies which theme and version of WordPress you are using.' ) . '</p>';
     68$help .= '<p>' . __( '<strong>Activity</strong> - Shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts and allows you to moderate them.' ) . '</p>';
     69if ( is_blog_admin() && current_user_can( 'edit_posts' ) )
     70    $help .= '<p>' . __( "<strong>Quick Draft</strong> - Allows you to create a new post and save it as a draft. Also displays links to the 5 most recent draft posts you've started." ) . '</p>';
    8371if ( ! is_multisite() && current_user_can( 'install_plugins' ) )
    84     $help .= '<p>' . __('<strong>Plugins</strong> - Features the most popular, newest, and recently updated plugins from the WordPress.org Plugin Directory.') . '</p>';
     72    $help .= '<p>' . __( '<strong>WordPress News</strong> - Latest news from the official WordPress project, the <a href="http://planet.wordpress.org/">WordPress Planet</a>, and popular and recent plugins.' ) . '</p>';
     73else
     74    $help .= '<p>' . __( '<strong>WordPress News</strong> - Latest news from the official WordPress project, the <a href="http://planet.wordpress.org/">WordPress Planet</a>.' ) . '</p>';
    8575if ( current_user_can( 'edit_theme_options' ) )
    86     $help .= '<p>' . __('<strong>Welcome</strong> - Shows links for some of the most common tasks when setting up a new site.') . '</p>';
     76    $help .= '<p>' . __( '<strong>Welcome</strong> - Shows links for some of the most common tasks when setting up a new site.' ) . '</p>';
    8777
    8878$screen->add_help_tab( array(
    8979    'id'      => 'help-content',
    90     'title'   => __('Content'),
     80    'title'   => __( 'Content' ),
    9181    'content' => $help,
    9282) );
     
    10090);
    10191
    102 include (ABSPATH . 'wp-admin/admin-header.php');
     92include ( ABSPATH . 'wp-admin/admin-header.php' );
    10393
    104 $today = current_time('mysql', 1);
     94$today = current_time( 'mysql', 1 );
    10595?>
    10696
    10797<div class="wrap">
    108 <?php screen_icon(); ?>
    109 <h2><?php echo esc_html( $title ); ?></h2>
     98    <?php screen_icon(); ?>
     99    <h2><?php echo esc_html( $title ); ?></h2>
    110100
    111 <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
     101    <?php if ( has_action( 'welcome_panel' ) && current_user_can( 'edit_theme_options' ) ) :
    112102    $classes = 'welcome-panel';
    113103
     
    118108        $classes .= ' hidden'; ?>
    119109
    120     <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
    121         <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
     110    <div id="welcome-panel" class="<?php echo esc_attr( $classes ); ?>">
     111        <?php wp_nonce_field( 'welcome-panel-nonce', 'welcomepanelnonce', false ); ?>
    122112        <a class="welcome-panel-close" href="<?php echo esc_url( admin_url( '?welcome=0' ) ); ?>"><?php _e( 'Dismiss' ); ?></a>
    123113        <?php
     
    133123        ?>
    134124    </div>
    135 <?php endif; ?>
     125    <?php endif; ?>
    136126
    137 <div id="dashboard-widgets-wrap">
    138 
    139 <?php wp_dashboard(); ?>
    140 
    141 <div class="clear"></div>
    142 </div><!-- dashboard-widgets-wrap -->
     127    <div id="dashboard-widgets-wrap">
     128    <?php wp_dashboard(); ?>
     129    </div><!-- dashboard-widgets-wrap -->
    143130
    144131</div><!-- wrap -->
    145132
    146 <?php require(ABSPATH . 'wp-admin/admin-footer.php'); ?>
     133<?php require( ABSPATH . 'wp-admin/admin-footer.php' ); ?>
Note: See TracChangeset for help on using the changeset viewer.