display_space_usage

The timeline below displays how wordpress function display_space_usage has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.3

/**
 * Displays the amount of disk space used by the current site. Not used in core.
 *
 * @since MU (3.0.0)
 */
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 
}

WordPress Version: 5.1

/**
 * Displays the amount of disk space used by the current site. Not used in core.
 *
 * @since MU (3.0.0)
 */
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 
}

WordPress Version: 4.9

/**
 * Displays the amount of disk space used by the current site. Not used in core.
 *
 * @since MU (3.0.0)
 */
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 
}

WordPress Version: 4.7

/**
 * Displays the amount of disk space used by the current site. 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 / 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 
}

WordPress Version: 4.5

/**
 * Displays the amount of disk space used by the current site. 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 / KB_IN_BYTES);
        /* translators: Gigabytes */
        $space .= __('GB');
    } else {
        $space = number_format($space_allowed);
        /* translators: Megabytes */
        $space .= __('MB');
    }
    ?>
	<strong><?php 
    printf(__('Used: %1$s%% of %2$s'), number_format($percent_used), $space);
    ?></strong>
	<?php 
}

WordPress Version: 4.4

/**
 * 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 / KB_IN_BYTES);
        /* translators: Gigabytes */
        $space .= __('GB');
    } else {
        $space = number_format($space_allowed);
        /* translators: Megabytes */
        $space .= __('MB');
    }
    ?>
	<strong><?php 
    printf(__('Used: %1$s%% of %2$s'), number_format($percent_used), $space);
    ?></strong>
	<?php 
}

WordPress Version: 3.7

/**
 * 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');
    }
    ?>
	<strong><?php 
    printf(__('Used: %1$s%% of %2$s'), number_format($percent_used), $space);
    ?></strong>
	<?php 
}