diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-08-23 20:02:23 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-08-23 20:02:50 -0400 |
commit | ad3f35663e4e2b80a92166b590d3e2052b5aab91 (patch) | |
tree | 94f987efbdb50e1426956c1c04ac459a19c77e53 /plugins/jetpack/_inc | |
parent | bin/update-wordpress: also update twentyfourteen twentyfifteen twentysixteen (diff) | |
download | blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.tar.gz blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.tar.bz2 blogs-gentoo-ad3f35663e4e2b80a92166b590d3e2052b5aab91.zip |
Update plugin jetpack to 4.2.2
Diffstat (limited to 'plugins/jetpack/_inc')
-rw-r--r-- | plugins/jetpack/_inc/jquery.jetpack-sync.js | 68 | ||||
-rw-r--r-- | plugins/jetpack/_inc/lib/tonesque.php | 22 |
2 files changed, 1 insertions, 89 deletions
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 ) ); } /** |