diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index d438ef2703..4f119807e8 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -28,7 +28,8 @@ function wp_dashboard_setup() { wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' ); // Recent Comments Widget - wp_add_dashboard_widget( 'dashboard_recent_comments', sprintf( __( 'Recent Comments View all' ), 'edit-comments.php' ), 'wp_dashboard_recent_comments' ); + $recent_comments_title = ( current_user_can('edit_posts') ) ? sprintf( __( 'Recent Comments View all' ), 'edit-comments.php' ) : __( 'Recent Comments' ); + wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments' ); // Incoming Links Widget if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) { @@ -52,7 +53,8 @@ function wp_dashboard_setup() { wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); // Recent Drafts - wp_add_dashboard_widget( 'dashboard_recent_drafts', sprintf( __( 'Recent Drafts View all' ), 'edit.php?post_status=draft' ), 'wp_dashboard_recent_drafts' ); + if ( current_user_can('edit_posts') ) + wp_add_dashboard_widget( 'dashboard_recent_drafts', sprintf( __( 'Recent Drafts View all' ), 'edit.php?post_status=draft' ), 'wp_dashboard_recent_drafts' ); // Primary feed (Dev Blog) Widget @@ -254,8 +256,8 @@ function wp_dashboard_right_now() { echo ""; do_action('right_now_table_end'); echo "\n\t\n\t"; - - echo "\n\t".'