display_space_usage()
Displays the amount of disk space used by the current site. Not used in core.
No Hooks.
Return
null
. Nothing (null).
Usage
display_space_usage();
Changelog
Since 3.0.0 | Introduced. |
display_space_usage() display space usage code WP 6.8
<?php 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 }