wp_convert_hr_to_bytes [ WordPress Function ]
wp_convert_hr_to_bytes ( $size )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Benzer Fonksiyonlar: wp_convert_bytes_to_hr, _convert_urlencoded_to_entities, convert_chars, convert_to_screen, wp_count_terms
{@internal Missing Short Description}}
Source
<?php
function wp_convert_hr_to_bytes( $size ) {
$size = strtolower($size);
$bytes = (int) $size;
if ( strpos($size, 'k') !== false )
$bytes = intval($size) * 1024;
elseif ( strpos($size, 'm') !== false )
$bytes = intval($size) * 1024 * 1024;
elseif ( strpos($size, 'g') !== false )
$bytes = intval($size) * 1024 * 1024 * 1024;
return $bytes;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- #17725 (wp_convert_hr_to_bytes() fails on large numeric values ...
The wp_convert_hr_to_bytes() function exists to convert values in form of a memory setting into it's value in bytes. By doing so, the function modifies the input ...
core.trac.wordpress.org - #19067 (Duplicate functionality in core: size_format() and ...
Also note that there's a wp_convert_hr_to_bytes() function, but it can't actually parse what wp_convert_bytes_to_hr() produces, so I'm fine with deprecating the ...
core.trac.wordpress.org - wp_convert_hr_to_bytes (WordPress Function) - WPSeek.com
WordPress lookup for wp_convert_hr_to_bytes, a WordPress Function. wpseek. com is a WordPress-centric search tool for developers and theme authors.
wpseek.com - wp admin - Upload media file problem - WordPress
Jan 26, 2011 ... function wp_max_upload_size() { $u_bytes = wp_convert_hr_to_bytes( ini_get( ' upload_max_filesize' ) ); $p_bytes = wp_convert_hr_to_bytes( ...
wordpress.stackexchange.com