WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/28/2011 04:25:36 PM (7 years ago)
Author:
westi
Message:

Introduce WP_MAX_MEMORY_LIMIT constant for the high memory limit we set when image processing and unzipping.
Ensure it is always filterable by plugins as well as configurable in wp-config
Fixes #13847 props hakre

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/image-edit.php

    r17603 r17749  
    392392function stream_preview_image($post_id) {
    393393    $post = get_post($post_id);
    394     @ini_set('memory_limit', '256M');
     394    @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
    395395    $img = load_image_to_edit( $post_id, $post->post_mime_type, array(400, 400) );
    396396
     
    497497    $success = $delete = $scaled = $nocrop = false;
    498498    $post = get_post($post_id);
    499     @ini_set('memory_limit', '256M');
     499    @ini_set( 'memory_limit', apply_filters( 'admin_memory_limit', WP_MAX_MEMORY_LIMIT ) );
    500500    $img = load_image_to_edit($post_id, $post->post_mime_type);
    501501
Note: See TracChangeset for help on using the changeset viewer.