WordPress.org

Plugin Directory

Changeset 632030


Ignore:
Timestamp:
11/29/12 23:05:18 (17 months ago)
Author:
ethitter
Message:

Jetpack Photon update

First pass at detecting a custom-cropped image on an external WP site.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • jetpack/trunk/modules/photon.php

    r632022 r632030  
    202202                        $transform = 'fit'; 
    203203                } 
     204 
     205                // Detect if image source is for a custom-cropped thumbnail and prevent further URL manipulation. 
     206                if ( ! $fullsize_url && preg_match_all( '#-e[a-z0-9]+(-\d+x\d+)?\.(' . implode('|', $this->extensions ) . '){1}$#i', basename( $src ), $filename ) ) 
     207                    $fullsize_url = true; 
    204208 
    205209                // Build URL, first removing WP's resized string so we pass the original image to Photon 
Note: See TracChangeset for help on using the changeset viewer.