Changes from branches/3.0/wp-admin/includes/dashboard.php at r15458 to trunk/wp-admin/includes/dashboard.php at r17129
- File:
-
- 1 edited
-
trunk/wp-admin/includes/dashboard.php (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/dashboard.php
r15458 r17129 10 10 * Registers dashboard widgets. 11 11 * 12 * handles POST data, sets up filters.13 * 14 * @since unknown12 * Handles POST data, sets up filters. 13 * 14 * @since 2.5.0 15 15 */ 16 16 function wp_dashboard_setup() { 17 17 global $wp_registered_widgets, $wp_registered_widget_controls, $wp_dashboard_control_callbacks; 18 18 $wp_dashboard_control_callbacks = array(); 19 $screen = get_current_screen(); 19 20 20 21 $update = false; … … 26 27 27 28 // Right Now 28 wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' ); 29 if ( is_blog_admin() && current_user_can('edit_posts') ) 30 wp_add_dashboard_widget( 'dashboard_right_now', __( 'Right Now' ), 'wp_dashboard_right_now' ); 31 32 if ( is_network_admin() ) 33 wp_add_dashboard_widget( 'network_dashboard_right_now', __( 'Right Now' ), 'wp_network_dashboard_right_now' ); 29 34 30 35 // Recent Comments Widget 31 if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) { 32 $update = true; 33 $widget_options['dashboard_recent_comments'] = array( 34 'items' => 5, 35 ); 36 } 37 $recent_comments_title = __( 'Recent Comments' ); 38 wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' ); 36 if ( is_blog_admin() && current_user_can('moderate_comments') ) { 37 if ( !isset( $widget_options['dashboard_recent_comments'] ) || !isset( $widget_options['dashboard_recent_comments']['items'] ) ) { 38 $update = true; 39 $widget_options['dashboard_recent_comments'] = array( 40 'items' => 5, 41 ); 42 } 43 $recent_comments_title = __( 'Recent Comments' ); 44 wp_add_dashboard_widget( 'dashboard_recent_comments', $recent_comments_title, 'wp_dashboard_recent_comments', 'wp_dashboard_recent_comments_control' ); 45 } 39 46 40 47 // Incoming Links Widget 41 if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) { 42 $update = true; 43 $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10; 44 $widget_options['dashboard_incoming_links'] = array( 45 'home' => get_option('home'), 46 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 47 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 48 'items' => $num_items, 49 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false 50 ); 51 } 52 wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' ); 48 if ( is_blog_admin() && current_user_can('publish_posts') ) { 49 if ( !isset( $widget_options['dashboard_incoming_links'] ) || !isset( $widget_options['dashboard_incoming_links']['home'] ) || $widget_options['dashboard_incoming_links']['home'] != get_option('home') ) { 50 $update = true; 51 $num_items = isset($widget_options['dashboard_incoming_links']['items']) ? $widget_options['dashboard_incoming_links']['items'] : 10; 52 $widget_options['dashboard_incoming_links'] = array( 53 'home' => get_option('home'), 54 'link' => apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch.google.com/blogsearch?scoring=d&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 55 'url' => isset($widget_options['dashboard_incoming_links']['url']) ? apply_filters( 'dashboard_incoming_links_feed', $widget_options['dashboard_incoming_links']['url'] ) : apply_filters( 'dashboard_incoming_links_feed', 'http://blogsearch.google.com/blogsearch_feeds?scoring=d&ie=utf-8&num=' . $num_items . '&output=rss&partner=wordpress&q=link:' . trailingslashit( get_option('home') ) ), 56 'items' => $num_items, 57 'show_date' => isset($widget_options['dashboard_incoming_links']['show_date']) ? $widget_options['dashboard_incoming_links']['show_date'] : false 58 ); 59 } 60 wp_add_dashboard_widget( 'dashboard_incoming_links', __( 'Incoming Links' ), 'wp_dashboard_incoming_links', 'wp_dashboard_incoming_links_control' ); 61 } 53 62 54 63 // WP Plugins Widget 55 if ( current_user_can( 'install_plugins') )64 if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) 56 65 wp_add_dashboard_widget( 'dashboard_plugins', __( 'Plugins' ), 'wp_dashboard_plugins' ); 57 66 58 67 // QuickPress Widget 59 if ( current_user_can('edit_posts') )68 if ( is_blog_admin() && current_user_can('edit_posts') ) 60 69 wp_add_dashboard_widget( 'dashboard_quick_press', __( 'QuickPress' ), 'wp_dashboard_quick_press' ); 61 70 62 71 // Recent Drafts 63 if ( current_user_can('edit_posts') )72 if ( is_blog_admin() && current_user_can('edit_posts') ) 64 73 wp_add_dashboard_widget( 'dashboard_recent_drafts', __('Recent Drafts'), 'wp_dashboard_recent_drafts' ); 65 74 … … 95 104 96 105 // Hook to register new widgets 97 do_action( 'wp_dashboard_setup' );98 99 106 // Filter widget order 100 $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); 107 if ( is_network_admin() ) { 108 do_action( 'wp_network_dashboard_setup' ); 109 $dashboard_widgets = apply_filters( 'wp_network_dashboard_widgets', array() ); 110 } elseif ( is_user_admin() ) { 111 do_action( 'wp_user_dashboard_setup' ); 112 $dashboard_widgets = apply_filters( 'wp_user_dashboard_widgets', array() ); 113 } else { 114 do_action( 'wp_dashboard_setup' ); 115 $dashboard_widgets = apply_filters( 'wp_dashboard_widgets', array() ); 116 } 101 117 102 118 foreach ( $dashboard_widgets as $widget_id ) { … … 116 132 update_option( 'dashboard_widget_options', $widget_options ); 117 133 118 do_action('do_meta_boxes', 'dashboard', 'normal', '');119 do_action('do_meta_boxes', 'dashboard', 'side', '');134 do_action('do_meta_boxes', $screen->id, 'normal', ''); 135 do_action('do_meta_boxes', $screen->id, 'side', ''); 120 136 } 121 137 122 138 function wp_add_dashboard_widget( $widget_id, $widget_name, $callback, $control_callback = null ) { 139 $screen = get_current_screen(); 123 140 global $wp_dashboard_control_callbacks; 141 124 142 if ( $control_callback && current_user_can( 'edit_dashboard' ) && is_callable( $control_callback ) ) { 125 143 $wp_dashboard_control_callbacks[$widget_id] = $control_callback; … … 127 145 list($url) = explode( '#', add_query_arg( 'edit', false ), 2 ); 128 146 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( $url ) . '">' . __( 'Cancel' ) . '</a></span>'; 129 add_meta_box( $widget_id, $widget_name, '_wp_dashboard_control_callback', 'dashboard', 'normal', 'core' ); 130 return; 131 } 132 list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); 133 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; 134 } 135 $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); 147 $callback = '_wp_dashboard_control_callback'; 148 } else { 149 list($url) = explode( '#', add_query_arg( 'edit', $widget_id ), 2 ); 150 $widget_name .= ' <span class="postbox-title-action"><a href="' . esc_url( "$url#$widget_id" ) . '" class="edit-box open-box">' . __( 'Configure' ) . '</a></span>'; 151 } 152 } 153 154 if ( is_blog_admin () ) 155 $side_widgets = array('dashboard_quick_press', 'dashboard_recent_drafts', 'dashboard_primary', 'dashboard_secondary'); 156 else if (is_network_admin() ) 157 $side_widgets = array('dashboard_primary', 'dashboard_secondary'); 158 else 159 $side_widgets = array(); 160 136 161 $location = 'normal'; 137 162 if ( in_array($widget_id, $side_widgets) ) 138 163 $location = 'side'; 139 add_meta_box( $widget_id, $widget_name , $callback, 'dashboard', $location, 'core' );164 add_meta_box( $widget_id, $widget_name , $callback, $screen->id, $location, 'core' ); 140 165 } 141 166 … … 143 168 echo '<form action="" method="post" class="dashboard-widget-control-form">'; 144 169 wp_dashboard_trigger_widget_control( $meta_box['id'] ); 145 echo '< p class="submit"><input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" /><input type="submit" value="' . esc_attr__( 'Submit' ) . '" /></p>';146 170 echo '<input type="hidden" name="widget_id" value="' . esc_attr($meta_box['id']) . '" />'; 171 submit_button( __('Submit') ); 147 172 echo '</form>'; 148 173 } … … 151 176 * Displays the dashboard. 152 177 * 153 * @since unknown178 * @since 2.5.0 154 179 */ 155 180 function wp_dashboard() { 156 181 global $screen_layout_columns; 182 183 $screen = get_current_screen(); 157 184 158 185 $hide2 = $hide3 = $hide4 = ''; … … 177 204 <?php 178 205 echo "\t<div class='postbox-container' style='$width'>\n"; 179 do_meta_boxes( 'dashboard', 'normal', '' );206 do_meta_boxes( $screen->id, 'normal', '' ); 180 207 181 208 echo "\t</div><div class='postbox-container' style='{$hide2}$width'>\n"; 182 do_meta_boxes( 'dashboard', 'side', '' );209 do_meta_boxes( $screen->id, 'side', '' ); 183 210 184 211 echo "\t</div><div class='postbox-container' style='{$hide3}$width'>\n"; 185 do_meta_boxes( 'dashboard', 'column3', '' );212 do_meta_boxes( $screen->id, 'column3', '' ); 186 213 187 214 echo "\t</div><div class='postbox-container' style='{$hide4}$width'>\n"; 188 do_meta_boxes( 'dashboard', 'column4', '' );215 do_meta_boxes( $screen->id, 'column4', '' ); 189 216 ?> 190 217 </div></div> … … 382 409 do_action( 'rightnow_end' ); 383 410 do_action( 'activity_box_end' ); 411 } 412 413 function wp_network_dashboard_right_now() { 414 $actions = array(); 415 if ( current_user_can('create_sites') ) 416 $actions['create-site'] = '<a href="' . network_admin_url('site-new.php') . '">' . __( 'Create a New Site' ) . '</a>'; 417 if ( current_user_can('create_users') ) 418 $actions['create-user'] = '<a href="' . network_admin_url('user-new.php') . '">' . __( 'Create a New User' ) . '</a>'; 419 420 $c_users = get_user_count(); 421 $c_blogs = get_blog_count(); 422 423 $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); 424 $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); 425 426 $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); 427 428 if ( $actions ) { 429 echo '<ul class="subsubsub">'; 430 foreach ( $actions as $class => $action ) { 431 $actions[ $class ] = "\t<li class='$class'>$action"; 432 } 433 echo implode( " |</li>\n", $actions ) . "</li>\n"; 434 echo '</ul>'; 435 } 436 ?> 437 <br class="clear" /> 438 439 <p class="youhave"><?php echo $sentence; ?></p> 440 <?php do_action( 'wpmuadminresult', '' ); ?> 441 442 <form name="searchform" action="<?php echo network_admin_url('users.php'); ?>" method="get"> 443 <p> 444 <input type="text" name="s" value="" size="17" /> 445 <?php submit_button( __( 'Search Users' ), 'button', 'submit', false, array( 'id' => 'submit_users' ) ); ?> 446 </p> 447 </form> 448 449 <form name="searchform" action="<?php echo network_admin_url('sites.php'); ?>" method="get"> 450 <p> 451 <input type="text" name="s" value="" size="17" /> 452 <?php submit_button( __( 'Search Sites' ), 'button', 'submit', false, array( 'id' => 'submit_sites' ) ); ?> 453 </p> 454 </form> 455 <?php 456 do_action( 'mu_rightnow_end' ); 457 do_action( 'mu_activity_box_end' ); 384 458 } 385 459 … … 446 520 <h4 id="content-label"><label for="content"><?php _e('Content') ?></label></h4> 447 521 <div class="textarea-wrap"> 448 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo $post->post_content; ?></textarea>522 <textarea name="content" id="content" class="mceEditor" rows="3" cols="15" tabindex="2"><?php echo esc_textarea( $post->post_content ); ?></textarea> 449 523 </div> 450 524 … … 461 535 <input type="hidden" name="post_type" value="post" /> 462 536 <?php wp_nonce_field('add-post'); ?> 463 < input type="submit" name="save" id="save-post" class="button" tabindex="4" value="<?php esc_attr_e('Save Draft'); ?>" />537 <?php submit_button( __( 'Save Draft' ), 'button', 'save', false, array( 'id' => 'save-post', 'tabindex'=> 4 ) ); ?> 464 538 <input type="reset" value="<?php esc_attr_e( 'Reset' ); ?>" class="button" /> 465 539 <span id="publishing-action"> … … 518 592 * Display recent comments dashboard widget content. 519 593 * 520 * @since unknown594 * @since 2.5.0 521 595 */ 522 596 function wp_dashboard_recent_comments() { … … 533 607 534 608 $widgets = get_option( 'dashboard_widget_options' ); 535 if ( isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] ) ) 536 $total_items = (int) $widgets['dashboard_recent_comments']['items']; 537 else 538 $total_items = 5; 609 $total_items = isset( $widgets['dashboard_recent_comments'] ) && isset( $widgets['dashboard_recent_comments']['items'] ) 610 ? absint( $widgets['dashboard_recent_comments']['items'] ) : 5; 539 611 540 612 while ( count( $comments ) < 5 && $possible = $wpdb->get_results( "SELECT * FROM $wpdb->comments c LEFT JOIN $wpdb->posts p ON c.comment_post_ID = p.ID WHERE p.post_status != 'trash' ORDER BY c.comment_date_gmt DESC LIMIT $start, 50" ) ) { … … 587 659 588 660 $actions_string = ''; 589 if ( current_user_can( 'edit_post', $comment->comment_post_ID) ) {661 if ( current_user_can( 'edit_comment', $comment->comment_ID ) ) { 590 662 // preorder it: Approve | Reply | Edit | Spam | Trash 591 663 $actions = array( … … 606 678 $delete_url = esc_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID&$del_nonce" ); 607 679 608 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . __( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>';609 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . __( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>';610 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . __('Edit comment') . "'>". __('Edit') . '</a>';611 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'. __('Reply to this comment').'" href="#">' . __('Reply') . '</a>';612 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . __( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';680 $actions['approve'] = "<a href='$approve_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=approved vim-a' title='" . esc_attr__( 'Approve this comment' ) . "'>" . __( 'Approve' ) . '</a>'; 681 $actions['unapprove'] = "<a href='$unapprove_url' class='dim:the-comment-list:comment-$comment->comment_ID:unapproved:e7e7d3:e7e7d3:new=unapproved vim-u' title='" . esc_attr__( 'Unapprove this comment' ) . "'>" . __( 'Unapprove' ) . '</a>'; 682 $actions['edit'] = "<a href='comment.php?action=editcomment&c={$comment->comment_ID}' title='" . esc_attr__('Edit comment') . "'>". __('Edit') . '</a>'; 683 $actions['reply'] = '<a onclick="commentReply.open(\''.$comment->comment_ID.'\',\''.$comment->comment_post_ID.'\');return false;" class="vim-r hide-if-no-js" title="'.esc_attr__('Reply to this comment').'" href="#">' . __('Reply') . '</a>'; 684 $actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>'; 613 685 if ( !EMPTY_TRASH_DAYS ) 614 686 $actions['delete'] = "<a href='$delete_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive'>" . __('Delete Permanently') . '</a>'; 615 687 else 616 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . __( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>';688 $actions['trash'] = "<a href='$trash_url' class='delete:the-comment-list:comment-$comment->comment_ID::trash=1 delete vim-d vim-destructive' title='" . esc_attr__( 'Move this comment to the trash' ) . "'>" . _x('Trash', 'verb') . '</a>'; 617 689 618 690 $actions = apply_filters( 'comment_row_actions', array_filter($actions), $comment ); … … 684 756 685 757 if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset($_POST['widget-recent-comments']) ) { 686 $number = (int) stripslashes($_POST['widget-recent-comments']['items']); 687 if ( $number < 1 || $number > 30 ) 688 $number = 5; 758 $number = absint( $_POST['widget-recent-comments']['items'] ); 689 759 $widget_options['dashboard_recent_comments']['items'] = $number; 690 760 update_option( 'dashboard_widget_options', $widget_options ); … … 694 764 695 765 echo '<p><label for="comments-number">' . __('Number of comments to show:') . '</label>'; 696 echo '<input id="comments-number" name="widget-recent-comments[items]" type="text" value="' . $number . '" size="3" /> <small>' . __( '(at most 30)' ) . '</small></p>';766 echo '<input id="comments-number" name="widget-recent-comments[items]" type="text" value="' . $number . '" size="3" /></p>'; 697 767 } 698 768 … … 704 774 * Display incoming links dashboard widget content. 705 775 * 706 * @since unknown776 * @since 2.5.0 707 777 */ 708 778 function wp_dashboard_incoming_links_output() { … … 764 834 $text = __( '%1$s linked here saying, "%3$s"' ); 765 835 766 if ( $show_date) {767 if ( $show_author || $show_summary)836 if ( !empty($show_date) ) { 837 if ( !empty($show_author) || !empty($show_summary) ) 768 838 /* translators: incoming links feed, %4$s is the date */ 769 839 $text .= ' ' . __( 'on %4$s' ); … … 796 866 * {@internal Missing Short Description}} 797 867 * 798 * @since unknown799 * 800 * @param int$widget_id868 * @since 2.5.0 869 * 870 * @param string $widget_id 801 871 */ 802 872 function wp_dashboard_rss_output( $widget_id ) { … … 818 888 * Display secondary dashboard RSS widget feed. 819 889 * 820 * @since unknown890 * @since 2.5.0 821 891 * 822 892 * @return unknown … … 853 923 * Display plugins most popular, newest plugins, and recently updated widget text. 854 924 * 855 * @since unknown925 * @since 2.5.0 856 926 */ 857 927 function wp_dashboard_plugins_output() { … … 939 1009 * which is later replaced by AJAX call (see top of /wp-admin/index.php) 940 1010 * 941 * @since unknown942 * 943 * @param int$widget_id1011 * @since 2.5.0 1012 * 1013 * @param string $widget_id 944 1014 * @param callback $callback 945 1015 * @param array $check_urls RSS feeds … … 982 1052 * Calls widget control callback. 983 1053 * 984 * @since unknown1054 * @since 2.5.0 985 1055 * 986 1056 * @param int $widget_control_id Registered Widget ID. … … 1000 1070 * from RSS-type widgets. 1001 1071 * 1002 * @since unknown1003 * 1004 * @param string widget_id1005 * @param array form_inputs1072 * @since 2.5.0 1073 * 1074 * @param string $widget_id 1075 * @param array $form_inputs 1006 1076 */ 1007 1077 function wp_dashboard_rss_control( $widget_id, $form_inputs = array() ) { … … 1035 1105 } 1036 1106 1107 // Display File upload quota on dashboard 1108 function wp_dashboard_quota() { 1109 if ( !is_multisite() || !current_user_can('edit_posts') || get_site_option( 'upload_space_check_disabled' ) ) 1110 return true; 1111 1112 $quota = get_space_allowed(); 1113 $used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024; 1114 1115 if ( $used > $quota ) 1116 $percentused = '100'; 1117 else 1118 $percentused = ( $used / $quota ) * 100; 1119 $used_color = ( $percentused < 70 ) ? ( ( $percentused >= 40 ) ? 'waiting' : 'approved' ) : 'spam'; 1120 $used = round( $used, 2 ); 1121 $percentused = number_format( $percentused ); 1122 1123 ?> 1124 <p class="sub musub"><?php _e( 'Storage Space' ); ?></p> 1125 <div class="table table_content musubtable"> 1126 <table> 1127 <tr class="first"> 1128 <td class="first b b-posts"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB</a>' ), esc_url( admin_url( 'upload.php' ) ), $quota ); ?></td> 1129 <td class="t posts"><?php _e( 'Space Allowed' ); ?></td> 1130 </tr> 1131 </table> 1132 </div> 1133 <div class="table table_discussion musubtable"> 1134 <table> 1135 <tr class="first"> 1136 <td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), esc_url( admin_url( 'upload.php' ) ), $used, $percentused ); ?></td> 1137 <td class="last t comments <?php echo $used_color;?>"><?php _e( 'Space Used' );?></td> 1138 </tr> 1139 </table> 1140 </div> 1141 <br class="clear" /> 1142 <?php 1143 } 1144 add_action( 'activity_box_end', 'wp_dashboard_quota' ); 1145 1037 1146 /** 1038 1147 * Empty function usable by plugins to output empty dashboard widget (to be populated later by JS).
Note: See TracChangeset
for help on using the changeset viewer.