X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/8f374b7233bc2815ccc387e448d208c5434eb961..fa11948979fd6a4ea5705dc613b239699a459db3:/wp-admin/index.php diff --git a/wp-admin/index.php b/wp-admin/index.php index 34273977..d74a45b8 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -7,7 +7,7 @@ */ /** Load WordPress Bootstrap */ -require_once('./admin.php'); +require_once( dirname( __FILE__ ) . '/admin.php' ); /** Load WordPress dashboard API */ require_once(ABSPATH . 'wp-admin/includes/dashboard.php'); @@ -15,8 +15,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() ) @@ -32,7 +36,10 @@ else $help = '

' . __( '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.' ) . '

'; -get_current_screen()->add_help_tab( array( +// Not using chaining here, so as to be parseable by PHP4. +$screen = get_current_screen(); + +$screen->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => $help, @@ -43,7 +50,7 @@ get_current_screen()->add_help_tab( array( $help = '

' . __('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.') . '

'; $help .= '

' . __('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.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-navigation', 'title' => __('Navigation'), 'content' => $help, @@ -52,9 +59,9 @@ get_current_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.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-layout', 'title' => __('Layout'), 'content' => $help, @@ -67,7 +74,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.') . '

'; } @@ -78,7 +85,7 @@ if ( ! is_multisite() && current_user_can( 'install_plugins' ) ) if ( current_user_can( 'edit_theme_options' ) ) $help .= '

' . __('Welcome - Shows links for some of the most common tasks when setting up a new site.') . '

'; -get_current_screen()->add_help_tab( array( +$screen->add_help_tab( array( 'id' => 'help-content', 'title' => __('Content'), 'content' => $help, @@ -86,7 +93,7 @@ get_current_screen()->add_help_tab( array( unset( $help ); -get_current_screen()->set_help_sidebar( +$screen->set_help_sidebar( '

' . __( 'For more information:' ) . '

' . '

' . __( 'Documentation on Dashboard' ) . '

' . '

' . __( 'Support Forums' ) . '

' @@ -101,7 +108,31 @@ $today = current_time('mysql', 1);

- +user_email != get_option( 'admin_email' ) ); + if ( $hide ) + $classes .= ' hidden'; ?> + +
+ + + remove_action( 'welcome_panel', 'wp_welcome_panel' ); + * + * @since 3.5.0 + */ + do_action( 'welcome_panel' ); + ?> +
+