Make WordPress Core


Ignore:
File:
1 edited

Legend:

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

    r16377 r17749  
    205205            $filepath = apply_filters('load_image_to_edit_filesystempath', path_join( dirname($filepath), $data['file'] ), $post_id, $size);
    206206        }
    207     } elseif ( WP_Http_Fopen::test() ) {
     207    } elseif ( function_exists('fopen') && function_exists('ini_get') && true == ini_get('allow_url_fopen') ) {
    208208        $filepath = apply_filters('load_image_to_edit_attachmenturl', wp_get_attachment_url($post_id) , $post_id, $size);
    209209    }
     
    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
     
    552552    // generate new filename
    553553    $path = get_attached_file($post_id);
    554     $path_parts = pathinfo52( $path );
     554    $path_parts = pathinfo( $path );
    555555    $filename = $path_parts['filename'];
    556556    $suffix = time() . rand(100, 999);
Note: See TracChangeset for help on using the changeset viewer.