Display system report in SP submenu

This commit is contained in:
Brian Miyaji
2014-04-11 12:36:41 +10:00
parent 5c000a10eb
commit 3dad8ba1aa
8 changed files with 800 additions and 0 deletions

View File

@@ -63,6 +63,33 @@ function sp_array_overlay( $a1, $a2 ) {
return $a1;
}
/**
* let_to_num function.
*
* This function transforms the php.ini notation for numbers (like '2M') to an integer.
*
* @access public
* @param $size
* @return int
*/
function sp_let_to_num( $size ) {
$l = substr( $size, -1 );
$ret = substr( $size, 0, -1 );
switch( strtoupper( $l ) ) {
case 'P':
$ret *= 1024;
case 'T':
$ret *= 1024;
case 'G':
$ret *= 1024;
case 'M':
$ret *= 1024;
case 'K':
$ret *= 1024;
}
return $ret;
}
/**
* SportsPress Date Format - Allows to change date format for everything SportsPress
*