From 7c2151c84c9bd64bdfbde7948d99ba280b78a6c2 Mon Sep 17 00:00:00 2001 From: Matt Boynes Date: Wed, 21 Sep 2016 15:35:45 -0400 Subject: [PATCH] Push script to end of doc.ready to fix preview bug Resolves #5 --- wpcom-thumbnail-editor.php | 107 ++++++++++++++++++++----------------- 1 file changed, 59 insertions(+), 48 deletions(-) diff --git a/wpcom-thumbnail-editor.php b/wpcom-thumbnail-editor.php index 8891db3..f3fbacc 100644 --- a/wpcom-thumbnail-editor.php +++ b/wpcom-thumbnail-editor.php @@ -320,53 +320,64 @@ public function edit_thumbnail_screen() { @@ -732,12 +743,12 @@ public function delete_coordinates( $attachment_id, $size ) { * @return mixed Array of thumbnail details (URL, width, height, is_intermedite) or the previous data. */ public function get_thumbnail_url( $existing_resize, $attachment_id, $size ) { - + //On dev sites, Jetpack is often active but Photon will not work because the content files are not accessible to the public internet. //Right now, a broken image is displayed when this plugin is active and a thumbnail has been edited. This will allow the unmodified image to be displayed. if( !function_exists( 'jetpack_photon_url' ) || defined('JETPACK_DEV_DEBUG') ) return $existing_resize; - + // Named sizes only if ( is_array( $size ) ) { return $existing_resize;