Version Description
[01/03/17] =
- Fix: New slides will now be added as a new post type (ml-slide). For newly added slides, this will fix: -- Adding the same image to a slideshow multiple times -- Using unique captions for the same image across multiple slideshows -- Using unique ordering for the same image across multiple slideshows Existing slides/slideshows will be unaffected.
- Workaround/Fix: Don't use WP_Image_Editor to load slide images that are missing metadata (invalid images)
- Fix: Load admin JavaScript in footer
Download this release
Release Info
| Developer | matchalabs |
| Plugin | |
| Version | 3.4.3 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.2 to 3.4.3
- inc/slide/metaslide.class.php +8 -4
- inc/slide/metaslide.image.class.php +6 -15
- ml-slider.php +7 -7
- readme.txt +8 -1
inc/slide/metaslide.class.php
CHANGED
|
@@ -230,7 +230,7 @@ class MetaSlide {
|
|
| 230 |
* @param int $slider_id - the parent slideshow ID
|
| 231 |
* @return int $id - the ID of the newly created slide
|
| 232 |
*/
|
| 233 |
-
|
| 234 |
|
| 235 |
$id = wp_insert_post( array(
|
| 236 |
'post_title' => __( "Slider {$slider_id} - {$type}", "ml-slider" ),
|
|
@@ -247,7 +247,7 @@ class MetaSlide {
|
|
| 247 |
|
| 248 |
return $id;
|
| 249 |
|
| 250 |
-
}
|
| 251 |
|
| 252 |
/**
|
| 253 |
* Tag the slide attachment to the slider tax category
|
|
@@ -455,9 +455,13 @@ class MetaSlide {
|
|
| 455 |
*/
|
| 456 |
public function get_thumb() {
|
| 457 |
|
| 458 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
|
| 460 |
-
if (isset($image[0])) {
|
| 461 |
return $image[0];
|
| 462 |
}
|
| 463 |
|
| 230 |
* @param int $slider_id - the parent slideshow ID
|
| 231 |
* @return int $id - the ID of the newly created slide
|
| 232 |
*/
|
| 233 |
+
public function insert_slide($attachment_id, $type, $slider_id) {
|
| 234 |
|
| 235 |
$id = wp_insert_post( array(
|
| 236 |
'post_title' => __( "Slider {$slider_id} - {$type}", "ml-slider" ),
|
| 247 |
|
| 248 |
return $id;
|
| 249 |
|
| 250 |
+
}
|
| 251 |
|
| 252 |
/**
|
| 253 |
* Tag the slide attachment to the slider tax category
|
| 455 |
*/
|
| 456 |
public function get_thumb() {
|
| 457 |
|
| 458 |
+
if ( get_post_type( $this->slide->ID ) == 'attachment' ) {
|
| 459 |
+
$image = wp_get_attachment_image_src( $this->slide->ID, 'thumbnail');
|
| 460 |
+
} else {
|
| 461 |
+
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $this->slide->ID ) , 'thumbnail');
|
| 462 |
+
}
|
| 463 |
|
| 464 |
+
if ( isset( $image[0] ) ) {
|
| 465 |
return $image[0];
|
| 466 |
}
|
| 467 |
|
inc/slide/metaslide.image.class.php
CHANGED
|
@@ -39,28 +39,19 @@ class MetaImageSlide extends MetaSlide {
|
|
| 39 |
|
| 40 |
if ( is_array( $selection ) && count( $selection ) && $slider_id > 0 ) {
|
| 41 |
|
| 42 |
-
foreach ( $selection as $
|
| 43 |
|
| 44 |
-
|
| 45 |
-
$this->set_slider( $slider_id );
|
| 46 |
-
|
| 47 |
-
if ( $this->slide_exists_in_slideshow( $slider_id, $slide_id ) ) {
|
| 48 |
-
|
| 49 |
-
echo "<tr><td colspan='2'>ID: {$slide_id} \"" . get_the_title( $slide_id ) . "\" - " . __( "Failed to add slide. Slide already exists in slideshow.", 'ml-slider' ) . "</td></tr>";
|
| 50 |
-
|
| 51 |
-
} else if ( ! $this->slide_is_unassigned_or_image_slide( $slider_id, $slide_id ) ) {
|
| 52 |
-
|
| 53 |
-
echo "<tr><td colspan='2'>ID: {$slide_id} \"" . get_the_title( $slide_id ) . "\" - " . __( "Failed to add slide. Slide is not of type 'image'.", 'ml-slider' ) . "</td></tr>";
|
| 54 |
-
|
| 55 |
-
} else if ( ! wp_attachment_is_image( $slide_id ) ) {
|
| 56 |
|
| 57 |
echo "<tr><td colspan='2'>ID: {$slide_id} \"" . get_the_title( $slide_id ) . "\" - " . __( "Failed to add slide. Slide is not an image.", 'ml-slider' ) . "</td></tr>";
|
| 58 |
|
| 59 |
} else {
|
| 60 |
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
$this->tag_slide_to_slider();
|
| 63 |
-
$this->add_or_update_or_delete_meta( $slide_id, 'type', 'image' );
|
| 64 |
|
| 65 |
// override the width and height to kick off the AJAX image resizing on save
|
| 66 |
$this->settings['width'] = 0;
|
| 39 |
|
| 40 |
if ( is_array( $selection ) && count( $selection ) && $slider_id > 0 ) {
|
| 41 |
|
| 42 |
+
foreach ( $selection as $attachment_id ) {
|
| 43 |
|
| 44 |
+
if ( ! wp_attachment_is_image( $attachment_id ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
echo "<tr><td colspan='2'>ID: {$slide_id} \"" . get_the_title( $slide_id ) . "\" - " . __( "Failed to add slide. Slide is not an image.", 'ml-slider' ) . "</td></tr>";
|
| 47 |
|
| 48 |
} else {
|
| 49 |
|
| 50 |
+
$new_slide_id = $this->insert_slide( $attachment_id, 'image', $slider_id );
|
| 51 |
+
|
| 52 |
+
$this->set_slide( $new_slide_id );
|
| 53 |
+
$this->set_slider( $slider_id );
|
| 54 |
$this->tag_slide_to_slider();
|
|
|
|
| 55 |
|
| 56 |
// override the width and height to kick off the AJAX image resizing on save
|
| 57 |
$this->settings['width'] = 0;
|
ml-slider.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Plugin Name: Meta Slider
|
| 6 |
* Plugin URI: https://www.metaslider.com
|
| 7 |
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
| 8 |
-
* Version: 3.4.
|
| 9 |
* Author: Matcha Labs
|
| 10 |
* Author URI: https://www.metaslider.com
|
| 11 |
* License: GPL-2.0+
|
|
@@ -31,7 +31,7 @@ class MetaSliderPlugin {
|
|
| 31 |
/**
|
| 32 |
* @var string
|
| 33 |
*/
|
| 34 |
-
public $version = '3.4.
|
| 35 |
|
| 36 |
|
| 37 |
/**
|
|
@@ -496,11 +496,11 @@ class MetaSliderPlugin {
|
|
| 496 |
wp_enqueue_media();
|
| 497 |
|
| 498 |
// plugin dependencies
|
| 499 |
-
wp_enqueue_script( 'jquery-ui-core'
|
| 500 |
-
wp_enqueue_script( 'jquery-ui-sortable'
|
| 501 |
-
wp_enqueue_script( 'metaslider-
|
| 502 |
-
wp_enqueue_script( 'metaslider-
|
| 503 |
-
wp_enqueue_script( 'metaslider-
|
| 504 |
|
| 505 |
wp_dequeue_script( 'link' ); // WP Posts Filter Fix (Advanced Settings not toggling)
|
| 506 |
wp_dequeue_script( 'ai1ec_requirejs' ); // All In One Events Calendar Fix (Advanced Settings not toggling)
|
| 5 |
* Plugin Name: Meta Slider
|
| 6 |
* Plugin URI: https://www.metaslider.com
|
| 7 |
* Description: Easy to use slideshow plugin. Create SEO optimised responsive slideshows with Nivo Slider, Flex Slider, Coin Slider and Responsive Slides.
|
| 8 |
+
* Version: 3.4.3
|
| 9 |
* Author: Matcha Labs
|
| 10 |
* Author URI: https://www.metaslider.com
|
| 11 |
* License: GPL-2.0+
|
| 31 |
/**
|
| 32 |
* @var string
|
| 33 |
*/
|
| 34 |
+
public $version = '3.4.3';
|
| 35 |
|
| 36 |
|
| 37 |
/**
|
| 496 |
wp_enqueue_media();
|
| 497 |
|
| 498 |
// plugin dependencies
|
| 499 |
+
wp_enqueue_script( 'jquery-ui-core' );
|
| 500 |
+
wp_enqueue_script( 'jquery-ui-sortable' );
|
| 501 |
+
wp_enqueue_script( 'metaslider-admin-script', METASLIDER_ASSETS_URL . 'metaslider/admin.js', array( 'jquery' ), METASLIDER_VERSION, true );
|
| 502 |
+
wp_enqueue_script( 'metaslider-colorbox', METASLIDER_ASSETS_URL . 'colorbox/jquery.colorbox-min.js', array( 'jquery' ), METASLIDER_VERSION, true );
|
| 503 |
+
wp_enqueue_script( 'metaslider-tipsy', METASLIDER_ASSETS_URL . 'tipsy/jquery.tipsy.js', array( 'jquery' ), METASLIDER_VERSION, true );
|
| 504 |
|
| 505 |
wp_dequeue_script( 'link' ); // WP Posts Filter Fix (Advanced Settings not toggling)
|
| 506 |
wp_dequeue_script( 'ai1ec_requirejs' ); // All In One Events Calendar Fix (Advanced Settings not toggling)
|
readme.txt
CHANGED
|
@@ -128,13 +128,20 @@ See https://www.metaslider.com/documentation/image-cropping/
|
|
| 128 |
|
| 129 |
== Changelog ==
|
| 130 |
|
| 131 |
-
= 3.4.
|
| 132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
* Workaround/Fix: Don't use WP_Image_Editor to load slide images that are missing metadata (invalid images)
|
|
|
|
| 134 |
|
| 135 |
= 3.4.2 [16/01/17] =
|
| 136 |
|
| 137 |
* Workaround/Fix: Don't use WP_Image_Editor to load admin slide thumbnails, use wp_get_attachment_image_src instead. Attempts to fix white screen issues affecting some users. Related: https://core.trac.wordpress.org/ticket/36534
|
|
|
|
| 138 |
|
| 139 |
= 3.4 [04/01/17] =
|
| 140 |
|
| 128 |
|
| 129 |
== Changelog ==
|
| 130 |
|
| 131 |
+
= 3.4.3 [01/03/17] =
|
| 132 |
|
| 133 |
+
* Fix: New slides will now be added as a new post type (ml-slide). For newly added slides, this will fix:
|
| 134 |
+
-- Adding the same image to a slideshow multiple times
|
| 135 |
+
-- Using unique captions for the same image across multiple slideshows
|
| 136 |
+
-- Using unique ordering for the same image across multiple slideshows
|
| 137 |
+
Existing slides/slideshows will be unaffected.
|
| 138 |
* Workaround/Fix: Don't use WP_Image_Editor to load slide images that are missing metadata (invalid images)
|
| 139 |
+
* Fix: Load admin JavaScript in footer
|
| 140 |
|
| 141 |
= 3.4.2 [16/01/17] =
|
| 142 |
|
| 143 |
* Workaround/Fix: Don't use WP_Image_Editor to load admin slide thumbnails, use wp_get_attachment_image_src instead. Attempts to fix white screen issues affecting some users. Related: https://core.trac.wordpress.org/ticket/36534
|
| 144 |
+
* Fix: Load admin JavaScript in footer
|
| 145 |
|
| 146 |
= 3.4 [04/01/17] =
|
| 147 |
|
