Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Photon: do not apply Photon on BuddyPress avatar change pages #57

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions class.photon.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ public static function filter_the_content( $content ) {
* @return string|bool
*/
public function filter_image_downsize( $image, $attachment_id, $size ) {
// Don't foul up the admin side of things, and provide plugins a way of preventing Photon from being applied to images.
if ( is_admin() || apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) ) )
// Don't foul up the admin side of things, don't break BuddyPress' avatar cropping process, and provide plugins a way of preventing Photon from being applied to images.
if ( is_admin() || bp_is_user_change_avatar() || bp_is_group_admin_page( 'group-avatar' ) || apply_filters( 'jetpack_photon_override_image_downsize', false, compact( 'image', 'attachment_id', 'size' ) ) )
return $image;

// Get the image URL and proceed with Photon-ification if successful
Expand Down