Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_dashboard_quota [ WordPress Function ]

wp_dashboard_quota ( No parameters )
Defined at:



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_dirsizeBLOGUPLOADDIR ) / 1024 1024;

    if ( 
$used $quota )
        
$percentused '100';
    else
        
$percentused = ( $used $quota ) * 100;
    
$used_color = ( $percentused >= 70 ) ? ' spam' '';
    
$used round$used);
    
$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_urladmin_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_urladmin_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ý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics