Version Description
- 12.21.2018 =
- Fixed: Visual shortcode not displaying in WP 5.0.2
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 3.1.4 |
Comparing to | |
See all releases |
Code changes from version 3.1.2 to 3.1.4
- changelog.txt +3 -0
- nggallery.php +3 -3
- products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php +1 -1
- products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post_dialog.css +1 -1
- products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post_dialog.min.css +1 -1
- products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js +63 -56
- products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.min.js +1 -1
- readme.txt +5 -2
changelog.txt
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
4 |
= V3.1.2 - 12.18.2018 =
|
5 |
* Fixed: Variable mismatch error when using central gallery management pages
|
6 |
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V3.1.4 - 12.21.2018 =
|
5 |
+
* Fixed: Visual shortcode not displaying in WP 5.0.2
|
6 |
+
|
7 |
= V3.1.2 - 12.18.2018 =
|
8 |
* Fixed: Variable mismatch error when using central gallery management pages
|
9 |
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 23 million downloads.
|
7 |
-
* Version: 3.1.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -671,10 +671,10 @@ class C_NextGEN_Bootstrap
|
|
671 |
define('NGG_TESTS_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PLUGIN_DIR, "/\\"), 'tests')));
|
672 |
define('NGG_PRODUCT_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PLUGIN_DIR, "/\\"), 'products')));
|
673 |
define('NGG_MODULE_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PRODUCT_DIR, "/\\"), 'photocrati_nextgen', 'modules')));
|
674 |
-
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
675 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
676 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
677 |
-
define('NGG_PLUGIN_VERSION', '3.1.
|
678 |
|
679 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
680 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 23 million downloads.
|
7 |
+
* Version: 3.1.4
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
671 |
define('NGG_TESTS_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PLUGIN_DIR, "/\\"), 'tests')));
|
672 |
define('NGG_PRODUCT_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PLUGIN_DIR, "/\\"), 'products')));
|
673 |
define('NGG_MODULE_DIR', implode(DIRECTORY_SEPARATOR, array(rtrim(NGG_PRODUCT_DIR, "/\\"), 'photocrati_nextgen', 'modules')));
|
674 |
+
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
675 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
676 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
677 |
+
define('NGG_PLUGIN_VERSION', '3.1.4');
|
678 |
|
679 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
680 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
|
3 |
define('NGG_ATTACH_TO_POST_SLUG', 'nextgen-attach_to_post');
|
4 |
-
define('NGG_ATTACH_TO_POST_VERSION', '3.1.
|
5 |
|
6 |
class M_Attach_To_Post extends C_Base_Module
|
7 |
{
|
1 |
<?php
|
2 |
|
3 |
define('NGG_ATTACH_TO_POST_SLUG', 'nextgen-attach_to_post');
|
4 |
+
define('NGG_ATTACH_TO_POST_VERSION', '3.1.4');
|
5 |
|
6 |
class M_Attach_To_Post extends C_Base_Module
|
7 |
{
|
products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post_dialog.css
CHANGED
@@ -166,7 +166,7 @@ div[aria-label="Block: Classic"] .nggPlaceholder {
|
|
166 |
}
|
167 |
|
168 |
div[aria-label="Block: Classic"] .nggPlaceholder h3 {
|
169 |
-
color: #fff;
|
170 |
font-family: Lato, sans-serif;
|
171 |
font-size: 16px;
|
172 |
font-size: 1.6rem;
|
166 |
}
|
167 |
|
168 |
div[aria-label="Block: Classic"] .nggPlaceholder h3 {
|
169 |
+
color: #fff !important;
|
170 |
font-family: Lato, sans-serif;
|
171 |
font-size: 16px;
|
172 |
font-size: 1.6rem;
|
products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post_dialog.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#TB_window.ngg_tb_window{box-shadow:0 0 20px 10px rgba(0,0,0,.5)}.ngg_tb_window #TB_iframeContent{height:100.1%!important}.ngg_tb_window #TB_title{height:0!important;border:none!important}.ngg_tb_window #TB_closeWindowButton{background:0 0;top:10px;right:20px}.ngg_tb_window #TB_closeWindowButton:focus .tb-close-icon,.ngg_tb_window .tb-close-icon{color:#fff;border:none;box-shadow:none;background:#9fbb1a;border-radius:50%;padding:1px;height:20px;width:20px;font-size:12px}.ngg_tb_window #TB_closeWindowButton:focus .tb-close-icon,.ngg_tb_window #TB_closeWindowButton:hover .tb-close-icon{color:#fff}.ngg_tb_window .tb-close-icon:before{font:400 18px dashicons}#ngg_attach_to_post_dialog{width:95%!important;left:2.5%!important}#ngg_attach_to_post_dialog-head #ngg_attach_to_post_dialog-title{display:none}#ngg_attach_to_post_dialog-body{width:100%!important}#ngg_attach_to_post_dialog-head{min-height:0;height:0;border:none}#ngg_attach_to_post_dialog-head .mce-close{position:absolute;background:0 0;top:10px!important;right:20px!important;z-index:2}#ngg_attach_to_post_dialog-head .mce-close i,#ngg_attach_to_post_dialog-head .mce-close:focus i{color:#fff;border:none;box-shadow:none;background:#9fbb1a;border-radius:50%;padding:1px;height:20px;width:20px;font-size:12px}#ngg_attach_to_post_dialog-head .mce-close:focus i,#ngg_attach_to_post_dialog-head .mce-close:hover i{color:#fff}#ngg_attach_to_post_dialog-head .mce-close i:before{font:400 17px dashicons;color:#fff;margin:1.2px 0 0 -8px}.ngg_attach_to_post_window{position:relative;border:none!important}.ngg_attach_to_post_window .mceBottom,.ngg_attach_to_post_window .mceCenter,.ngg_attach_to_post_window .mceLeft,.ngg_attach_to_post_window .mceResize,.ngg_attach_to_post_window .mceRight,.ngg_attach_to_post_window .mceTop{background:0 0!important;border:none!important}.ngg_attach_to_post_window .mceMiddle span{padding-top:6px!important}.ngg_attach_to_post_window .mceTop{display:block!important;height:0!important;font-size:0!important}.ngg_attach_to_post_window .mceClose{background:url(uploader-icons.png) -100px 0!important;display:block!important;margin:0!important;padding:0!important;width:15px!important;height:15px!important;position:absolute!important;top:44px!important;right:30px!important}#ngg_attach_to_post_dialog-body{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:rgba(255,255,255,.6);border-top:none}div[aria-label="Block: Classic"] .nggPlaceholder{padding:30px 30px 65px;text-align:center;background-color:#143650;box-sizing:border-box;border-radius:2px;font-family:sans-serif;font-size:20px;color:#9fbb1a;border-top:5px solid #b8d330;outline:0!important;box-shadow:0 0 4px 1px rgba(0,0,0,.05);margin-top:0;position:relative;z-index:2}div[aria-label="Block: Classic"] .nggPlaceholder h3{color:#fff;font-family:Lato,sans-serif;font-size:16px;font-size:1.6rem;font-weight:600;margin:24px 0 0}div[aria-label="Block: Classic"] .nggPlaceholderButton{background:#9ebd00!important;border-radius:2px;border:none!important;box-shadow:none!important;color:#fff!important;display:inline-block!important;font-size:13px;font-weight:700;font-family:Lato,sans-serif!important!important;height:36px!important;line-height:36px!important;letter-spacing:1.2px;margin:2px;padding:0;width:110px;text-align:center;text-transform:uppercase!important;text-shadow:none!important;cursor:pointer}div[aria-label="Block: Classic"] .nggPlaceholderButton:hover{background:#a5c31a!important}@media (max-width:781px){#TB_window.ngg_tb_window{position:absolute!important}}
|
1 |
+
#TB_window.ngg_tb_window{box-shadow:0 0 20px 10px rgba(0,0,0,.5)}.ngg_tb_window #TB_iframeContent{height:100.1%!important}.ngg_tb_window #TB_title{height:0!important;border:none!important}.ngg_tb_window #TB_closeWindowButton{background:0 0;top:10px;right:20px}.ngg_tb_window #TB_closeWindowButton:focus .tb-close-icon,.ngg_tb_window .tb-close-icon{color:#fff;border:none;box-shadow:none;background:#9fbb1a;border-radius:50%;padding:1px;height:20px;width:20px;font-size:12px}.ngg_tb_window #TB_closeWindowButton:focus .tb-close-icon,.ngg_tb_window #TB_closeWindowButton:hover .tb-close-icon{color:#fff}.ngg_tb_window .tb-close-icon:before{font:400 18px dashicons}#ngg_attach_to_post_dialog{width:95%!important;left:2.5%!important}#ngg_attach_to_post_dialog-head #ngg_attach_to_post_dialog-title{display:none}#ngg_attach_to_post_dialog-body{width:100%!important}#ngg_attach_to_post_dialog-head{min-height:0;height:0;border:none}#ngg_attach_to_post_dialog-head .mce-close{position:absolute;background:0 0;top:10px!important;right:20px!important;z-index:2}#ngg_attach_to_post_dialog-head .mce-close i,#ngg_attach_to_post_dialog-head .mce-close:focus i{color:#fff;border:none;box-shadow:none;background:#9fbb1a;border-radius:50%;padding:1px;height:20px;width:20px;font-size:12px}#ngg_attach_to_post_dialog-head .mce-close:focus i,#ngg_attach_to_post_dialog-head .mce-close:hover i{color:#fff}#ngg_attach_to_post_dialog-head .mce-close i:before{font:400 17px dashicons;color:#fff;margin:1.2px 0 0 -8px}.ngg_attach_to_post_window{position:relative;border:none!important}.ngg_attach_to_post_window .mceBottom,.ngg_attach_to_post_window .mceCenter,.ngg_attach_to_post_window .mceLeft,.ngg_attach_to_post_window .mceResize,.ngg_attach_to_post_window .mceRight,.ngg_attach_to_post_window .mceTop{background:0 0!important;border:none!important}.ngg_attach_to_post_window .mceMiddle span{padding-top:6px!important}.ngg_attach_to_post_window .mceTop{display:block!important;height:0!important;font-size:0!important}.ngg_attach_to_post_window .mceClose{background:url(uploader-icons.png) -100px 0!important;display:block!important;margin:0!important;padding:0!important;width:15px!important;height:15px!important;position:absolute!important;top:44px!important;right:30px!important}#ngg_attach_to_post_dialog-body{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;background:rgba(255,255,255,.6);border-top:none}div[aria-label="Block: Classic"] .nggPlaceholder{padding:30px 30px 65px;text-align:center;background-color:#143650;box-sizing:border-box;border-radius:2px;font-family:sans-serif;font-size:20px;color:#9fbb1a;border-top:5px solid #b8d330;outline:0!important;box-shadow:0 0 4px 1px rgba(0,0,0,.05);margin-top:0;position:relative;z-index:2}div[aria-label="Block: Classic"] .nggPlaceholder h3{color:#fff!important;font-family:Lato,sans-serif;font-size:16px;font-size:1.6rem;font-weight:600;margin:24px 0 0}div[aria-label="Block: Classic"] .nggPlaceholderButton{background:#9ebd00!important;border-radius:2px;border:none!important;box-shadow:none!important;color:#fff!important;display:inline-block!important;font-size:13px;font-weight:700;font-family:Lato,sans-serif!important!important;height:36px!important;line-height:36px!important;letter-spacing:1.2px;margin:2px;padding:0;width:110px;text-align:center;text-transform:uppercase!important;text-shadow:none!important;cursor:pointer}div[aria-label="Block: Classic"] .nggPlaceholderButton:hover{background:#a5c31a!important}@media (max-width:781px){#TB_window.ngg_tb_window{position:absolute!important}}
|
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js
CHANGED
@@ -54,6 +54,13 @@
|
|
54 |
image: plugin_url+'/igw_button.png'
|
55 |
});
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Listen for click events to our placeholder
|
59 |
*/
|
@@ -115,60 +122,8 @@
|
|
115 |
* in templates/tinymce_placeholder.php
|
116 |
*/
|
117 |
editor.on('BeforeSetContent', function(event) {
|
118 |
-
|
119 |
-
|
120 |
-
var start_of_shortcode = event.content.indexOf(shortcode_opening_tag);
|
121 |
-
var index = start_of_shortcode + shortcode_opening_tag.length;
|
122 |
-
var found_attribute_assignment = false;
|
123 |
-
var current_attribute_enclosure = null;
|
124 |
-
var last_found_char = false;
|
125 |
-
var content_length = event.content.length;
|
126 |
-
while (true) {
|
127 |
-
var char = event.content[index];
|
128 |
-
if (char == '"' || char == "'" && last_found_char == '=') {
|
129 |
-
// Is this the closing quote for an already found attribute assignment?
|
130 |
-
if (found_attribute_assignment && current_attribute_enclosure == char) {
|
131 |
-
found_attribute_assignment = false;
|
132 |
-
current_attribute_enclosure = null;
|
133 |
-
}
|
134 |
-
else {
|
135 |
-
found_attribute_assignment = true;
|
136 |
-
current_attribute_enclosure = char;
|
137 |
-
}
|
138 |
-
}
|
139 |
-
else if (char == ']') {
|
140 |
-
// we've found a shortcode closing tag. But, we need to ensure
|
141 |
-
// that this ] isn't within the value of a shortcode attribute
|
142 |
-
if (!found_attribute_assignment) {
|
143 |
-
break; //exit loop - we've found the shortcode
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
-
last_found_char = char;
|
148 |
-
|
149 |
-
if (index == content_length) {
|
150 |
-
break;
|
151 |
-
}
|
152 |
-
|
153 |
-
index++;
|
154 |
-
}
|
155 |
-
|
156 |
-
// Replace the shortcode with a placeholder
|
157 |
-
var match = event.content.substring(start_of_shortcode, ++index);
|
158 |
-
var shortcode = match.substring(1, match.length-1);
|
159 |
-
shortcode = shortcode.replace('[', '[');
|
160 |
-
shortcode = shortcode.replace(']', ']');
|
161 |
-
|
162 |
-
var template = _.template($('#ngg-igw-placeholder').html());
|
163 |
-
event.content = event.content.replace(match, template($.extend(ngg_igw_i18n, {
|
164 |
-
shortcode: shortcode,
|
165 |
-
ref: _.now()
|
166 |
-
})));
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
handle_shortcode('[ngg_images ');
|
171 |
-
handle_shortcode('[ngg ');
|
172 |
});
|
173 |
|
174 |
/**
|
@@ -179,11 +134,63 @@
|
|
179 |
$content.find('.nggPlaceholder').toArray().forEach(function(placeholder){
|
180 |
var $placeholder = $(placeholder);
|
181 |
var shortcode = $placeholder.data('shortcode');
|
182 |
-
shortcode = "
|
183 |
$placeholder.replaceWith(shortcode);
|
184 |
});
|
185 |
-
event.content = $content.
|
186 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
},
|
188 |
|
189 |
get_class_name: function(node) {
|
54 |
image: plugin_url+'/igw_button.png'
|
55 |
});
|
56 |
|
57 |
+
editor.on('SaveContent', function(event) {
|
58 |
+
if (wp.blocks) {
|
59 |
+
handle_shortcode(event, '[ngg_images ');
|
60 |
+
handle_shortcode(event, '[ngg ');
|
61 |
+
}
|
62 |
+
});
|
63 |
+
|
64 |
/**
|
65 |
* Listen for click events to our placeholder
|
66 |
*/
|
122 |
* in templates/tinymce_placeholder.php
|
123 |
*/
|
124 |
editor.on('BeforeSetContent', function(event) {
|
125 |
+
handle_shortcode(event, '[ngg_images ');
|
126 |
+
handle_shortcode(event, '[ngg ');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
});
|
128 |
|
129 |
/**
|
134 |
$content.find('.nggPlaceholder').toArray().forEach(function(placeholder){
|
135 |
var $placeholder = $(placeholder);
|
136 |
var shortcode = $placeholder.data('shortcode');
|
137 |
+
shortcode = "[" + _.unescape(shortcode) + "]";
|
138 |
$placeholder.replaceWith(shortcode);
|
139 |
});
|
140 |
+
event.content = $content[0].innerHTML;
|
141 |
});
|
142 |
+
|
143 |
+
function handle_shortcode(event, shortcode_opening_tag) {
|
144 |
+
while (event.content.indexOf(shortcode_opening_tag) >= 0) {
|
145 |
+
var start_of_shortcode = event.content.indexOf(shortcode_opening_tag);
|
146 |
+
var index = start_of_shortcode + shortcode_opening_tag.length;
|
147 |
+
var found_attribute_assignment = false;
|
148 |
+
var current_attribute_enclosure = null;
|
149 |
+
var last_found_char = false;
|
150 |
+
var content_length = event.content.length;
|
151 |
+
while (true) {
|
152 |
+
var char = event.content[index];
|
153 |
+
if (char == '"' || char == "'" && last_found_char == '=') {
|
154 |
+
// Is this the closing quote for an already found attribute assignment?
|
155 |
+
if (found_attribute_assignment && current_attribute_enclosure == char) {
|
156 |
+
found_attribute_assignment = false;
|
157 |
+
current_attribute_enclosure = null;
|
158 |
+
}
|
159 |
+
else {
|
160 |
+
found_attribute_assignment = true;
|
161 |
+
current_attribute_enclosure = char;
|
162 |
+
}
|
163 |
+
}
|
164 |
+
else if (char == ']') {
|
165 |
+
// we've found a shortcode closing tag. But, we need to ensure
|
166 |
+
// that this ] isn't within the value of a shortcode attribute
|
167 |
+
if (!found_attribute_assignment) {
|
168 |
+
break; //exit loop - we've found the shortcode
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
last_found_char = char;
|
173 |
+
|
174 |
+
if (index == content_length) {
|
175 |
+
break;
|
176 |
+
}
|
177 |
+
|
178 |
+
index++;
|
179 |
+
}
|
180 |
+
|
181 |
+
// Replace the shortcode with a placeholder
|
182 |
+
var match = event.content.substring(start_of_shortcode, ++index);
|
183 |
+
var shortcode = match.substring(1, match.length-1);
|
184 |
+
shortcode = shortcode.replace('[', '[');
|
185 |
+
shortcode = shortcode.replace(']', ']');
|
186 |
+
|
187 |
+
var template = _.template($('#ngg-igw-placeholder').html());
|
188 |
+
event.content = event.content.replace(match, template($.extend(ngg_igw_i18n, {
|
189 |
+
shortcode: shortcode,
|
190 |
+
ref: _.now()
|
191 |
+
})));
|
192 |
+
}
|
193 |
+
}
|
194 |
},
|
195 |
|
196 |
get_class_name: function(node) {
|
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(t,e){window.id="wordpress-post-page",tinyMCE.addI18n("en.ngg_attach_to_post",{title:"Attach NextGEN Gallery to Post"}),tinymce.create("tinymce.plugins.NextGEN_AttachToPost",{siteurl:t,getInfo:function(){return{longname:"NextGEN Gallery",author:"Imagely",authorurl:"https://www.imagely.com",infourl:"https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/",version:"0.1"}},init:function(t,n){var o=this;t.windowManager.nggOldOpen=t.windowManager.open,t.windowManager.open=function(e,n){var
|
1 |
+
!function(t,e){window.id="wordpress-post-page",tinyMCE.addI18n("en.ngg_attach_to_post",{title:"Attach NextGEN Gallery to Post"}),tinymce.create("tinymce.plugins.NextGEN_AttachToPost",{siteurl:t,getInfo:function(){return{longname:"NextGEN Gallery",author:"Imagely",authorurl:"https://www.imagely.com",infourl:"https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/",version:"0.1"}},init:function(t,n){function o(t,n){for(;t.content.indexOf(n)>=0;){for(var o=t.content.indexOf(n),a=o+n.length,r=!1,i=null,c=!1,g=t.content.length;;){var l=t.content[a];if('"'==l||"'"==l&&"="==c)r&&i==l?(r=!1,i=null):(r=!0,i=l);else if("]"==l&&!r)break;if(c=l,a==g)break;a++}var s=t.content.substring(o,++a),d=s.substring(1,s.length-1);d=d.replace("[","["),d=d.replace("]","]");var h=_.template(e("#ngg-igw-placeholder").html());t.content=t.content.replace(s,h(e.extend(ngg_igw_i18n,{shortcode:d,ref:_.now()})))}}var a=this;t.windowManager.nggOldOpen=t.windowManager.open,t.windowManager.open=function(e,n){var o=t.windowManager.nggOldOpen(e,n);return o.on("close",a.wm_close_event),o},t.addCommand("ngg_attach_to_post",this.render_attach_to_post_interface,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),t.addButton("NextGEN_AttachToPost",{title:"ngg_attach_to_post.title",cmd:"ngg_attach_to_post",image:n+"/igw_button.png"}),t.on("SaveContent",function(t){wp.blocks&&(o(t,"[ngg_images "),o(t,"[ngg "))}),t.on("mouseup touchend",function(n){if(tinymce.extend(a,{editor:t,plugin:t.plugins.NextGEN_AttachToPost}),"IMG"==n.target.tagName){if(a.get_class_name(n.target).indexOf("ngg_displayed_gallery")>=0){t.dom.events.cancel(n);var o=n.target.src.match(/\d+$/);o&&(o=o.pop()),a.render_attach_to_post_interface({key:"id",val:o})}}else{var r=e(n.target);if(r.hasClass("nggPlaceholderButton"))if(r.hasClass("nggIgwRemove")){var i=r.parents(".nggPlaceholder"),c=i[0].getAttribute("data-shortcode");t.fire("ngg-removed",{shortcode:c}),i.remove()}else window.igw_shortcode=e(n.target).parents(".nggPlaceholder")[0].getAttribute("data-shortcode"),a.render_attach_to_post_interface({key:"shortcode",val:Base64.encode(window.igw_shortcode),ref:e(n.target).parents(".nggPlaceholder").attr("id")})}}),t.on("BeforeSetContent",function(t){o(t,"[ngg_images "),o(t,"[ngg ")}),t.on("PostProcess",function(t){var n=e("<div/>").append(t.content);n.find(".nggPlaceholder").toArray().forEach(function(t){var n=e(t),o=n.data("shortcode");o="["+_.unescape(o)+"]",n.replaceWith(o)}),t.content=n[0].innerHTML})},get_class_name:function(t){var e=t.getAttribute("class")?t.getAttribute("class"):t.className;return e||""},wm_close_event:function(t){t&&t.target&&t.target._id&&"ngg_attach_to_post_dialog"==t.target._id&&(e("html,body").css("overflow","auto"),tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select("p")[0]),tinyMCE.activeEditor.selection.collapse(0))},render_attach_to_post_interface:function(t){var n=nextgen_gallery_attach_to_post_url;void 0!==t&&(n+="&"+t.key+"="+encodeURIComponent(t.val),void 0!==t.ref&&(n+="&ref="+encodeURIComponent(t.ref))),n+="&editor="+this.editor.id;for(var o=window;null!=o.parent&&o.parent!=o;)o=o.parent;o=e(o);var a=o.width(),r=o.height(),i=1600,c=1200,g=a-.05*a,l=r-.1*r;g<800&&(g=a-20),l<600&&(l=r-40),i>g&&(i=g),c>l&&(c=l),document.activeElement.blur(),Array.prototype.forEach.call(document.querySelectorAll("input, textarea"),function(t){t.blur()}),this.editor.windowManager.open({url:n,id:"ngg_attach_to_post_dialog",width:i,height:c,title:"NextGEN Gallery - Attach To Post"}),e("html,body").css("overflow","hidden"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-y","auto"),e("#ngg_attach_to_post_dialog_ifr").css("overflow-x","hidden")}}),tinymce.PluginManager.add("NextGEN_AttachToPost",tinymce.plugins.NextGEN_AttachToPost)}(photocrati_ajax.wp_site_url,jQuery);
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
-
Stable tag: 3.1.
|
6 |
-
Tested up to: 5.0.
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 23 million downloads.
|
@@ -183,6 +183,9 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
183 |
|
184 |
== Changelog ==
|
185 |
|
|
|
|
|
|
|
186 |
= V3.1.2 - 12.18.2018 =
|
187 |
* Fixed: Variable mismatch error when using central gallery management pages
|
188 |
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
+
Stable tag: 3.1.4
|
6 |
+
Tested up to: 5.0.2
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 23 million downloads.
|
183 |
|
184 |
== Changelog ==
|
185 |
|
186 |
+
= V3.1.4 - 12.21.2018 =
|
187 |
+
* Fixed: Visual shortcode not displaying in WP 5.0.2
|
188 |
+
|
189 |
= V3.1.2 - 12.18.2018 =
|
190 |
* Fixed: Variable mismatch error when using central gallery management pages
|
191 |
|