wp_dashboard_quota [ WordPress Function ]
wp_dashboard_quota ( No parameters )
| Defined at: |
|
Benzer Fonksiyonlar: wp_dashboard, wp_dashboard_empty, wp_dashboard_setup, wp_dashboard_secondary, wp_dashboard_plugins
No description yet.
Source
<?php
function wp_dashboard_quota() {
if ( !is_multisite() || !current_user_can('upload_files') || get_site_option( 'upload_space_check_disabled' ) )
return true;
$quota = get_space_allowed();
$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
if ( $used > $quota )
$percentused = '100';
else
$percentused = ( $used / $quota ) * 100;
$used_color = ( $percentused >= 70 ) ? ' spam' : '';
$used = round( $used, 2 );
$percentused = number_format( $percentused );
?>
<p class="sub musub"><?php _e( 'Storage Space' ); ?></p>
<div class="table table_content musubtable">
<table>
<tr class="first">
<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>
<td class="t posts"><?php _e( 'Space Allowed' ); ?></td>
</tr>
</table>
</div>
<div class="table table_discussion musubtable">
<table>
<tr class="first">
<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>
<td class="last t comments<?php echo $used_color;?>"><?php _e( 'Space Used' );?></td>
</tr>
</table>
</div>
<br class="clear" />
<?php
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- wp_dashboard_quota (WordPress Function) - WPSeek.com
WordPress lookup for wp_dashboard_quota, a WordPress Function. wpseek.com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - How to solve 500 Error on WordPress Admin Dashboard due to time ...
Mar 7, 2011 ... add_action( 'activity_box_end', 'wp_dashboard_quota' );. In which I commented the line //$used = get_dirsize( BLOGUPLOADDIR ) / 1024 ...
wordpress.stackexchange.com - PHPXRef 0.7 : WordPress : Detail view of dashboard.php
wp_dashboard_quota() wp_dashboard_browser_nag() ...
phpxref.ftwr.co.uk - Docs for page dashboard.php
wp_dashboard_quota (line 1103). void wp_dashboard_quota (). wp_dashboard_recent_comments (line 595). Display recent comments dashboard widget ...
phpdoc.wordpress.org