Plugin Directory

Changeset 803836


Ignore:
Timestamp:
11/13/2013 02:32:33 PM (12 years ago)
Author:
migueluy
Message:

Jetpack: Photon: Apply Photon when doing an AJAX request in the admin.
Fixes #1885. props @jeherve.

File:
1 edited

Legend:

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

    r795609 r803836  
    335335    public function filter_image_downsize( $image, $attachment_id, $size ) {
    336336        // Don't foul up the admin side of things, and provide plugins a way of preventing Photon from being applied to images.
    337         if ( is_admin() || apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) ) )
     337        if ( ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) || apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) ) )
    338338            return $image;
    339339
Note: See TracChangeset for help on using the changeset viewer.