Skip to content

Commit

Permalink
Jetpack: Photon: Prevent avatars from loading from Photon on avatar c…
Browse files Browse the repository at this point in the history
…hange

Currently when changing an avatar the photo is sent to Photon before the image cropping
step. This causes cropping to fail. This commit disables Photon before cropping the image.
See #57
  • Loading branch information
blobaugh committed Jan 23, 2014
1 parent 14aeb9b commit e2800d0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 3rd-party/3rd-party.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

/*
* Placeholder to load 3rd party plugin tweaks until a legit system
* is architected
*/

require_once( 'buddypress.php' );
9 changes: 9 additions & 0 deletions 3rd-party/buddypress.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

add_filter( 'bp_core_pre_avatar_handle_upload', 'blobphoto' );
function blobphoto( $bool ) {

add_filter( 'jetpack_photon_skip_image', '__return_true' );

return $bool;
}
2 changes: 2 additions & 0 deletions jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,5 @@
Jetpack_Sync::sync_options( __FILE__, 'db_version', 'jetpack_active_modules', 'active_plugins' );
}
*/

require_once( JETPACK__PLUGIN_DIR . '3rd-party/3rd-party.php' );

0 comments on commit e2800d0

Please sign in to comment.