WordPress.org

Make WordPress Core

Ticket #13575: 13575.patch

File 13575.patch, 734 bytes (added by hakre, 8 years ago)
  • wp-admin/includes/template.php

    ### Eclipse Workspace Patch 1.0
    #P wordpress-trunk
     
    27272727        $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
    27282728        $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
    27292729        $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes );
     2730
     2731        $m_bytes = wp_convert_hr_to_bytes( ini_get( 'memory_limit' ) );
     2732        $m_bytes = apply_filters( 'memory_limit', $m_bytes);
     2733        if ($m_bytes <> -1) {
     2734                $bytes = min($bytes, $m_bytes);
     2735        }
     2736
    27302737        return $bytes;
    27312738}
    27322739