This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Easy IO GIF Skipper | |
Version: 1.0.0 | |
*/ | |
add_filter( 'exactdn_pre_args', 'easyio_skip_gif_resizing', 10, 2 ); | |
function easyio_skip_gif_resizing( $args, $image_url ) { | |
if ( strpos( $image_url, '.gif' ) ) { | |
return array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Returns an array that contains the indexes from a search that match the array values with the given regular expression | |
* @param str Regular expresion | |
* return Array of indexes (integers), -1 if no value matches the regexp | |
*/ | |
Array.prototype.allIndexOfStr = function (str) { | |
var pos = []; | |
for (var j=0; j<this.length; j++) { | |
if (this[j].match(str)) | |
pos.push(j); |