Ticket #12202: 12202.1.diff
File 12202.1.diff, 6.9 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/dashboard.php
212 212 213 213 $num_comm = wp_count_comments( ); 214 214 215 echo "\n\t".'< p class="sub">' . __('At a Glance') . '</p>';216 echo "\n\t".'< div class="table">'."\n\t".'<table>';215 echo "\n\t".'<div class="table table_content">'."\n\t".'<table>'; 216 echo "\n\t".'<caption>' . __('Content') . '</caption>'; 217 217 echo "\n\t".'<tr class="first">'; 218 218 219 219 // Posts … … 225 225 } 226 226 echo '<td class="first b b-posts">' . $num . '</td>'; 227 227 echo '<td class="t posts">' . $text . '</td>'; 228 229 echo '</tr><tr>'; 228 230 /* TODO: Show status breakdown on hover 229 231 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can 230 232 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; … … 241 243 $pending_text = ''; 242 244 } 243 245 */ 246 247 // Pages 248 $num = number_format_i18n( $num_pages->publish ); 249 $text = _n( 'Page', 'Pages', $num_pages->publish ); 250 if ( current_user_can( 'edit_pages' ) ) { 251 $num = "<a href='edit.php?post_type=page'>$num</a>"; 252 $text = "<a href='edit.php?post_type=page'>$text</a>"; 253 } 254 echo '<td class="first b b_pages">' . $num . '</td>'; 255 echo '<td class="t pages">' . $text . '</td>'; 256 257 echo '</tr><tr>'; 244 258 259 // Categories 260 $num = number_format_i18n( $num_cats ); 261 $text = _n( 'Category', 'Categories', $num_cats ); 262 if ( current_user_can( 'manage_categories' ) ) { 263 $num = "<a href='categories.php'>$num</a>"; 264 $text = "<a href='categories.php'>$text</a>"; 265 } 266 echo '<td class="first b b-cats">' . $num . '</td>'; 267 echo '<td class="t cats">' . $text . '</td>'; 268 269 echo '</tr><tr>'; 270 271 // Tags 272 $num = number_format_i18n( $num_tags ); 273 $text = _n( 'Tag', 'Tags', $num_tags ); 274 if ( current_user_can( 'manage_categories' ) ) { 275 $num = "<a href='edit-tags.php'>$num</a>"; 276 $text = "<a href='edit-tags.php'>$text</a>"; 277 } 278 echo '<td class="first b b-tags">' . $num . '</td>'; 279 echo '<td class="t tags">' . $text . '</td>'; 280 281 echo "</tr>"; 282 echo "\n\t</table>\n\t</div>"; 283 284 echo "\n\t".'<div class="table table_discussion">'."\n\t".'<table>'; 285 echo "\n\t".'<caption>' . __('Discussion') . '</caption>'; 286 echo "\n\t".'<tr class="first">'; 287 245 288 // Total Comments 246 289 $num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>'; 247 290 $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); … … 254 297 255 298 echo '</tr><tr>'; 256 299 257 // Pages258 $num = number_format_i18n( $num_pages->publish );259 $text = _n( 'Page', 'Pages', $num_pages->publish );260 if ( current_user_can( 'edit_pages' ) ) {261 $num = "<a href='edit.php?post_type=page'>$num</a>";262 $text = "<a href='edit.php?post_type=page'>$text</a>";263 }264 echo '<td class="first b b_pages">' . $num . '</td>';265 echo '<td class="t pages">' . $text . '</td>';266 267 300 // Approved Comments 268 301 $num = '<span class="approved-count">' . number_format_i18n($num_comm->approved) . '</span>'; 269 302 $text = _nx( 'Approved', 'Approved', $num_comm->approved, 'Right Now' ); … … 276 309 277 310 echo "</tr>\n\t<tr>"; 278 311 279 // Categories280 $num = number_format_i18n( $num_cats );281 $text = _n( 'Category', 'Categories', $num_cats );282 if ( current_user_can( 'manage_categories' ) ) {283 $num = "<a href='edit-tags.php?taxonomy=category'>$num</a>";284 $text = "<a href='edit-tags.php?taxonomy=category'>$text</a>";285 }286 echo '<td class="first b b-cats">' . $num . '</td>';287 echo '<td class="t cats">' . $text . '</td>';288 289 312 // Pending Comments 290 313 $num = '<span class="pending-count">' . number_format_i18n($num_comm->moderated) . '</span>'; 291 314 $text = _n( 'Pending', 'Pending', $num_comm->moderated ); … … 298 321 299 322 echo "</tr>\n\t<tr>"; 300 323 301 // Tags302 $num = number_format_i18n( $num_tags );303 $text = _n( 'Tag', 'Tags', $num_tags );304 if ( current_user_can( 'manage_categories' ) ) {305 $num = "<a href='edit-tags.php'>$num</a>";306 $text = "<a href='edit-tags.php'>$text</a>";307 }308 echo '<td class="first b b-tags">' . $num . '</td>';309 echo '<td class="t tags">' . $text . '</td>';310 311 324 // Spam Comments 312 325 $num = number_format_i18n($num_comm->spam); 313 326 $text = _n( 'Spam', 'Spam', $num_comm->spam ); … … 321 334 echo "</tr>"; 322 335 do_action('right_now_table_end'); 323 336 echo "\n\t</table>\n\t</div>"; 324 337 325 338 echo "\n\t".'<div class="versions">'; 326 339 $ct = current_theme_info(); 327 340 … … 418 431 <p class="submit"> 419 432 <input type="hidden" name="action" id="quickpost-action" value="post-quickpress-save" /> 420 433 <input type="hidden" name="quickpress_post_ID" value="<?php echo (int) $post->ID; ?>" /> 421 <input type="hidden" name="post_type" value="post" />422 434 <?php wp_nonce_field('add-post'); ?> 423 435 <input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" /> 424 436 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> … … 995 1007 */ 996 1008 function wp_dashboard_empty() {} 997 1009 998 ?> 1010 ?> 1011 No newline at end of file -
wp-admin/css/dashboard.dev.css
91 91 92 92 #dashboard_right_now .inside { 93 93 font-size: 12px; 94 padding-top: 20px; 94 95 } 95 96 96 #dashboard_right_now p.sub{97 #dashboard_right_now caption { 97 98 font-style: italic; 98 99 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; 99 100 padding: 5px 10px 15px; 100 101 color: #777; 101 102 font-size: 13px; 103 position: absolute; 104 top: -26px; 105 left: 3px; 102 106 } 103 107 104 108 #dashboard_right_now .table { 109 width: 45%; 110 margin: 0 -9px; 111 padding: 0 10px; 105 112 background: #f9f9f9; 106 113 border-top: #ececec 1px solid; 107 114 border-bottom: #ececec 1px solid; 108 margin: 0 -9px 10px; 109 padding: 0 10px; 115 position: relative; 110 116 } 111 117 112 #dashboard_right_now table { 113 width: 100%; 118 #dashboard_right_now .table_content { 119 float: left; 120 border-right: #ececec 1px solid; 114 121 } 115 122 123 #dashboard_right_now .table_discussion { 124 float: right; 125 border-left: #ececec 1px solid; 126 } 127 116 128 #dashboard_right_now table td { 117 129 border-top: #ececec 1px solid; 118 130 padding: 3px 0; … … 128 140 text-align: right; 129 141 font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif; 130 142 font-size: 14px; 143 width: 1%; 131 144 } 132 145 133 146 #dashboard_right_now td.b a { … … 149 162 white-space: nowrap; 150 163 } 151 164 152 #dashboard_right_now td.first,153 #dashboard_right_now td.last {154 width: 1%;155 }156 157 165 #dashboard_right_now .spam { 158 166 color: red; 159 167 } … … 168 176 169 177 #dashboard_right_now .versions { 170 178 padding: 6px 10px 12px; 179 clear: left; 171 180 } 172 181 173 182 #dashboard_right_now .versions .b { … … 396 405 .dashboard-comment-wrap { 397 406 overflow: hidden; 398 407 word-wrap: break-word; 399 } 400 408 } 409 No newline at end of file