WordPress.org

Plugin Directory

Changeset 627256


Ignore:
Timestamp:
11/19/12 20:00:34 (17 months ago)
Author:
ethitter
Message:

Photon update

When validating an image size to determine if it's registered with WordPress, only check if variable type matches what could be used to register an image size with WordPress.

File:
1 edited

Legend:

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

    r625457 r627256  
    243243 
    244244            // If an image is requested with a size known to WordPress, use that size's settings with Photon 
    245             if ( ! is_array( $size ) && array_key_exists( $size, $this->image_sizes() ) ) { 
     245            if ( ( is_string( $size ) || is_int( $size ) ) && array_key_exists( $size, $this->image_sizes() ) ) { 
    246246                $image_args = $this->image_sizes(); 
    247247                $image_args = $image_args[ $size ]; 
Note: See TracChangeset for help on using the changeset viewer.