Version Description
Download this release
Release Info
Developer | navzme |
Plugin | ACF Photo Gallery Field |
Version | 1.6.8 |
Comparing to | |
See all releases |
Code changes from version 1.6.7 to 1.6.8
- assets/js/acf-photo-gallery-field.js +4 -2
- navz-photo-gallery.php +2 -2
- readme.txt +4 -1
assets/js/acf-photo-gallery-field.js
CHANGED
@@ -75,7 +75,8 @@
|
|
75 |
//On click of the add images button, check if the image limit has been reached
|
76 |
var pre_selected_list = $('.acf-photo-gallery-group-' + JsonField.key + ' .acf-photo-gallery-metabox-list li.acf-photo-gallery-mediabox');
|
77 |
var images_limit = $('.acf-photo-gallery-group-' + JsonField.key + ' input[name=\'acf-photo-gallery-images_limit\']').val();
|
78 |
-
|
|
|
79 |
swal('Limit has been reached', 'Your website administrator has set a limit of ' + images_limit + ' images that can be added to this gallery.', 'error')
|
80 |
return false;
|
81 |
}
|
@@ -83,7 +84,8 @@
|
|
83 |
$(document).on('click', '.media-modal-content .attachments-browser .attachments li', function(){
|
84 |
var selection_list = $('.media-modal-content .attachments-browser .attachments li[aria-checked=true]').length;
|
85 |
var check_image_limit = pre_selected_list.length + selection_list;
|
86 |
-
|
|
|
87 |
$(this).click();
|
88 |
swal('Limit has been reached', 'Your website administrator has set a limit of ' + images_limit + ' images that can be added to this gallery.', 'error')
|
89 |
return false;
|
75 |
//On click of the add images button, check if the image limit has been reached
|
76 |
var pre_selected_list = $('.acf-photo-gallery-group-' + JsonField.key + ' .acf-photo-gallery-metabox-list li.acf-photo-gallery-mediabox');
|
77 |
var images_limit = $('.acf-photo-gallery-group-' + JsonField.key + ' input[name=\'acf-photo-gallery-images_limit\']').val();
|
78 |
+
console.log(images_limit);
|
79 |
+
if( images_limit != "" && pre_selected_list.length == images_limit ){
|
80 |
swal('Limit has been reached', 'Your website administrator has set a limit of ' + images_limit + ' images that can be added to this gallery.', 'error')
|
81 |
return false;
|
82 |
}
|
84 |
$(document).on('click', '.media-modal-content .attachments-browser .attachments li', function(){
|
85 |
var selection_list = $('.media-modal-content .attachments-browser .attachments li[aria-checked=true]').length;
|
86 |
var check_image_limit = pre_selected_list.length + selection_list;
|
87 |
+
console.log(images_limit);
|
88 |
+
if( images_limit != "" && check_image_limit > images_limit ){
|
89 |
$(this).click();
|
90 |
swal('Limit has been reached', 'Your website administrator has set a limit of ' + images_limit + ' images that can be added to this gallery.', 'error')
|
91 |
return false;
|
navz-photo-gallery.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: ACF Photo Gallery Field
|
5 |
Plugin URI: http://www.navz.me/
|
6 |
Description: An extension for Advance Custom Fields which lets you add photo gallery functionality on your websites.
|
7 |
-
Version: 1.6.
|
8 |
Author: Navneil Naicker
|
9 |
Author URI: http://www.navz.me/
|
10 |
License: GPLv2 or later
|
@@ -40,7 +40,7 @@ if( !class_exists('acf_plugin_photo_gallery') ) :
|
|
40 |
|
41 |
// vars
|
42 |
$this->settings = array(
|
43 |
-
'version' => '1.6.
|
44 |
'url' => plugin_dir_url( __FILE__ ),
|
45 |
'path' => plugin_dir_path( __FILE__ )
|
46 |
);
|
4 |
Plugin Name: ACF Photo Gallery Field
|
5 |
Plugin URI: http://www.navz.me/
|
6 |
Description: An extension for Advance Custom Fields which lets you add photo gallery functionality on your websites.
|
7 |
+
Version: 1.6.8
|
8 |
Author: Navneil Naicker
|
9 |
Author URI: http://www.navz.me/
|
10 |
License: GPLv2 or later
|
40 |
|
41 |
// vars
|
42 |
$this->settings = array(
|
43 |
+
'version' => '1.6.8',
|
44 |
'url' => plugin_dir_url( __FILE__ ),
|
45 |
'path' => plugin_dir_path( __FILE__ )
|
46 |
);
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: navzme
|
|
3 |
Tags: acf, advanced, custom, fields, photo, gallery, album, fancybox, litebox, lightbox
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.4
|
6 |
-
Stable tag: 1.6.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -126,6 +126,9 @@ Just like any other WordPress plugin, this plugin can also cause issues with oth
|
|
126 |
4. Please refer to the description for more info regarding the field type settings
|
127 |
|
128 |
== Changelog ==
|
|
|
|
|
|
|
129 |
=1.6.7=
|
130 |
* [Removed] Support to ACF get_field() function due to bug
|
131 |
|
3 |
Tags: acf, advanced, custom, fields, photo, gallery, album, fancybox, litebox, lightbox
|
4 |
Requires at least: 3.8
|
5 |
Tested up to: 5.4
|
6 |
+
Stable tag: 1.6.8
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
126 |
4. Please refer to the description for more info regarding the field type settings
|
127 |
|
128 |
== Changelog ==
|
129 |
+
=1.6.8=
|
130 |
+
* [Bugfix] Make gallery images limit optional
|
131 |
+
|
132 |
=1.6.7=
|
133 |
* [Removed] Support to ACF get_field() function due to bug
|
134 |
|