Ticket #13575: 13575.2.patch
| File 13575.2.patch, 871 bytes (added by , 15 years ago) |
|---|
-
wp-admin/includes/template.php
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 $m_bytes = apply_filters( 'upload_size_memory_limit', $m_bytes, $bytes ); 831 $bytes = ( $m_bytes < 0 ) ? $bytes : min( $bytes, $m_bytes ); 832 } 833 824 834 return $bytes; 825 835 } 826 836