Changeset 27001 for branches/3.8/src/wp-admin/includes/dashboard.php
- Timestamp:
- 01/22/2014 05:17:34 PM (11 years ago)
- Location:
- branches/3.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.8
-
branches/3.8/src/wp-admin/includes/dashboard.php
r26832 r27001 195 195 } 196 196 $text = sprintf( $text, number_format_i18n( $num_posts->publish ) ); 197 printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text ); 197 $post_type_object = get_post_type_object( $post_type ); 198 if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) { 199 printf( '<li class="%1$s-count"><a href="edit.php?post_type=%1$s">%2$s</a></li>', $post_type, $text ); 200 } else { 201 printf( '<li class="%1$s-count"><span>%2$s</span></li>', $post_type, $text ); 202 } 203 198 204 } 199 205 }
Note: See TracChangeset
for help on using the changeset viewer.