X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/wordpress.git/blobdiff_plain/596d585e1dc1eb25bccd3781e37210a4e2504179..6c8f14c09105d0afa4c1574215c59b5021040e76:/wp-admin/index.php?ds=inline diff --git a/wp-admin/index.php b/wp-admin/index.php index c5853baf..dd429e7f 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -17,8 +17,12 @@ require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); wp_dashboard_setup(); wp_enqueue_script( 'dashboard' ); -wp_enqueue_script( 'plugin-install' ); -wp_enqueue_script( 'media-upload' ); +if ( current_user_can( 'edit_theme_options' ) ) + wp_enqueue_script( 'customize-loader' ); +if ( current_user_can( 'install_plugins' ) ) + wp_enqueue_script( 'plugin-install' ); +if ( current_user_can( 'upload_files' ) ) + wp_enqueue_script( 'media-upload' ); add_thickbox(); if ( wp_is_mobile() ) @@ -57,7 +61,7 @@ $screen->add_help_tab( array( $help = '
' . __('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.') . '
'; $help .= '' . __('Screen Options - Use the Screen Options tab to choose which Dashboard boxes to show, and how many columns to display.') . '
'; $help .= '' . __('Drag and Drop - 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.') . '
'; -$help .= '' . __('Box Controls - Click the title bar of the box to expand or collapse it. In addition, some box have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '
'; +$help .= '' . __('Box Controls - Click the title bar of the box to expand or collapse it. In addition, some boxes have configurable content, and will show a “Configure” link in the title bar if you hover over it.') . '
'; $screen->add_help_tab( array( 'id' => 'help-layout', @@ -72,7 +76,7 @@ if ( current_user_can( 'moderate_comments' ) ) $help .= '' . __('Recent Comments - Shows the most recent comments on your posts (configurable, up to 30) and allows you to moderate them.') . '
'; if ( current_user_can( 'publish_posts' ) ) $help .= '' . __('Incoming Links - Shows links to your site found by Google Blog Search.') . '
'; -if ( current_user_can( 'edit_posts' ) ) { +if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { $help .= '' . __('QuickPress - Allows you to create a new post and either publish it or save it as a draft.') . '
'; $help .= '' . __('Recent Drafts - Displays links to the 5 most recent draft posts you’ve started.') . '
'; } @@ -106,7 +110,21 @@ $today = current_time('mysql', 1); - +user_email != get_option( 'admin_email' ) ); + if ( $hide ) + $classes .= ' hidden'; ?> + + +