X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/256a3b381f63716209b3527d0a14442ae570c283..85ad385665744d9cc3bcd939906309be7268edb3:/wp-admin/includes/dashboard.php diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index afc76f0d..0f62ebc7 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -194,7 +194,13 @@ function wp_dashboard_right_now() { $text = _n( '%s Page', '%s Pages', $num_posts->publish ); } $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); - printf( '
  • %2$s
  • ', $post_type, $text ); + $post_type_object = get_post_type_object( $post_type ); + if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { + printf( '
  • %2$s
  • ', $post_type, $text ); + } else { + printf( '
  • %2$s
  • ', $post_type, $text ); + } + } } // Comments