### Eclipse Workspace Patch 1.0
#P wordpress
|
|
|
|
| 821 | 821 | $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) ); |
| 822 | 822 | $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) ); |
| 823 | 823 | $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes ); |
| | 824 | |
| | 825 | if ( function_exists( 'memory_get_usage' ) ) { |
| | 826 | $current = ini_get( 'memory_limit' ); |
| | 827 | ini_restore( 'memory_limit' ); |
| | 828 | $memory_limit = ini_set( 'memory_limit', $current ); |
| | 829 | $m_bytes = wp_convert_hr_to_bytes( $memory_limit ); |
| | 830 | $bytes = ( -1 === $m_bytes ) ? $bytes : min( $bytes, $m_bytes ); |
| | 831 | } |
| | 832 | |
| 824 | 833 | return $bytes; |
| 825 | 834 | } |
| 826 | 835 | |