Changes from branches/2.7/wp-admin/includes/dashboard.php at r10299 to trunk/wp-admin/includes/dashboard.php at r10154
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r10299 r10154 182 182 // Posts 183 183 $num = number_format_i18n( $num_posts->publish ); 184 $text = __ngettext( 'Post', 'Posts', intval($num_posts->publish) ); 185 if ( current_user_can( 'edit_posts' ) ) { 186 $num = "<a href='edit.php'>$num</a>"; 187 $text = "<a href='edit.php'>$text</a>"; 188 } 189 echo '<td class="first b b-posts">' . $num . '</td>'; 190 echo '<td class="t posts">' . $text . '</td>'; 184 if ( current_user_can( 'edit_posts' ) ) 185 $text = "<a href='edit.php'>$num</a>"; 186 else 187 $text = $num; 188 echo '<td class="first b b-posts">' . $text . '</td>'; 189 echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', intval($num_posts->publish) ) . '</td>'; 191 190 /* TODO: Show status breakdown on hover 192 191 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can … … 208 207 // Total Comments 209 208 $num = number_format_i18n($num_comm->total_comments); 210 $text = __ngettext( 'Comment', 'Comments', $num_comm->total_comments ); 211 if ( current_user_can( 'moderate_comments' ) ) { 209 if ( current_user_can( 'moderate_comments' ) ) 212 210 $num = "<a href='edit-comments.php'>$num</a>"; 213 $text = "<a href='edit-comments.php'>$text</a>"; 214 } 215 echo '<td class="b b-comments">' . $num . '</td>'; 216 echo '<td class="last t comments">' . $text . '</td>'; 211 echo '<td class="b b-comments">'.$num.'</td>'; 212 echo '<td class="last t comments">' . __ngettext( 'Comment', 'Comments', $num_comm->total_comments ) . '</td>'; 217 213 218 214 echo '</tr><tr>'; … … 220 216 // Pages 221 217 $num = number_format_i18n( $num_pages->publish ); 222 $text = __ngettext( 'Page', 'Pages', $num_pages->publish ); 223 if ( current_user_can( 'edit_pages' ) ) { 218 if ( current_user_can( 'edit_pages' ) ) 224 219 $num = "<a href='edit-pages.php'>$num</a>"; 225 $text = "<a href='edit-pages.php'>$text</a>"; 226 } 227 echo '<td class="first b b_pages">' . $num . '</td>'; 228 echo '<td class="t pages">' . $text . '</td>'; 220 echo '<td class="first b b_pages">'.$num.'</td>'; 221 echo '<td class="t pages">' . __ngettext( 'Page', 'Pages', $num_pages->publish ) . '</td>'; 229 222 230 223 // Approved Comments 231 224 $num = number_format_i18n($num_comm->approved); 232 $text = __ngettext( 'Approved', 'Approved', $num_comm->approved ); 233 if ( current_user_can( 'moderate_comments' ) ) { 225 if ( current_user_can( 'moderate_comments' ) ) 234 226 $num = "<a href='edit-comments.php?comment_status=approved'>$num</a>"; 235 $text = "<a class='approved' href='edit-comments.php?comment_status=approved'>$text</a>"; 236 } 237 echo '<td class="b b_approved">' . $num . '</td>'; 238 echo '<td class="last t">' . $text . '</td>'; 227 echo '<td class="b b_approved">'.$num.'</td>'; 228 echo '<td class="last t approved">' . __ngettext( 'Approved', 'Approved', $num_comm->approved ) . '</td>'; 239 229 240 230 echo "</tr>\n\t<tr>"; … … 242 232 // Categories 243 233 $num = number_format_i18n( $num_cats ); 244 $text = __ngettext( 'Category', 'Categories', $num_cats ); 245 if ( current_user_can( 'manage_categories' ) ) { 234 if ( current_user_can( 'manage_categories' ) ) 246 235 $num = "<a href='categories.php'>$num</a>"; 247 $text = "<a href='categories.php'>$text</a>"; 248 } 249 echo '<td class="first b b-cats">' . $num . '</td>'; 250 echo '<td class="t cats">' . $text . '</td>'; 236 echo '<td class="first b b-cats">'.$num.'</td>'; 237 echo '<td class="t cats">' . __ngettext( 'Category', 'Categories', $num_cats ) . '</td>'; 251 238 252 239 // Pending Comments 253 240 $num = number_format_i18n($num_comm->moderated); 254 $text = __ngettext( 'Pending', 'Pending', $num_comm->moderated ); 255 if ( current_user_can( 'moderate_comments' ) ) { 241 if ( current_user_can( 'moderate_comments' ) ) 256 242 $num = "<a href='edit-comments.php?comment_status=moderated'><span class='pending-count'>$num</span></a>"; 257 $text = "<a class='waiting' href='edit-comments.php?comment_status=moderated'>$text</a>"; 258 } 259 echo '<td class="b b-waiting">' . $num . '</td>'; 260 echo '<td class="last t">' . $text . '</td>'; 243 echo '<td class="b b-waiting">'.$num.'</td>'; 244 echo '<td class="last t waiting">' . __ngettext( 'Pending', 'Pending', $num_comm->moderated ) . '</td>'; 261 245 262 246 echo "</tr>\n\t<tr>"; … … 264 248 // Tags 265 249 $num = number_format_i18n( $num_tags ); 266 $text = __ngettext( 'Tag', 'Tags', $num_tags ); 267 if ( current_user_can( 'manage_categories' ) ) { 250 if ( current_user_can( 'manage_categories' ) ) 268 251 $num = "<a href='edit-tags.php'>$num</a>"; 269 $text = "<a href='edit-tags.php'>$text</a>"; 270 } 271 echo '<td class="first b b-tags">' . $num . '</td>'; 272 echo '<td class="t tags">' . $text . '</td>'; 252 echo '<td class="first b b-tags">'.$num.'</td>'; 253 echo '<td class="t tags">' . __ngettext( 'Tag', 'Tags', $num_tags ) . '</td>'; 273 254 274 255 // Spam Comments 275 256 $num = number_format_i18n($num_comm->spam); 276 $text = __ngettext( 'Spam', 'Spam', $num_comm->spam ); 277 if ( current_user_can( 'moderate_comments' ) ) { 257 if ( current_user_can( 'moderate_comments' ) ) 278 258 $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>"; 279 $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>"; 280 } 281 echo '<td class="b b-spam">' . $num . '</td>'; 282 echo '<td class="last t">' . $text . '</td>'; 259 echo '<td class="b b-spam">'.$num.'</td>'; 260 echo '<td class="last t spam">' . __ngettext( 'Spam', 'Spam', $num_comm->spam ) . '</td>'; 283 261 284 262 echo "</tr>"; … … 304 282 update_right_now_message(); 305 283 306 echo "\n\t".'< br class="clear" /></div>';284 echo "\n\t".'</div>'; 307 285 do_action( 'rightnow_end' ); 308 286 do_action( 'activity_box_end' );
Note: See TracChangeset
for help on using the changeset viewer.