Version Description
- Fix: Sorting images in a gallery and not clicking Update would result in loss of gallery configuration
Download this release
Release Info
Developer | n7studios |
Plugin | Photo Gallery by Envira – Responsive Image Gallery for WordPress |
Version | 1.3.0 |
Comparing to | |
See all releases |
Code changes from version 1.2.9 to 1.3.0
- envira-gallery-lite.php +2 -2
- includes/admin/ajax.php +6 -1
- readme.txt +3 -0
envira-gallery-lite.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
* Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
|
6 |
* Author: Thomas Griffin
|
7 |
* Author URI: http://thomasgriffinmedia.com
|
8 |
-
* Version: 1.
|
9 |
* Text Domain: envira-gallery
|
10 |
* Domain Path: languages
|
11 |
*
|
@@ -54,7 +54,7 @@ class Envira_Gallery_Lite {
|
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
-
public $version = '1.
|
58 |
|
59 |
/**
|
60 |
* The name of the plugin.
|
5 |
* Description: Envira Gallery is best responsive WordPress gallery plugin. This is the lite version.
|
6 |
* Author: Thomas Griffin
|
7 |
* Author URI: http://thomasgriffinmedia.com
|
8 |
+
* Version: 1.3.0
|
9 |
* Text Domain: envira-gallery
|
10 |
* Domain Path: languages
|
11 |
*
|
54 |
*
|
55 |
* @var string
|
56 |
*/
|
57 |
+
public $version = '1.3.0';
|
58 |
|
59 |
/**
|
60 |
* The name of the plugin.
|
includes/admin/ajax.php
CHANGED
@@ -222,7 +222,12 @@ function envira_gallery_lite_ajax_sort_images() {
|
|
222 |
$order = explode( ',', $_POST['order'] );
|
223 |
$post_id = absint( $_POST['post_id'] );
|
224 |
$gallery_data = get_post_meta( $post_id, '_eg_gallery_data', true );
|
225 |
-
|
|
|
|
|
|
|
|
|
|
|
226 |
|
227 |
// Loop through the order and generate a new array based on order received.
|
228 |
foreach ( $order as $id ) {
|
222 |
$order = explode( ',', $_POST['order'] );
|
223 |
$post_id = absint( $_POST['post_id'] );
|
224 |
$gallery_data = get_post_meta( $post_id, '_eg_gallery_data', true );
|
225 |
+
|
226 |
+
// Copy the gallery config, removing the images
|
227 |
+
// Stops config from getting lost when sorting + not clicking Publish/Update
|
228 |
+
$new_order = $gallery_data;
|
229 |
+
unset( $new_order['gallery'] );
|
230 |
+
$new_order['gallery'] = array();
|
231 |
|
232 |
// Loop through the order and generate a new array based on order received.
|
233 |
foreach ( $order as $id ) {
|
readme.txt
CHANGED
@@ -57,6 +57,9 @@ Also, I'm an <a href="https://thomasgriffin.io" rel="me" title="WordPress Develo
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
60 |
= 1.2.9 =
|
61 |
* Added: envira_minify_strip_double_forward_slashes filter when minifying, allowing developers to disable this for edge cases
|
62 |
|
57 |
|
58 |
== Changelog ==
|
59 |
|
60 |
+
= 1.3.0 =
|
61 |
+
* Fix: Sorting images in a gallery and not clicking Update would result in loss of gallery configuration
|
62 |
+
|
63 |
= 1.2.9 =
|
64 |
* Added: envira_minify_strip_double_forward_slashes filter when minifying, allowing developers to disable this for edge cases
|
65 |
|