display_space_usage()
display_space_usage()
显示当前站点使用的磁盘空间量。不用于核心。
Displays the amount of disk space used by the current site. Not used in core.
返回(Return)
无返回值
源码(Source)
/** * Displays the amount of disk space used by the current blog. Not used in core. * * @since MU */ function display_space_usage() { $space_allowed = get_space_allowed(); $space_used = get_space_used(); $percent_used = ( $space_used / $space_allowed ) * 100; if ( $space_allowed > 1000 ) { $space = number_format( $space_allowed / 1024 ); /* translators: Gigabytes */ $space .= __( 'GB' ); } else { $space = number_format( $space_allowed ); /* translators: Megabytes */ $space .= __( 'MB' ); } ?>
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
MU (3.0.0) | wp-admin/includes/ms.php:246 | 0 | 4 |
display_space_usage() 为WP2原创文章,链接:https://www.wp2.cn/functions/display_space_usage/