display_space_usage()
Displays the amount of disk space used by the current site. Not used in core.
描述
源代码
File: wp-admin/includes/ms.php
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 / KB_IN_BYTES );
/* translators: Gigabytes */
$space .= __( 'GB' );
} else {
$space = number_format( $space_allowed );
/* translators: Megabytes */
$space .= __( 'MB' );
}
?>
<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
}
更新日志
Version | 描述 |
---|---|
MU | Introduced. |
相关函数
Uses
-
wp-includes/l10n.php:
__() -
wp-includes/ms-functions.php:
get_space_allowed() -
wp-includes/ms-functions.php:
get_space_used()
User Contributed Notes
你可能对这些文章感兴趣:
- wordpress函数edit_user()用法示例
- wordpress函数email_exists()用法示例
- wordpress函数endElement()用法示例
- wordpress函数edit_term_link()用法示例
- wordpress函数edit_post_link()用法示例
- wordpress函数edit_tag_link()用法示例
- wordpress函数edit_link()用法示例
- wordpress函数edit_post()用法示例
- wordpress函数edit_form_image_editor()用法示例
- wordpress函数edit_comment_link()用法示例
- wordpress函数edit_bookmark_link()用法示例
- wordpress函数edit_comment()用法示例
- wordpress函数drop_index()用法示例
- wordpress函数dynamic_sidebar()用法示例
如有疑问,请前往问答中心反馈!
反馈