Skip to content

Commit

Permalink
0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mwieser committed Nov 26, 2018
1 parent 6436a29 commit 7638946
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ There is an optional third argument, you can use to specify the format. The avai

## Changelog

### 0.7.0

* Added a fallback for images without `wp-image-*` classes. The plugin can now determine the attachment ID from the image URL, using `attachment_url_to_postid`. This should add support for plugins like WooCommerce, who don't output their images with `wp-image-*` classes. Thanks, [@ecksite](https://github.com/Lorti/dominant-colors-lazy-loading-wordpress-plugin/pull/21)!

### 0.6.3
* The first user interaction triggers a viewport check, that means the first `keydown`, `mousedown`, `mousemove` or `touchstart` event. Each `scroll` and `resize` events still triggers a viewport check.

Expand Down
8 changes: 6 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: manuelwieser
Donate link: https://manu.ninja/
Tags: images, dominant colors, lazy loading, pinterest, javascript, optimization, performance, bandwidth
Requires at least: 4.4
Tested up to: 4.9
Stable tag: 0.6.3
Tested up to: 4.9.8
Stable tag: 0.7.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -68,6 +68,10 @@ There is an optional third argument, you can use to specify the format. The avai

## Changelog

### 0.7.0

* Added a fallback for images without `wp-image-*` classes. The plugin can now determine the attachment ID from the image URL, using `attachment_url_to_postid`. This should add support for plugins like WooCommerce, who don't output their images with `wp-image-*` classes. Thanks, [@ecksite](https://github.com/Lorti/dominant-colors-lazy-loading-wordpress-plugin/pull/21)!

### 0.6.3
* The first user interaction triggers a viewport check, that means the first `keydown`, `mousedown`, `mousemove` or `touchstart` event. Each `scroll` and `resize` events still triggers a viewport check.

Expand Down
2 changes: 1 addition & 1 deletion dominant-colors-lazy-loading.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Plugin Name: Dominant Colors Lazy Loading
* Plugin URI: https://manu.ninja/dominant-colors-for-lazy-loading-images
* Description: This plugin allows you to lazy load your images while showing the dominant color of each image as a placeholder – like Pinterest or Google Images.
* Version: 0.6.3
* Version: 0.7.0
* Author: Manuel Wieser
* Author URI: https://manu.ninja/
* License: GPL-2.0+
Expand Down
2 changes: 1 addition & 1 deletion includes/class-dominant-colors-lazy-loading.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class Dominant_Colors_Lazy_Loading {
public function __construct() {

$this->plugin_name = 'dominant-colors-lazy-loading';
$this->version = '0.6.3';
$this->version = '0.7.0';

$this->load_dependencies();
$this->set_locale();
Expand Down
2 changes: 1 addition & 1 deletion public/class-dominant-colors-lazy-loading-public.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function filter( $content ) {
} else {
$image_parts = array();

//delete size from src-string (i.e. delete "-300x300")
// Delete size from URL (`-300x300`)
preg_match( '/(.*)-(?!.*\1)([0-9]+x[0-9]+)(\..*)($|\n)/', $image_src[1], $image_parts );
$clean_src = $image_src[1];
if ( isset( $image_parts[1] ) && isset( $image_parts[3] ) ) {
Expand Down

0 comments on commit 7638946

Please sign in to comment.