WordPress.org

Make WordPress Core

Changeset 23410


Ignore:
Timestamp:
02/14/2013 04:30:55 AM (9 years ago)
Author:
SergeyBiryukov
Message:

Return from image_downsize() earlier if a custom resize function is used. props anatolbroder. fixes #23392.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r23316 r23410  
    139139        return false;
    140140
     141    // plugins can use this to provide resize services
     142    if ( $out = apply_filters( 'image_downsize', false, $id, $size ) )
     143        return $out;
     144
    141145    $img_url = wp_get_attachment_url($id);
    142146    $meta = wp_get_attachment_metadata($id);
     
    144148    $is_intermediate = false;
    145149    $img_url_basename = wp_basename($img_url);
    146 
    147     // plugins can use this to provide resize services
    148     if ( $out = apply_filters('image_downsize', false, $id, $size) )
    149         return $out;
    150150
    151151    // try for a new style intermediate size
Note: See TracChangeset for help on using the changeset viewer.