Version Description
Download this release
Release Info
| Developer | metaslider |
| Plugin | |
| Version | 3.27.12 |
| Comparing to | |
| See all releases | |
Code changes from version 3.27.11 to 3.27.12
- admin/routes/api.php +13 -12
- admin/views/slides/tabs/general.php +8 -5
- inc/slide/metaslide.class.php +7 -10
- inc/slide/metaslide.image.class.php +5 -6
- ml-slider.php +2 -2
- readme.txt +7 -1
admin/routes/api.php
CHANGED
|
@@ -557,18 +557,19 @@ class MetaSlider_Api
|
|
| 557 |
|
| 558 |
private function sanitize_files_array($fields)
|
| 559 |
{
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
|
|
|
| 572 |
}
|
| 573 |
|
| 574 |
/**
|
| 557 |
|
| 558 |
private function sanitize_files_array($fields)
|
| 559 |
{
|
| 560 |
+
$fields['caption_source'] = sanitize_text_field($fields['caption_source']);
|
| 561 |
+
$fields['post_excerpt'] = wp_filter_post_kses($fields['post_excerpt']);
|
| 562 |
+
$fields['url'] = sanitize_url($fields['url']);
|
| 563 |
+
$fields['inherit_image_title'] = sanitize_text_field($fields['inherit_image_title']);
|
| 564 |
+
$fields['title'] = sanitize_text_field($fields['title']);
|
| 565 |
+
$fields['inherit_image_alt'] = sanitize_text_field($fields['inherit_image_alt']);
|
| 566 |
+
$fields['alt'] = sanitize_text_field($fields['alt']);
|
| 567 |
+
$fields['crop_position'] = sanitize_text_field($fields['crop_position']);
|
| 568 |
+
$fields['type'] = sanitize_text_field($fields['type']);
|
| 569 |
+
$fields['menu_order'] = sanitize_text_field($fields['menu_order']);
|
| 570 |
+
$fields['new_window'] = sanitize_text_field($fields['new_window']);
|
| 571 |
+
|
| 572 |
+
return $fields;
|
| 573 |
}
|
| 574 |
|
| 575 |
/**
|
admin/views/slides/tabs/general.php
CHANGED
|
@@ -3,9 +3,9 @@ die('No direct access.');
|
|
| 3 |
} ?>
|
| 4 |
|
| 5 |
<?php // Handle captions
|
| 6 |
-
$slide_caption =
|
| 7 |
-
$image_caption =
|
| 8 |
-
$image_description =
|
| 9 |
|
| 10 |
// Deprecate inherit_image_caption by deleting it and setting the source as the image
|
| 11 |
if (filter_var(get_post_meta($this->slide->ID, 'ml-slider_inherit_image_caption', true), FILTER_VALIDATE_BOOLEAN)) {
|
|
@@ -23,13 +23,16 @@ if (filter_var(get_post_meta($this->slide->ID, 'ml-slider_inherit_image_caption'
|
|
| 23 |
|
| 24 |
<?php // Handle URL and target
|
| 25 |
$url = esc_attr(get_post_meta($slide_id, 'ml-slider_url', true));
|
| 26 |
-
$
|
|
|
|
|
|
|
|
|
|
| 27 |
?>
|
| 28 |
<div class="row has-right-checkbox">
|
| 29 |
<input class="url" data-lpignore="true" type="text" name="attachment[<?php echo esc_attr($slide_id); ?>][url]" placeholder="<?php esc_attr_e("URL", "ml-slider"); ?>" value="<?php echo esc_url($url); ?>" />
|
| 30 |
<div class="input-label right new_window">
|
| 31 |
<label>
|
| 32 |
-
<?php esc_html_e("Open in a new window", "ml-slider"); ?> <input autocomplete="off" tabindex="0" type="checkbox" name="attachment[<?php echo esc_attr($slide_id); ?>][new_window]" <?php echo $
|
| 33 |
</label>
|
| 34 |
</div>
|
| 35 |
</div>
|
| 3 |
} ?>
|
| 4 |
|
| 5 |
<?php // Handle captions
|
| 6 |
+
$slide_caption = esc_textarea($this->slide->post_excerpt);
|
| 7 |
+
$image_caption = esc_textarea($attachment->post_excerpt);
|
| 8 |
+
$image_description = esc_textarea($attachment->post_content);
|
| 9 |
|
| 10 |
// Deprecate inherit_image_caption by deleting it and setting the source as the image
|
| 11 |
if (filter_var(get_post_meta($this->slide->ID, 'ml-slider_inherit_image_caption', true), FILTER_VALIDATE_BOOLEAN)) {
|
| 23 |
|
| 24 |
<?php // Handle URL and target
|
| 25 |
$url = esc_attr(get_post_meta($slide_id, 'ml-slider_url', true));
|
| 26 |
+
$new_window = get_post_meta($slide_id, 'ml-slider_new_window', true);
|
| 27 |
+
$new_window = $new_window === true || $new_window == 1 || $new_window == 'on' || $new_window == 'yes';
|
| 28 |
+
|
| 29 |
+
$checked = $new_window ? 'checked=checked' : '';
|
| 30 |
?>
|
| 31 |
<div class="row has-right-checkbox">
|
| 32 |
<input class="url" data-lpignore="true" type="text" name="attachment[<?php echo esc_attr($slide_id); ?>][url]" placeholder="<?php esc_attr_e("URL", "ml-slider"); ?>" value="<?php echo esc_url($url); ?>" />
|
| 33 |
<div class="input-label right new_window">
|
| 34 |
<label>
|
| 35 |
+
<?php esc_html_e("Open in a new window", "ml-slider"); ?> <input autocomplete="off" tabindex="0" type="checkbox" name="attachment[<?php echo esc_attr($slide_id); ?>][new_window]" <?php echo $checked; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> />
|
| 36 |
</label>
|
| 37 |
</div>
|
| 38 |
</div>
|
inc/slide/metaslide.class.php
CHANGED
|
@@ -494,19 +494,16 @@ class MetaSlide
|
|
| 494 |
*/
|
| 495 |
public function add_or_update_or_delete_meta($post_id, $name, $value)
|
| 496 |
{
|
| 497 |
-
|
| 498 |
$key = "ml-slider_" . $name;
|
| 499 |
|
| 500 |
-
if ($value
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
|
|
|
|
|
|
| 504 |
} else {
|
| 505 |
-
|
| 506 |
-
update_post_meta($post_id, $key, $value);
|
| 507 |
-
} else {
|
| 508 |
-
add_post_meta($post_id, $key, $value, true);
|
| 509 |
-
}
|
| 510 |
}
|
| 511 |
}
|
| 512 |
|
| 494 |
*/
|
| 495 |
public function add_or_update_or_delete_meta($post_id, $name, $value)
|
| 496 |
{
|
|
|
|
| 497 |
$key = "ml-slider_" . $name;
|
| 498 |
|
| 499 |
+
if (is_string($value)) {
|
| 500 |
+
$value = trim($value);
|
| 501 |
+
}
|
| 502 |
+
|
| 503 |
+
if (false === $value || $value === 'false' || $value === "off" || $value === '') {
|
| 504 |
+
delete_post_meta($post_id, $key);
|
| 505 |
} else {
|
| 506 |
+
update_post_meta($post_id, $key, $value);
|
|
|
|
|
|
|
|
|
|
|
|
|
| 507 |
}
|
| 508 |
}
|
| 509 |
|
inc/slide/metaslide.image.class.php
CHANGED
|
@@ -817,10 +817,8 @@ class MetaImageSlide extends MetaSlide
|
|
| 817 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'title', $fields['title']);
|
| 818 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'crop_position', $fields['crop_position']);
|
| 819 |
|
| 820 |
-
// Store the caption source
|
| 821 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'caption_source', $fields['caption_source']);
|
| 822 |
|
| 823 |
-
// Store the inherit custom title and alt settings
|
| 824 |
$this->set_field_inherited('title', isset($fields['inherit_image_title']) && $fields['inherit_image_title'] === 'on');
|
| 825 |
$this->set_field_inherited('alt', isset($fields['inherit_image_alt']) && $fields['inherit_image_alt'] === 'on');
|
| 826 |
|
|
@@ -828,10 +826,11 @@ class MetaImageSlide extends MetaSlide
|
|
| 828 |
update_post_meta($this->slide->ID, '_wp_attachment_image_alt', $fields['alt']);
|
| 829 |
}
|
| 830 |
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
|
|
|
| 835 |
}
|
| 836 |
|
| 837 |
/**
|
| 817 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'title', $fields['title']);
|
| 818 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'crop_position', $fields['crop_position']);
|
| 819 |
|
|
|
|
| 820 |
$this->add_or_update_or_delete_meta($this->slide->ID, 'caption_source', $fields['caption_source']);
|
| 821 |
|
|
|
|
| 822 |
$this->set_field_inherited('title', isset($fields['inherit_image_title']) && $fields['inherit_image_title'] === 'on');
|
| 823 |
$this->set_field_inherited('alt', isset($fields['inherit_image_alt']) && $fields['inherit_image_alt'] === 'on');
|
| 824 |
|
| 826 |
update_post_meta($this->slide->ID, '_wp_attachment_image_alt', $fields['alt']);
|
| 827 |
}
|
| 828 |
|
| 829 |
+
$this->add_or_update_or_delete_meta(
|
| 830 |
+
$this->slide->ID,
|
| 831 |
+
'new_window',
|
| 832 |
+
isset($fields['new_window']) && $fields['new_window'] === 'on'
|
| 833 |
+
);
|
| 834 |
}
|
| 835 |
|
| 836 |
/**
|
ml-slider.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Plugin Name: MetaSlider
|
| 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.27.
|
| 9 |
* Author: MetaSlider
|
| 10 |
* Author URI: https://www.metaslider.com
|
| 11 |
* License: GPL-2.0+
|
|
@@ -47,7 +47,7 @@ if (!class_exists('MetaSliderPlugin')) {
|
|
| 47 |
*
|
| 48 |
* @var string
|
| 49 |
*/
|
| 50 |
-
public $version = '3.27.
|
| 51 |
|
| 52 |
/**
|
| 53 |
* Pro installed version number
|
| 5 |
* Plugin Name: MetaSlider
|
| 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.27.12
|
| 9 |
* Author: MetaSlider
|
| 10 |
* Author URI: https://www.metaslider.com
|
| 11 |
* License: GPL-2.0+
|
| 47 |
*
|
| 48 |
* @var string
|
| 49 |
*/
|
| 50 |
+
public $version = '3.27.12';
|
| 51 |
|
| 52 |
/**
|
| 53 |
* Pro installed version number
|
readme.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82, andergmartins, htmgarcia
|
| 3 |
Tags: slideshow, slider, image slider, carousel, gallery, flexslider, wordpress slider, nivoslider, rotating banner, responsive slideshow, seo slideshow, unsplash
|
| 4 |
Requires at least: 3.5
|
| 5 |
-
Stable tag: 3.27.
|
| 6 |
Requires PHP: 5.4
|
| 7 |
Tested up to: 6.0
|
| 8 |
License: GPLv2 or later
|
|
@@ -324,6 +324,12 @@ See https://www.metaslider.com/documentation/image-cropping/
|
|
| 324 |
The format is based on [Keep a Changelog recommendations](http://keepachangelog.com/)
|
| 325 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 327 |
= [3.27.11] - 07 Sep, 2022 =
|
| 328 |
|
| 329 |
* FIXED: Fix the Caption field when editing a slideshow, #234;
|
| 2 |
Contributors: matchalabs, DavidAnderson, dnutbourne, kbat82, andergmartins, htmgarcia
|
| 3 |
Tags: slideshow, slider, image slider, carousel, gallery, flexslider, wordpress slider, nivoslider, rotating banner, responsive slideshow, seo slideshow, unsplash
|
| 4 |
Requires at least: 3.5
|
| 5 |
+
Stable tag: 3.27.12
|
| 6 |
Requires PHP: 5.4
|
| 7 |
Tested up to: 6.0
|
| 8 |
License: GPLv2 or later
|
| 324 |
The format is based on [Keep a Changelog recommendations](http://keepachangelog.com/)
|
| 325 |
and this project adheres to [Semantic Versioning](http://semver.org/).
|
| 326 |
|
| 327 |
+
= [3.27.12] - 08 Sep, 2022 =
|
| 328 |
+
|
| 329 |
+
* FIXED: Fix the option "Open in a new window" on the slide editor page, #238;
|
| 330 |
+
* FIXED: Fix the "Caption" field accepting HTML code, #242;
|
| 331 |
+
* FIXED: Fix slide saving that was stripping settings when Pro was activated, #239, #240;
|
| 332 |
+
|
| 333 |
= [3.27.11] - 07 Sep, 2022 =
|
| 334 |
|
| 335 |
* FIXED: Fix the Caption field when editing a slideshow, #234;
|
