Advertisements

display_space_usage

Definition:
function display_space_usage() {}

Source code

function display_space_usage() {

	$space = get_space_allowed();

	$used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;



	$percentused = ( $used / $space ) * 100;



	if ( $space > 1000 ) {

		$space = number_format( $space / 1024 );

		/* translators: Gigabytes */

		$space .= __( 'GB' );

	} else {

		/* translators: Megabytes */

		$space .= __( 'MB' );

	}

	?>

	<strong><?php printf( __( 'Used: %1s%% of %2s' ), number_format( $percentused ), $space ); ?></strong>

	<?php

}

928

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: