Ticket #20946: 20946.3.diff
File 20946.3.diff, 8.1 KB (added by , 12 years ago) |
---|
-
wp-admin/includes/dashboard.php
408 408 } 409 409 410 410 function wp_network_dashboard_right_now() { 411 412 if ( ! wp_is_large_network('users') ) 413 $c_users = get_user_count(); 414 else 415 $c_users = __( '10,000+' ); 416 417 if ( ! wp_is_large_network('sites') ) 418 $c_blogs = get_blog_count(); 419 else 420 $c_blogs = __( '10,000+' ); 421 422 $c_plugins = count( get_plugins() ); 423 $c_themes = count( wp_get_themes() ); 424 425 echo "\n\t".'<div class="table table_totals">'; 426 echo "\n\t".'<p class="sub">' . __('Network') . '</p>'."\n\t".'<table>'; 427 echo "\n\t".'<tr class="first">'; 428 429 // Sites 430 $num = number_format_i18n( $c_blogs ); 431 $text = _n( 'Site', 'Sites', $c_blogs ); 432 $count_url = network_admin_url('sites.php'); 433 $num = '<a href="' . $count_url . '">' . $num . '</a>'; 434 $text = '<a href=' . $count_url . '>' . $text . '</a>'; 435 echo '<td class="first b b_sites">' . $num . '</td>'; 436 echo '<td class="t sites">' . $text . '</td>'; 437 438 echo '</tr><tr>'; 439 440 // Users 441 $num = number_format_i18n( $c_users ); 442 $text = _n( 'User', 'Users', $c_users ); 443 $count_url = network_admin_url('users'); 444 $num = '<a href="' . $count_url . '">' . $num . '</a>'; 445 $text = '<a href="' . $count_url . '">' . $text . '</a>'; 446 echo '<td class="first b b-users">' . $num . '</td>'; 447 echo '<td class="t users">' . $text . '</td>'; 448 449 echo '</tr><tr>'; 450 451 // Themes 452 $num = number_format_i18n( $c_themes ); 453 $text = _n( 'Theme', 'Themes', $c_themes ); 454 $count_url = network_admin_url('themes.php'); 455 $num = '<a href="' . $count_url . '">' . $num . '</a>'; 456 $text = '<a href="' . $count_url . '">' . $text . '</a>'; 457 echo '<td class="first b b-themes">' . $num . '</td>'; 458 echo '<td class="t themes">' . $text . '</td>'; 459 460 echo '</tr><tr>'; 461 462 // Plugins 463 $num = number_format_i18n( $c_plugins ); 464 $text = _n( 'Plugin', 'Plugins', $c_plugins ); 465 $count_url = network_admin_url('plugins.php'); 466 $num = '<a href"' . $count_url . '">' . $num . '</a>'; 467 $text = '<a href="' . $count_url . '">' . $text . '</a>'; 468 echo '<td class="first b b-plugins">' . $num . '</td>'; 469 echo '<td class="t plugins">' . $text . '</td>'; 470 471 echo '</tr>'; 472 473 do_action( 'mu_right_now_network_table_end' ); 474 echo "\n\t</table>\n\t</div>"; 475 476 echo "\n\t".'<div class="table table_tools">'; 477 echo "\n\t".'<p class="sub">' . __( 'Tools' ) . '</p>'."\n\t".'<table>'; 478 echo "\n\t".'<tr class="first">'; 479 411 480 $actions = array(); 412 481 if ( current_user_can('create_sites') ) 413 $actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( ' Createa New Site' ) . '</a>';482 $actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( 'Add a New Site' ) . '</a>'; 414 483 if ( current_user_can('create_users') ) 415 $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( ' Createa New User' ) . '</a>';484 $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Add a New User' ) . '</a>'; 416 485 417 $c_users = get_user_count();418 $c_blogs = get_blog_count();419 420 $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) );421 $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) );422 423 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );424 425 486 if ( $actions ) { 426 487 echo '<ul class="subsubsub">'; 427 488 foreach ( $actions as $class => $action ) { … … 430 491 echo implode( " |</li>\n", $actions ) . "</li>\n"; 431 492 echo '</ul>'; 432 493 } 494 495 echo '</tr><tr>' 433 496 ?> 434 <br class="clear" />435 497 436 <p class="youhave"><?php echo $sentence; ?></p>437 <?php do_action( 'wpmuadminresult', '' ); ?>438 439 498 <form action="<?php echo network_admin_url('users.php'); ?>" method="get"> 440 499 <p> 441 500 <input type="search" name="s" value="" size="30" autocomplete="off" /> … … 443 502 </p> 444 503 </form> 445 504 505 </tr><tr> 506 446 507 <form action="<?php echo network_admin_url('sites.php'); ?>" method="get"> 447 508 <p> 448 509 <input type="search" name="s" value="" size="30" autocomplete="off" /> 449 510 <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?> 450 511 </p> 451 512 </form> 513 514 </tr> 452 515 <?php 516 do_action( 'mu_right_now_table_end' ); 517 echo "\n\t</table>\n\t</div>"; 518 519 echo "\n\t".'<div class="versions">'; 520 521 // WordPress Version 522 update_right_now_message(); 523 524 echo "\n\t".'<br class="clear" /></div>'; 453 525 do_action( 'mu_rightnow_end' ); 454 526 do_action( 'mu_activity_box_end' ); 527 528 do_action( 'wpmuadminresult', '' ); 455 529 } 456 530 457 531 function wp_dashboard_quick_press() { -
wp-admin/css/wp-admin.dev.css
653 653 #dashboard_plugins h5, 654 654 a.rsswidget, 655 655 #dashboard_right_now td.b, 656 #network_dashboard_right_now td.b, 656 657 #dashboard-widgets h4, 657 658 .tool-box .title, 658 659 #poststuff h3, … … 4702 4703 ------------------------------------------------------------------------------*/ 4703 4704 4704 4705 #dashboard_right_now .versions .b, 4706 #network_dashboard_right_now .versions .b, 4705 4707 #post-status-display, 4706 4708 #post-visibility-display, 4707 4709 #adminmenu .wp-submenu li.current, … … 5944 5946 5945 5947 /* Right Now */ 5946 5948 #dashboard_right_now p.sub, 5947 #dashboard_right_now .table, #dashboard_right_now .versions { 5949 #dashboard_right_now .table, 5950 #dashboard_right_now .versions, 5951 #network_dashboard_right_now p.sub, 5952 #network_dashboard_right_now .table, 5953 #network_dashboard_right_now .versions { 5948 5954 margin: -12px; 5949 5955 } 5950 5956 5951 #dashboard_right_now .inside { 5957 #dashboard_right_now .inside, 5958 #network_dashboard_right_now .inside { 5952 5959 font-size: 12px; 5953 5960 padding-top: 20px; 5954 5961 } 5955 5962 5956 #dashboard_right_now p.sub { 5963 #dashboard_right_now p.sub, 5964 #network_dashboard_right_now p.sub { 5957 5965 padding: 5px 0 15px; 5958 5966 color: #8f8f8f; 5959 5967 font-size: 14px; … … 5962 5970 left: 15px; 5963 5971 } 5964 5972 5965 #dashboard_right_now .table { 5973 #dashboard_right_now .table, 5974 #network_dashboard_right_now .table { 5966 5975 margin: 0; 5967 5976 padding: 0; 5968 5977 position: relative; 5969 5978 } 5970 5979 5971 #dashboard_right_now .table_content { 5980 #dashboard_right_now .table_content, 5981 #network_dashboard_right_now .table_totals { 5972 5982 float: left; 5973 5983 border-top: #ececec 1px solid; 5974 width: 45%;5975 5984 } 5985 #dashboard_right_now .table_content { 5986 width: 45%; 5987 } 5976 5988 5977 #dashboard_right_now .table_discussion { 5989 #network_dashboard_right_now .table_totals { 5990 width: 35%; 5991 } 5992 5993 #dashboard_right_now .table_discussion, 5994 #network_dashboard_right_now .table_tools { 5978 5995 float: right; 5979 5996 border-top: #ececec 1px solid; 5980 width: 45%;5981 5997 } 5982 5998 5983 #dashboard_right_now table td { 5999 #dashboard_right_now .table_discussion { 6000 width: 45%; 6001 } 6002 6003 #network_dashboard_right_now .table_tools { 6004 width: 55%; 6005 } 6006 6007 #dashboard_right_now table td, 6008 #network_dashboard_right_now td { 5984 6009 padding: 3px 0; 5985 6010 white-space: nowrap; 5986 6011 } 5987 6012 5988 #dashboard_right_now table tr.first td { 6013 #dashboard_right_now table tr.first td, 6014 #network_dashboard_right_now table tr.first td { 5989 6015 border-top: none; 5990 6016 } 5991 6017 5992 #dashboard_right_now td.b { 6018 #dashboard_right_now td.b, 6019 #network_dashboard_right_now td.b { 5993 6020 padding-right: 6px; 5994 6021 text-align: right; 5995 6022 font-size: 14px; 5996 6023 width: 1%; 5997 6024 } 5998 6025 5999 #dashboard_right_now td.b a { 6026 #dashboard_right_now td.b a, 6027 #network_dashboard_right_now td.b a { 6000 6028 font-size: 18px; 6001 6029 } 6002 6030 6003 #dashboard_right_now td.b a:hover { 6031 #dashboard_right_now td.b a:hover, 6032 #network_dashboard_right_now td.b a:hover { 6004 6033 color: #d54e21; 6005 6034 } 6006 6035 6007 #dashboard_right_now .t { 6036 #dashboard_right_now .t, 6037 #network_dashboard_right_now .t { 6008 6038 font-size: 12px; 6009 6039 padding-right: 12px; 6010 6040 padding-top: 6px; 6011 6041 color: #777; 6012 6042 } 6013 6043 6014 #dashboard_right_now .t a { 6044 #dashboard_right_now .t a, 6045 #network_dashboard_right_now .t a { 6015 6046 white-space: nowrap; 6016 6047 } 6017 6048 … … 6027 6058 color: green; 6028 6059 } 6029 6060 6030 #dashboard_right_now .versions { 6061 #dashboard_right_now .versions, 6062 #network_dashboard_right_now .versions { 6031 6063 padding: 6px 10px 12px; 6032 6064 clear: both; 6033 6065 } 6034 6066 6035 #dashboard_right_now a.button { 6067 #dashboard_right_now a.button, 6068 #network_dashboard_right_now a.button { 6036 6069 float: right; 6037 6070 clear: right; 6038 6071 position: relative;