wpseek.com
WordPress开发者和主题制作者的搜索引擎
display_space_usage › WordPress Function
Since
已弃用n/a
› display_space_usage ( 没有参数 )
定义在: |
|
文档: | |
Change Log: |
|
Displays the amount of disk space used by the current site. Not used in core.
Related Functions: display_header, is_upload_space_available, display_theme, upload_space_setting, display_themes
源码
function display_space_usage() { $space_allowed = get_space_allowed(); $space_used = get_space_used(); $percent_used = ( $space_used / $space_allowed ) * 100; $space = size_format( $space_allowed * MB_IN_BYTES ); ?> <strong> <?php /* translators: Storage space that's been used. 1: Percentage of used space, 2: Total space allowed in megabytes or gigabytes. */ printf( __( 'Used: %1$s%% of %2$s' ), number_format( $percent_used ), $space ); ?> </strong> <?php }