MetaSlider - Version 3.8.1

Version Description

  • 2018/Jun/07 =

  • FIX: Limits responsive image srcset to slideshows with cropping disabled only

  • FIX: Increases responsive image srcset maximum size to Full

Download this release

Release Info

Developer DavidAnderson
Plugin Icon 128x128 MetaSlider
Version 3.8.1
Comparing to
See all releases

Code changes from version 3.8.0 to 3.8.1

Files changed (3) hide show
  1. inc/slide/metaslide.class.php +13 -21
  2. ml-slider.php +2 -2
  3. readme.txt +8 -3
inc/slide/metaslide.class.php CHANGED
@@ -197,29 +197,21 @@ class MetaSlide {
197
public function build_image_tag($attributes) {
198
$attachment_id = $this->get_attachment_id();
199
200
- // For External Slides: we don't have width or height
201
- // as well as post feed slides
202
- if (empty($attributes['width']) || empty($attributes['height']) || !$attachment_id) {
203
- $html = "<img";
204
- foreach ( $attributes as $att => $val ) {
205
- if ( strlen( $val ) ) {
206
- $html .= " " . $att . '="' . esc_attr( $val ) . '"';
207
- } else if ( $att == 'alt' ) {
208
- $html .= " " . $att . '=""'; // always include alt tag for HTML5 validation
209
- }
210
- }
211
- $html .= " />";
212
- return $html;
213
- }
214
-
215
- // remove extra src attribute
216
- if (isset($attributes['src'])) unset($attributes['src']);
217
-
218
if ('disabled' == $this->settings['smartCrop'] || 'disabled_pad' == $this->settings['smartCrop']) {
219
- return wp_get_attachment_image($attachment_id, apply_filters('metaslider_default_size', 'large', $this->slider), false, $attributes);
220
}
221
-
222
- return wp_get_attachment_image($attachment_id, array(absint($attributes['width']), absint($attributes['height'])), false, $attributes);
223
}
224
225
197
public function build_image_tag($attributes) {
198
$attachment_id = $this->get_attachment_id();
199
200
if ('disabled' == $this->settings['smartCrop'] || 'disabled_pad' == $this->settings['smartCrop']) {
201
+ // remove extra src attribute
202
+ if (isset($attributes['src'])) unset($attributes['src']);
203
+ return wp_get_attachment_image($attachment_id, apply_filters('metaslider_default_size', 'full', $this->slider), false, $attributes);
204
}
205
+ $html = "<img";
206
+ foreach ( $attributes as $att => $val ) {
207
+ if ( strlen( $val ) ) {
208
+ $html .= " " . $att . '="' . esc_attr( $val ) . '"';
209
+ } else if ( $att == 'alt' ) {
210
+ $html .= " " . $att . '=""'; // always include alt tag for HTML5 validation
211
+ }
212
+ }
213
+ $html .= " />";
214
+ return $html;
215
}
216
217
ml-slider.php CHANGED
@@ -6,7 +6,7 @@
6
* Plugin Name: MetaSlider
7
* Plugin URI: https://www.metaslider.com
8
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
9
- * Version: 3.8.0
10
* Author: Team Updraft
11
* Author URI: https://www.metaslider.com
12
* License: GPL-2.0+
@@ -32,7 +32,7 @@ class MetaSliderPlugin {
32
*
33
* @var string
34
*/
35
- public $version = '3.8.0';
36
37
/**
38
* Specific SLider
6
* Plugin Name: MetaSlider
7
* Plugin URI: https://www.metaslider.com
8
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
9
+ * Version: 3.8.1
10
* Author: Team Updraft
11
* Author URI: https://www.metaslider.com
12
* License: GPL-2.0+
32
*
33
* @var string
34
*/
35
+ public $version = '3.8.1';
36
37
/**
38
* Specific SLider
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82
3
Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
4
Donate link: https://david.dw-perspective.org.uk/donate
5
Requires at least: 3.5
6
- Stable tag: 3.8.0
7
Tested up to: 5.0
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -151,7 +151,12 @@ See https://www.metaslider.com/documentation/image-cropping/
151
152
== Changelog ==
153
154
- = 3.8.0 - 2018/Jun/4 =
155
156
* FEATURE: Adds compatibility with new Pro schedule feature
157
* FEATURE: Adds compatibility with retina plugin https://wordpress.org/plugins/wp-retina-2x/
@@ -657,4 +662,4 @@ More info/Comments: http://www.metaslider.com/coming-soon-meta-slider-2-6-free/
657
* Initial version
658
659
== Upgrade Notice ==
660
- * 3.8.0 : This update includes added support for retina images, responsive images, and addresses a few bugs, including when a slideshow has a large quantity of slides.
3
Tags: wordpress slideshow,seo,slideshow,slider,widget,wordpress slider,image slider,flexslider,flex slider,nivoslider,nivo slider,responsive,responsive slides,coinslider,coin slider,slideshow,carousel,responsive slider,vertical slides
4
Donate link: https://david.dw-perspective.org.uk/donate
5
Requires at least: 3.5
6
+ Stable tag: 3.8.1
7
Tested up to: 5.0
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
151
152
== Changelog ==
153
154
+ = 3.8.1 - 2018/Jun/07 =
155
+
156
+ * FIX: Limits responsive image srcset to slideshows with cropping disabled only
157
+ * FIX: Increases responsive image srcset maximum size to Full
158
+
159
+ = 3.8.0 - 2018/Jun/04 =
160
161
* FEATURE: Adds compatibility with new Pro schedule feature
162
* FEATURE: Adds compatibility with retina plugin https://wordpress.org/plugins/wp-retina-2x/
662
* Initial version
663
664
== Upgrade Notice ==
665
+ * 3.8.1 : This update includes added support for retina images, responsive images, and addresses a few bugs (including in 3.8.0), including when a slideshow has a large quantity of slides.