From ad3f35663e4e2b80a92166b590d3e2052b5aab91 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Tue, 23 Aug 2016 20:02:23 -0400 Subject: Update plugin jetpack to 4.2.2 --- plugins/jetpack/_inc/jquery.jetpack-sync.js | 68 ----------------------------- plugins/jetpack/_inc/lib/tonesque.php | 22 +--------- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 plugins/jetpack/_inc/jquery.jetpack-sync.js (limited to 'plugins/jetpack/_inc') diff --git a/plugins/jetpack/_inc/jquery.jetpack-sync.js b/plugins/jetpack/_inc/jquery.jetpack-sync.js deleted file mode 100644 index 2bbaa7db..00000000 --- a/plugins/jetpack/_inc/jquery.jetpack-sync.js +++ /dev/null @@ -1,68 +0,0 @@ -/* global ajaxurl */ -jQuery( document ).ready( function($) { - var update = function( cooldown ) { - var self = $( '.jetpack_sync_reindex_control' ), - data; - - self - .find( '.jetpack_sync_reindex_control_action' ) - .attr( 'disabled', true ); - - self - .find( '.jetpack_sync_reindex_control_status' ) - .html( '…' ); - - if ( 'DONE' === self.data( 'status' ) ) { - data = { action:'jetpack-sync-reindex-trigger' }; - } else { - data = { action:'jetpack-sync-reindex-status' }; - } - - $.getJSON( - ajaxurl, - data, - function( response ) { - var self = $( '.jetpack_sync_reindex_control' ), - strings, - status; - - if ( 0 === self.length ) { - return; - } - - strings = self.data( 'strings' ); - status = strings[response.status].status; - - if ( 'INDEXING' === response.status ) { - status += ' (' + Math.floor( 100 * response.posts.imported / response.posts.total ) + '%)'; - } - - self - .data( 'status', response.status ); - - self - .find( '.jetpack_sync_reindex_control_action' ) - .val( strings[response.status].action ); - - self - .find( '.jetpack_sync_reindex_control_status' ) - .text( status ); - - setTimeout( function() { - $( '.jetpack_sync_reindex_control' ) - .find( '.jetpack_sync_reindex_control_action' ) - .attr( 'disabled', false ); - }, cooldown ); - } - ); - }; - - $( '.jetpack_sync_reindex_control' ) - .find( '.jetpack_sync_reindex_control_action' ) - .live( 'click', function( event ) { - event.preventDefault(); - update( 5000 ); - } ); - - update( 1000 ); -} ); diff --git a/plugins/jetpack/_inc/lib/tonesque.php b/plugins/jetpack/_inc/lib/tonesque.php index 8f867a1f..157f65c1 100644 --- a/plugins/jetpack/_inc/lib/tonesque.php +++ b/plugins/jetpack/_inc/lib/tonesque.php @@ -37,27 +37,7 @@ class Tonesque { } public static function imagecreatefromurl( $image_url ) { - // Grab the extension - $file = strtolower( pathinfo( $image_url, PATHINFO_EXTENSION ) ); - $file = explode( '?', $file ); - $file = $file[ 0 ]; - - switch ( $file ) { - case 'gif' : - $image_obj = imagecreatefromgif( $image_url ); - break; - case 'png' : - $image_obj = imagecreatefrompng( $image_url ); - break; - case 'jpg' : - case 'jpeg' : - $image_obj = imagecreatefromjpeg( $image_url ); - break; - default: - return false; - } - - return $image_obj; + return imagecreatefromstring( file_get_contents( $image_url ) ); } /** -- cgit v1.2.3-65-gdbad