Gallery – Photo Gallery – Image Gallery - Version 2.6.3

Version Description

Download this release

Release Info

Developer raldea89
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 2.6.3
Comparing to
See all releases

Code changes from version 2.6.2 to 2.6.3

Modula.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://wp-modula.com/
5
  * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
6
  * Author: WPChill
7
- * Version: 2.6.2
8
  * Author URI: https://www.wpchill.com/
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -47,7 +47,7 @@
47
  * @since 2.0.2
48
  */
49
 
50
- define( 'MODULA_LITE_VERSION' , '2.6.2' );
51
  define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
52
  define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
53
  defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
4
  * Plugin URI: https://wp-modula.com/
5
  * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
6
  * Author: WPChill
7
+ * Version: 2.6.3
8
  * Author URI: https://www.wpchill.com/
9
  * License: GPLv3 or later
10
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
47
  * @since 2.0.2
48
  */
49
 
50
+ define( 'MODULA_LITE_VERSION' , '2.6.3' );
51
  define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
52
  define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
53
  defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
assets/css/admin/addons.css CHANGED
@@ -1,7 +1,7 @@
1
  .modula-addons-container,
2
  .modula-free-addons-container{
3
  display: flex;
4
- justify-content: space-between;
5
  flex-wrap: wrap;
6
  padding-top:28px;
7
  }
1
  .modula-addons-container,
2
  .modula-free-addons-container{
3
  display: flex;
4
+ justify-content: flex-start;
5
  flex-wrap: wrap;
6
  padding-top:28px;
7
  }
assets/css/admin/modula-cpt.css CHANGED
@@ -452,6 +452,10 @@ html body .modula.modula-gallery .modula-items .jtg-social {
452
  transform: translate3d(0,0,0);
453
  }
454
 
 
 
 
 
455
  html body #wpbody #poststuff #post-body .postbox-container #modula-hover-effect .modula.modula-gallery .modula-items .modula-item.effect-sadie .jtg-title {
456
  color:#fff;
457
  }
452
  transform: translate3d(0,0,0);
453
  }
454
 
455
+ .single-modula-gallery.post-type-modula-gallery.modula-no-drag #poststuff .postbox .handle-actions {
456
+ display:none;
457
+ }
458
+
459
  html body #wpbody #poststuff #post-body .postbox-container #modula-hover-effect .modula.modula-gallery .modula-items .modula-item.effect-sadie .jtg-title {
460
  color:#fff;
461
  }
assets/js/admin/modula-addon.js CHANGED
@@ -27,6 +27,32 @@
27
  return;
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  $( '.modula-free-addons-container .modula-toggle__input' ).on( 'change', function ( e ) {
31
 
32
  var activate_url = $( this ).data( 'activateurl' ),
@@ -41,60 +67,38 @@
41
 
42
  text_wrapper.text( modulaAddons.installing_text );
43
 
44
- wp.updates.installPlugin( {
45
- slug: slug
46
- } );
 
 
 
 
 
 
 
 
 
 
47
 
48
  } else if ( 'activate' === action ) {
49
 
50
  text_wrapper.text( modulaAddons.activating_text );
51
- freeModulaPluginAction( activate_url, action, text_wrapper );
52
  } else if ( 'installed' === action ) {
53
 
54
  text_wrapper.text( modulaAddons.deactivating_text );
55
- freeModulaPluginAction( deactivate_url, action, text_wrapper );
56
  }
57
 
58
  });
59
 
60
- function freeModulaPluginAction( url, action, text_wrapper, slug ) {
61
-
62
- $.ajax( {
63
- async : true,
64
- type : 'GET',
65
- dataType: 'html',
66
- url : url,
67
- success : function () {
68
-
69
- if ( 'activate' === action ) {
70
-
71
- if ( !text_wrapper && 'undefined' !== typeof slug ) {
72
- text_wrapper = jQuery( 'input[data-slug="' + slug + '"]' ).parents( '.modula-free-addon-actions' ).find( 'span.modula-action-texts' );
73
- }
74
-
75
- text_wrapper.text( modulaAddons.activated_text );
76
-
77
- } else if ( 'deactivate' === action ) {
78
-
79
- if ( !text_wrapper && 'undefined' !== typeof slug ) {
80
- text_wrapper = jQuery( 'input[data-slug="' + slug + '"]' ).parents( '.modula-free-addon-actions' ).find( 'span.modula-action-texts' );
81
- }
82
-
83
- text_wrapper.text( modulaAddons.deactivated_text );
84
- }
85
-
86
- setTimeout( function () {
87
- text_wrapper.text( '' );
88
- }, 3000 );
89
- }
90
- } );
91
- }
92
 
93
  jQuery( document ).on( 'wp-plugin-install-success', function ( response, data ) {
94
 
95
  if ( jQuery.inArray( data.slug, modulaAddons.free_addons ) > -1 ) {
96
 
97
- freeModulaPluginAction( data.activateUrl, 'activate', false, data.slug );
98
  }
99
  } );
100
 
27
  return;
28
  }
29
 
30
+ function mdulaActivatePlugin( url, text_wrapper, action ) {
31
+ $.ajax( {
32
+ async: true,
33
+ type: 'GET',
34
+ dataType: 'html',
35
+ url: url,
36
+ success: function() {
37
+
38
+ if ( 'activate' === action ) {
39
+ if ( !text_wrapper && 'undefined' !== typeof slug ) {
40
+ text_wrapper = jQuery( 'input[data-slug="' + slug + '"]' ).parents( '.modula-free-addon-actions' ).find( 'span.modula-action-texts' );
41
+ }
42
+
43
+ text_wrapper.text( modulaAddons.activated_text );
44
+ } else {
45
+ if ( !text_wrapper && 'undefined' !== typeof slug ) {
46
+ text_wrapper = jQuery( 'input[data-slug="' + slug + '"]' ).parents( '.modula-free-addon-actions' ).find( 'span.modula-action-texts' );
47
+ }
48
+
49
+ text_wrapper.text( modulaAddons.deactivated_text );
50
+ }
51
+
52
+ }
53
+ });
54
+ }
55
+
56
  $( '.modula-free-addons-container .modula-toggle__input' ).on( 'change', function ( e ) {
57
 
58
  var activate_url = $( this ).data( 'activateurl' ),
67
 
68
  text_wrapper.text( modulaAddons.installing_text );
69
 
70
+ const args = {
71
+ slug: slug,
72
+ success: (response) => {
73
+ if ( !text_wrapper && 'undefined' !== typeof slug ) {
74
+ text_wrapper = jQuery( 'input[data-slug="' + slug + '"]' ).parents( '.modula-free-addon-actions' ).find( 'span.modula-action-texts' );
75
+ }
76
+
77
+ text_wrapper.text( modulaAddons.activated_text );
78
+ mdulaActivatePlugin( activate_url, text_wrapper, 'activate' );
79
+ }
80
+ };
81
+
82
+ wp.updates.installPlugin(args);
83
 
84
  } else if ( 'activate' === action ) {
85
 
86
  text_wrapper.text( modulaAddons.activating_text );
87
+ mdulaActivatePlugin( activate_url, text_wrapper, action );
88
  } else if ( 'installed' === action ) {
89
 
90
  text_wrapper.text( modulaAddons.deactivating_text );
91
+ mdulaActivatePlugin( deactivate_url,text_wrapper, action );
92
  }
93
 
94
  });
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  jQuery( document ).on( 'wp-plugin-install-success', function ( response, data ) {
98
 
99
  if ( jQuery.inArray( data.slug, modulaAddons.free_addons ) > -1 ) {
100
 
101
+ mdulaActivatePlugin( data.activateUrl, false, 'activate');
102
  }
103
  } );
104
 
assets/js/admin/wp-modula-gutenberg.js CHANGED
@@ -1 +1 @@
1
- !function(t){var e={};function a(n){if(e[n])return e[n].exports;var l=e[n]={i:n,l:!1,exports:{}};return t[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)a.d(n,l,function(e){return t[e]}.bind(null,l));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=0)}([function(t,e,a){"use strict";a.r(e);var n=wp.element.useEffect,l=function(t){var e=t.onIdChange,a=t.id,l=t.options,c=t.galleries;return n((function(){var t=[];null!=c&&0==t.length&&c.forEach((function(e){t.push({value:e.id,label:e.title.rendered})})),jQuery(".modula-gallery-input").selectize({valueField:"value",labelField:"label",searchField:["label","value"],create:!1,maxItems:1,placeholder:"Search for a gallery...",preload:!0,allowEmptyOptions:!0,closeAfterSelect:!0,options:l.concat(t),render:{option:function(t,e){return'<div><span class="title">'+e(t.label)+'<span class="name">( #'+e(t.value)+" )</span></div>"}},load:function(t,e){if(!t.length)return e();jQuery.ajax({url:modulaVars.ajaxURL,type:"GET",data:{action:"modula_get_gallery",nonce:modulaVars.nonce,term:t},success:function(t){e(t)}})},onChange:function(t){e(t)}})}),[]),React.createElement("input",{className:"modula-gallery-input",value:"0"==a?"":a})},c=wp.i18n.__,o=wp.element.Fragment,i=wp.blockEditor.InspectorControls,r=wp.components,d=r.Button,u=r.PanelBody,s=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=t.galleries,n=t.onIdChange,r=e.id,s=e.currentSelectize;return React.createElement(o,null,React.createElement(i,null,React.createElement(u,{title:c("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(o,null,React.createElement(l,{id:r,key:r,value:r,options:s,onIdChange:n,galleries:a}),0!=r&&React.createElement(d,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+r+"&action=edit",isSecondary:!0},c("Edit gallery"))))))})),m={};m.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1 c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5 c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7 c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4 c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1 C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9 c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5 c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3 c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),m.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),m.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),m.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),m.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),m.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",class:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),m.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",class:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),m.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),m.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",class:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),m.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",class:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),m.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),m.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{"fill-rule":"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));var g=m,f=wp.element.Fragment,p=function(t){var e=t.settings,a=t.img,n=t.hideTitle,l=t.hideDescription,c=t.hideSocial;return[React.createElement(f,null,["tilt_1","tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(e.effect)&&React.createElement("div",{class:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==e.hide_title&&!n&&React.createElement("div",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","sadie","ruby","bubba","dexter","chico","ming"].includes(e.effect)?"jtg-body":""},"0"==e.hide_description&&!l&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!c&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",g.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",g.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",g.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",g.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",g.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",g.email," "))))))]},h=wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=e.settings,n=e.effectCheck,l=t.img,c=t.index;return[React.createElement("div",{className:"modula-item effect-".concat(a.effect),"data-width":l["data-width"]?l["data-width"]:"2","data-height":l["data-height"]?l["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},React.createElement("img",{className:"modula-image pic","data-id":l.id,"data-full":l.src,"data-src":l.src,"data-valign":"middle","data-halign":"center",src:l.src}),"slider"!==a.type&&React.createElement(p,{settings:a,img:l,index:c,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]})),v=function(t){var e=t.id,a=t.settings,n="";"grid"==a.type&&"automatic"!=a.grid_type&&(n+="#jtg-".concat(e,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(n+="#jtg-".concat(e," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(n+="#jtg-".concat(e," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(n+="#jtg-".concat(e," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(n+="#jtg-".concat(e," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(n+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(n+="#jtg-".concat(e," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),n+="#jtg-".concat(e,".modula-gallery .modula-item > a, #jtg-").concat(e,".modula-gallery .modula-item, #jtg-").concat(e,".modula-gallery .modula-item-content > a {\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(n+="#jtg-".concat(e," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==t.imagesCount?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: ").concat(a.height,"px;\n\t\t\t}"):"slider"==a.type&&(n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(n+="".concat(a.style));var l="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(l+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),l+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),n+="@media screen and (max-width:480px){\n\t\t".concat(l,"\n\t\t}"),"none"==a.effect&&(n+="#jtg-".concat(e," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),n+="#jtg-".concat(e,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(e,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(e,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(e,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(e,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(e,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(e,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(e,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(e,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(e,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(e,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),n+="#jtg-".concat(e,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?n+="#jtg-".concat(e," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):n+="#jtg-".concat(e," {\n\t\t\twidth: 1100px;\n\t\t\t}"),n+="#jtg-".concat(e," .modula-items {\n\t\theight: auto;\n\t\t}"),n+="#jtg-".concat(e," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(n+="#jtg-".concat(e,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(n,"\n \t\t\t\t")}})},y=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}var w=wp.element,j=w.Fragment,E=w.useEffect,R=wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,c=t.settings,o=t.checkHoverEffect,i=t.modulaRun,r=t.modulaSlickRun;E((function(){void 0!==c&&o(c.effect),"slider"!==c.type?i(n):r(l)}),[]);var d="modula modula-gallery ",u="modula-items";return"creative-gallery"==c.type?d+="modula-creative-gallery":"custom-grid"==c.type?d+="modula-custom-grid":"slider"==c.type?d="modula-slider":(d+="modula-columns",u+=" grid-gallery","automatic"==c.grid_type&&(u+=" justified-gallery")),[React.createElement(j,null,React.createElement(v,{id:l,settings:c}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":JSON.stringify(n)},"grid"==c.type&&"automatic"!=c.grid_type&&React.createElement("div",{class:"modula-grid-sizer"}," "),React.createElement(y,b({},t,{position:"top"})),React.createElement("div",{className:u},a.length>0&&React.createElement(j,null,React.createElement(j,null,a.map((function(e,a){return[React.createElement(h,b({},t,{img:e,index:a}))]}))))),React.createElement(y,b({},t,{position:"bottom"}))))]}));function k(){return(k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,l,c=[],o=!0,i=!1;try{for(a=a.call(t);!(o=(n=a.next()).done)&&(c.push(n.value),!e||c.length!==e);o=!0);}catch(t){i=!0,l=t}finally{try{o||null==a.return||a.return()}finally{if(i)throw l}}return c}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return C(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return C(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}var _=wp.i18n.__,z=wp.element,S=z.Fragment,N=z.useEffect,T=z.useState,M=wp.data.withSelect,F=wp.components,I=F.Button,O=F.Spinner,q=F.ToolbarGroup,V=F.ToolbarItem,B=wp.blockEditor.BlockControls,L=(0,wp.compose.compose)(M((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:5})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,c=e.id,o=e.images,i=e.status,r=e.settings,d=e.jsConfig,u=e.galleryId,m=(e.currentGallery,e.currentSelectize),f=x(T(t.attributes.align),2),p=(f[0],f[1],x(T(c),2)),h=p[0];p[1];N((function(){0!==c&&v(c)}),[]),N((function(){jQuery(document).on("modula_api_after_init",(function(e,a){t.setAttributes({instance:a})})),null!=t.attributes.instance&&null!=r&&"grid"==r.type&&t.attributes.instance.reset(t.attributes.instance)}));var v=function(t){isNaN(t)||""==t||(t=parseInt(t),wp.apiFetch({path:"wp/v2/modula-gallery/".concat(t)}).then((function(e){n({currentGallery:e}),n({currentSelectize:[{value:t,label:""===e.title.rendered?"Unnamed":e.title.rendered}]}),jQuery.ajax({type:"POST",data:{action:"modula_get_gallery_meta",id:t,nonce:modulaVars.nonce},url:modulaVars.ajaxURL,success:function(e){return y(t,e)}})})))},y=function(t,e){!1!==e.success?(h==t&&null!=r||b(t),n({id:t,images:e,status:"ready"})):n({id:t,status:"ready"})},b=function(t){fetch("".concat(modulaVars.restURL,"wp/v2/modula-gallery/").concat(t)).then((function(t){return t.json()})).then((function(t){var e=t;n({status:"loading"}),jQuery.ajax({type:"POST",data:{action:"modula_get_jsconfig",nonce:modulaVars.nonce,settings:e.modulaSettings},url:modulaVars.ajaxURL,success:function(t){var a=Math.floor(999*Math.random());n({galleryId:a,settings:e.modulaSettings,jsConfig:t,status:"ready"})}})}))},w=React.createElement(B,null,o&&o.length>0&&React.createElement(q,null,React.createElement(V,null,React.createElement(I,{label:_("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+c+"&action=edit",target:"_blank"}))));return 0==c&&"none"===e.galleryType?[React.createElement(S,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},0==a.length&&React.createElement("p",null," ",_("Sorry no galleries found","modula-best-grid-gallery")," "),a.length>0&&React.createElement(I,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},_("Display An Existing Gallery","modula-best-grid-gallery"),g.chevronRightFancy),null==t.attributes.proInstalled&&a.length>0&&React.createElement(I,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},_("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery"))))))]:"loading"===i?[React.createElement(S,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(O,null))))]:0==c||0===o.length?[React.createElement(S,null,React.createElement(s,k({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:_("select a gallery","modula-best-grid-gallery")}];return a.forEach((function(e){var a=e.title,n=e.id;0==a.rendered.length?t.push({value:n,label:_("Unnamed Gallery","modula-best-grid-gallery")+n}):t.push({value:n,label:a.rendered})})),t}},t)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),a.length>0&&React.createElement(S,null,React.createElement(l,{id:c,key:c,value:c,options:m,onIdChange:v,galleries:a}),0!=c&&React.createElement(I,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+c+"&action=edit",isPrimary:!0},_("Edit Gallery"))))))]:r?[React.createElement(S,null,w,React.createElement(s,k({onIdChange:function(t){v(t)}},t)),React.createElement(R,k({},t,{settings:r,jsConfig:d,modulaRun:function(t){if(null!=t){n({status:"ready"});var e=jQuery(".modula.modula-gallery");jQuery.each(e,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config");t.lazyLoad=0,jQuery(this).modulaGallery(t)}))}},modulaSlickRun:function(t){if(t="jtg-".concat(t),n({status:"ready"}),jQuery(".modula-slider").length>0&&void 0!==jQuery.fn.slick){var e=jQuery("#".concat(t)).data("config"),a=jQuery("#".concat(t)).find(".modula-slider-nav"),l=jQuery("#".concat(t)).find(".modula-items");if(l.slick(e.slider_settings),a.length){var c=a.data("config"),o=l.slick("slickCurrentSlide");a.on("init",(function(t,e){a.find('.slick-slide[data-slick-index="'+o+'"]').addClass("is-active")})),a.slick(c),l.on("afterChange",(function(t,e,n){a.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';a.find(".slick-slide.is-active").removeClass("is-active"),a.find(l).addClass("is-active")})),a.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");l.slick("slickGoTo",e)}))}}},checkHoverEffect:function(t){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:t},url:modulaVars.ajaxURL,success:function(t){n({effectCheck:t})}})},galleryId:u})))]:null}));function Q(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var P=wp.i18n.__,A=wp.blocks.registerBlockType;new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registerBlock()}var e,a,n;return e=t,(a=[{key:"registerBlock",value:function(){this.blockName="modula/gallery",this.blockAttributes={id:{type:"number",default:0},images:{type:"array",default:[]},status:{type:"string",default:"ready"},galleryId:{type:"number",default:0},defaultSettings:{type:"object",default:[]},galleryType:{type:"string",default:"none"},currentGallery:{type:"object",default:{}},currentSelectize:{type:"array",default:[]}},A(this.blockName,{title:modulaVars.gutenbergTitle,icon:g.modula,description:P("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[P("gallery"),P("modula"),P("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:L,save:function(){return null}})}}])&&Q(e.prototype,a),n&&Q(e,n),t}())}]);
1
+ !function(t){var e={};function a(n){if(e[n])return e[n].exports;var l=e[n]={i:n,l:!1,exports:{}};return t[n].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var l in t)a.d(n,l,function(e){return t[e]}.bind(null,l));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=0)}([function(t,e,a){"use strict";a.r(e);var n=wp.element.useEffect,l=function(t){var e=t.onIdChange,a=t.id,l=t.options,c=t.galleries;return n((function(){var t=[];null!=c&&0==t.length&&c.forEach((function(e){t.push({value:e.id,label:e.title.rendered})})),jQuery(".modula-gallery-input").selectize({valueField:"value",labelField:"label",searchField:["label","value"],create:!1,maxItems:1,placeholder:"Search for a gallery...",preload:!0,allowEmptyOptions:!0,closeAfterSelect:!0,options:l.concat(t),render:{option:function(t,e){return'<div><span className="title">'+e(t.label)+'<span className="name">( #'+e(t.value)+" )</span></div>"}},load:function(t,e){if(!t.length)return e();jQuery.ajax({url:modulaVars.ajaxURL,type:"GET",data:{action:"modula_get_gallery",nonce:modulaVars.nonce,term:t},success:function(t){e(t)}})},onChange:function(t){e(t)}})}),[]),React.createElement("input",{className:"modula-gallery-input",defaultValue:"0"==a?"":a})},c=wp.i18n.__,o=wp.element.Fragment,i=wp.blockEditor.InspectorControls,r=wp.components,d=r.Button,u=r.PanelBody,s=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=t.galleries,n=t.onIdChange,r=e.id,s=e.currentSelectize;return React.createElement(o,null,React.createElement(i,null,React.createElement(u,{title:c("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(o,null,React.createElement(l,{id:r,key:r,value:r,options:s,onIdChange:n,galleries:a}),0!=r&&React.createElement(d,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+r+"&action=edit",isSecondary:!0},c("Edit gallery"))))))})),m={};m.modula=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"364 242.9 312.2 357"},React.createElement("g",null,React.createElement("path",{d:"M528.1,242.9c8.5,16.9,17,33.8,25.6,50.6c13.4,26.4,26.9,52.7,39.9,79.7c-41.8-23.3-83.6-46.7-125.4-70.1\r c0.3-1.9,1.7-2.6,2.7-3.5c17.7-17.7,35.4-35.4,53.1-53c1.1-1.1,2.6-2,3.1-3.7C527.4,242.9,527.8,242.9,528.1,242.9z"}),React.createElement("path",{d:"M602.3,463.3c11.3-6.9,22.6-13.9,33.9-20.8c5.5-3.4,11.1-6.7,16.5-10.3c2.2-1.4,2.9-1.1,3.5,1.5\r c6.4,25.3,13,50.6,19.6,75.8c0.6,2.2,1,3.7-2.4,3.5c-46.7-2.1-93.5-4.1-140.2-6.1c-0.2,0-0.3-0.1-0.5-0.2c0.5-1.7,2.1-2,3.3-2.7\r c20-12.3,39.9-24.7,60-36.8c3.4-2.1,5.1-3.7,4.8-8.5c-1.4-21.3-1.8-42.6-2.6-63.9c-0.9-24.1-1.8-48.3-2.8-72.4\r c-0.2-6.1-0.2-6.1,5.5-4.6c23.8,6.2,47.6,12.5,71.5,18.5c3.9,1,4.2,1.9,2.1,5.4c-23.4,38.5-46.7,77.1-70,115.7c-1,1.7-2,3.4-3,5.1\r C601.7,462.8,602,463,602.3,463.3z"}),React.createElement("path",{d:"M372.8,326.9c48,2.6,95.8,5.1,143.9,7.7c-0.9,2-2.5,2.3-3.7,3.1c-38.6,23.2-77.3,46.4-115.9,69.6c-3,1.8-4.3,2.6-5.4-1.9\r c-5.9-24.9-12.2-49.7-18.3-74.6C373.1,329.6,373,328.4,372.8,326.9z"}),React.createElement("path",{d:"M517.6,599.9c-23.2-43.7-45.9-86.6-69.2-130.5c2.3,1.2,3.5,1.8,4.7,2.4c39.8,21.5,79.5,43.1,119.3,64.5\r c3.2,1.7,4.1,2.5,1,5.6c-17.7,17.8-35.2,35.9-52.8,53.9C519.7,596.9,518.9,598.2,517.6,599.9z"}),React.createElement("path",{d:"M364.9,505.1c26.6-40.5,53.1-80.8,79.7-121.3c1.3,1.3,0.9,2.5,0.9,3.6c0,46-0.1,92-0.1,137.9c0,3.1-0.2,4.5-4,3.3\r c-24.9-7.7-49.9-15.2-74.9-22.8C366,505.8,365.7,505.5,364.9,505.1z"}))),m.remove=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M13 11.9l3.3-3.4-1.1-1-3.2 3.3-3.2-3.3-1.1 1 3.3 3.4-3.5 3.6 1 1L12 13l3.5 3.5 1-1z"})),m.replace=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M20.1 5.1L16.9 2 6.2 12.7l-1.3 4.4 4.5-1.3L20.1 5.1zM4 20.8h8v-1.5H4v1.5z"})),m.chevronLeft=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z"})),m.chevronRight=React.createElement("svg",{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",role:"img","aria-hidden":"true",focusable:"false"},React.createElement("path",{d:"M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z"})),m.twitter=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"twitter",className:"svg-inline--fa fa-twitter fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React.createElement("path",{fill:"currentColor",d:"M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"})),m.facebook=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"facebook-f",className:"svg-inline--fa fa-facebook-f fa-w-9",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 264 512"},React.createElement("path",{fill:"currentColor",d:"M76.7 512V283H0v-91h76.7v-71.7C76.7 42.4 124.3 0 193.8 0c33.3 0 61.9 2.5 70.2 3.6V85h-48.2c-37.8 0-45.1 18-45.1 44.3V192H256l-11.7 91h-73.6v229"})),m.whatsapp=React.createElement("svg",{"aria-hidden":"true",focusable:"false",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 1536 1600"},React.createElement("path",{d:"M985 878q13 0 97.5 44t89.5 53q2 5 2 15q0 33-17 76q-16 39-71 65.5T984 1158q-57 0-190-62q-98-45-170-118T476 793q-72-107-71-194v-8q3-91 74-158q24-22 52-22q6 0 18 1.5t19 1.5q19 0 26.5 6.5T610 448q8 20 33 88t25 75q0 21-34.5 57.5T599 715q0 7 5 15q34 73 102 137q56 53 151 101q12 7 22 7q15 0 54-48.5t52-48.5zm-203 530q127 0 243.5-50t200.5-134t134-200.5t50-243.5t-50-243.5T1226 336t-200.5-134T782 152t-243.5 50T338 336T204 536.5T154 780q0 203 120 368l-79 233l242-77q158 104 345 104zm0-1382q153 0 292.5 60T1315 247t161 240.5t60 292.5t-60 292.5t-161 240.5t-240.5 161t-292.5 60q-195 0-365-94L0 1574l136-405Q28 991 28 780q0-153 60-292.5T249 247T489.5 86T782 26z",fill:"currentColor"})),m.pinterest=React.createElement("svg",{"aria-hidden":"true","data-prefix":"fab","data-icon":"pinterest-p",className:"svg-inline--fa fa-pinterest-p fa-w-12",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},React.createElement("path",{fill:"currentColor",d:"M204 6.5C101.4 6.5 0 74.9 0 185.6 0 256 39.6 296 63.6 296c9.9 0 15.6-27.6 15.6-35.4 0-9.3-23.7-29.1-23.7-67.8 0-80.4 61.2-137.4 140.4-137.4 68.1 0 118.5 38.7 118.5 109.8 0 53.1-21.3 152.7-90.3 152.7-24.9 0-46.2-18-46.2-43.8 0-37.8 26.4-74.4 26.4-113.4 0-66.2-93.9-54.2-93.9 25.8 0 16.8 2.1 35.4 9.6 50.7-13.8 59.4-42 147.9-42 209.1 0 18.9 2.7 37.5 4.5 56.4 3.4 3.8 1.7 3.4 6.9 1.5 50.4-69 48.6-82.5 71.4-172.8 12.3 23.4 44.1 36 69.3 36 106.2 0 153.9-103.5 153.9-196.8C384 71.3 298.2 6.5 204 6.5z"})),m.linkedin=React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":"fab","data-icon":"linkedin-in",className:"svg-inline--fa fa-linkedin-in fa-w-14",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512"},React.createElement("path",{fill:"currentColor",d:"M100.28 448H7.4V148.9h92.88zM53.79 108.1C24.09 108.1 0 83.5 0 53.8a53.79 53.79 0 0 1 107.58 0c0 29.7-24.1 54.3-53.79 54.3zM447.9 448h-92.68V302.4c0-34.7-.7-79.2-48.29-79.2-48.29 0-55.69 37.7-55.69 76.7V448h-92.78V148.9h89.08v40.8h1.3c12.4-23.5 42.69-48.3 87.88-48.3 94 0 111.28 61.9 111.28 142.3V448z"})),m.email=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},React.createElement("path",{d:"M0 3v18h24v-18h-24zm6.623 7.929l-4.623 5.712v-9.458l4.623 3.746zm-4.141-5.929h19.035l-9.517 7.713-9.518-7.713zm5.694 7.188l3.824 3.099 3.83-3.104 5.612 6.817h-18.779l5.513-6.812zm9.208-1.264l4.616-3.741v9.348l-4.616-5.607z",fill:"currentColor"})),m.chevronRightFancy=React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",className:"bi bi-chevron-right",viewBox:"0 0 16 16"},React.createElement("path",{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}));var g=m,f=wp.element.Fragment,p=function(t){var e=t.settings,a=t.img,n=t.hideTitle,l=t.hideDescription,c=t.hideSocial;return[React.createElement(f,null,["tilt_1","tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--shine"},React.createElement("div",null)),["tilt_3","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--overlay"}),["tilt_1","tilt_7"].includes(e.effect)&&React.createElement("div",{className:"tilter__deco tilter__deco--lines"}),React.createElement("div",{className:"figc"},React.createElement("div",{className:"figc-inner"},"0"==e.hide_title&&!n&&React.createElement("div",{className:"jtg-title"}," ",a.title," "),React.createElement("div",{className:["lily","sadie","ruby","bubba","dexter","chico","ming"].includes(e.effect)?"jtg-body":""},"0"==e.hide_description&&!l&&React.createElement("p",{className:"description"}," ",0!=a.description.length&&a.description," "),!c&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",g.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",g.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",g.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",g.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",g.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",g.email," "))))))]},h=wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=e.settings,n=e.effectCheck,l=t.img,c=t.index;return[React.createElement("div",{className:"modula-item effect-".concat(a.effect),"data-width":l["data-width"]?l["data-width"]:"2","data-height":l["data-height"]?l["data-height"]:"2"},React.createElement("div",{className:"modula-item-overlay"}),React.createElement("div",{className:"modula-item-content"},React.createElement("img",{className:"modula-image pic","data-id":l.id,"data-full":l.src,"data-src":l.src,"data-valign":"middle","data-halign":"center",src:l.src}),"slider"!==a.type&&React.createElement(p,{settings:a,img:l,index:c,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]})),v=function(t){var e=t.id,a=t.settings,n="";"grid"==a.type&&"automatic"!=a.grid_type&&(n+="#jtg-".concat(e,".modula-gallery .modula-item, .modula-gallery .modula-grid-sizer { width: calc(").concat(100/a.grid_type,"% - ").concat(a.gutter-a.gutter/a.grid_type,"px) !important}")),"0"!=a.borderSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder: ").concat(a.borderSize,"px solid ").concat(a.borderColor,";\n\t\t}")),"0"!=a.borderRadius&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tborder-radius: ").concat(a.borderRadius,"px;\n\t\t}")),"0"!=a.shadowSize&&(n+="#jtg-".concat(e," .modula-item {\n\t\t\tbox-shadow: ").concat(a.shadowColor," 0px 0px ").concat(a.shadowSize,"px;\n\t\t}")),"#ffffff"!=a.socialIconColor&&(n+="#jtg-".concat(e," .modula-item .jtg-social a {\n\t\t\tcolor: ").concat(a.socialIconColor,";\n\t\t}")),"16"!=a.socialIconSize&&(n+="#jtg-".concat(e," .modula-item .jtg-social svg {\n\t\t\theight: ").concat(a.socialIconSize,"px;\n\t\t\twidth: ").concat(a.socialIconSize,"px;\n\t\t}")),"10"!=a.socialIconPadding&&(n+="#jtg-".concat(e," .modula-item .jtg-social a:not(:last-child) {\n\t\t\tmargin-right: ").concat(a.socialIconPadding,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-item .caption {\n\t\tbackground-color: ").concat(a.captionColor,";\n\t}"),""!=a.captionColor&&(n+="#jtg-".concat(e," .modula-item .figc {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}")),""!=a.titleFontSize&&"0"!=a.titleFontSize&&(n+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.titleFontSize,"px;\n\t\t}")),""!=a.captionFontSize&&"0"!=a.captionFontSize&&(n+="#jtg-".concat(e," .modula-item .figc p.description {\n\t\t\tfont-size: ").concat(a.captionFontSize,"px;\n\t\t}")),n+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t}"),""!=a.titleColor?n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.titleColor,";\n\t\t}"):n+="#jtg-".concat(e," .modula-items .figc .jtg-title {\n\t\t\tcolor: ").concat(a.captionColor,";\n\t\t}"),n+="#jtg-".concat(e,".modula-gallery .modula-item > a, #jtg-").concat(e,".modula-gallery .modula-item, #jtg-").concat(e,".modula-gallery .modula-item-content > a {\n\t\tcursor: ").concat(a.cursor,";\n\t}"),"custom-grid"==a.type&&"slider"==a.type||(n+="#jtg-".concat(e," {\n\t\twidth: ").concat(a.width,";\n\t\tmargin : 0 auto;\n\t\t}"),0==t.imagesCount?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: 100px;\n\t\t\t}"):"grid"!=a.type&&"slider"!=a.type?n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: ").concat(a.height,"px;\n\t\t\t}"):"slider"==a.type&&(n+="#jtg-".concat(e," .modula-items {\n\t\t\t\theight: auto;\n\t\t\t}"))),null!=a.style&&0!=a.style.length&&(n+="".concat(a.style));var l="";return""!=a.mobileTitleFontSize&&0!=a.mobileTitleFontSize&&(l+="#jtg-".concat(e," .modula-item .figc .jtg-title {\n\t\t\tfont-size: ").concat(a.mobileTitleFontSize,"px\n\t\t}")),l+="#jtg-".concat(e," .modula-items .figc p.description {\n\t\tcolor: ").concat(a.captionColor,";\n\t\tfont-size: ").concat(a.mobileCaptionFontSize,"px;\n\t}"),n+="@media screen and (max-width:480px){\n\t\t".concat(l,"\n\t\t}"),"none"==a.effect&&(n+="#jtg-".concat(e," .modula-items .modula-item:hover img {\n\t\t\topacity: 1;\n\t\t}")),n+="#jtg-".concat(e,".modula .modula-items .modula-item .modula-item-overlay, #jtg-").concat(e,".modula .modula-items .modula-item.effect-layla, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ruby, #jtg-").concat(e,".modula .modula-items .modula-item.effect-bubba, #jtg-").concat(e,".modula .modula-items .modula-item.effect-sarah, #jtg-").concat(e,".modula .modula-items .modula-item.effect-milo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-julia, #jtg-").concat(e,".modula .modula-items .modula-item.effect-hera, #jtg-").concat(e,".modula .modula-items .modula-item.effect-winston, #jtg-").concat(e,".modula .modula-items .modula-item.effect-selena, #jtg-").concat(e,".modula .modula-items .modula-item.effect-terry, #jtg-").concat(e,".modula .modula-items .modula-item.effect-phoebe, #jtg-").concat(e,".modula .modula-items} .modula-item.effect-apollo, #jtg-").concat(e,".modula .modula-items .modula-item.effect-steve, #jtg-").concat(e,".modula .modula-items .modula-item.effect-ming{ \n\t\tbackground-color: ").concat(a.hoverColor,";\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-oscar {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #9b4a1b 40%, ").concat(a.hoverColor," 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-roxy {\n\t\tbackground: -webkit-linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t\tbackground: linear-gradient(45deg, ").concat(a.hoverColor," 0, #05abe0 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-dexter {\n\t\tbackground: -webkit-linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t\tbackground: linear-gradient(top, ").concat(a.hoverColor," 0, rgba(104,60,19,1) 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-jazz {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #f33f58 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-lexi {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #fff 100%);\n\t}"),n+="#jtg-".concat(e,".modula .modula-items .modula-item.effect-duke {\n\t\tbackground: -webkit-linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t\tbackground: linear-gradient(-45deg, ").concat(a.hoverColor," 0, #cc6055 100%);\n\t}"),a.hoverOpacity<=100&&"none"!=a.effect&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item:hover img {\n\t\t\topacity: ").concat(1-a.hoverOpacity/100," ;\n\t\t}")),"default"!=a.titleFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item .jtg-title {\n\t\t\tfont-weight : ").concat(a.titleFontWeight,";\n\t\t}")),"default"!=a.captionFontWeight&&(n+="#jtg-".concat(e,".modula .modula-items .modula-item p.description {\n\t\t\tfont-weight : ").concat(a.captionFontWeight,";\n\t\t}")),n+="#jtg-".concat(e,".modula-gallery .modula-item.effect-terry .jtg-social a:not(:last-child) {\n\t\tmargin-bottom: ").concat(a.socialIconPadding,"px;\n\t}"),"slider"==a.type&&("true"==jQuery("[aria-label=Settings]").attr("aria-expanded")?n+="#jtg-".concat(e," {\n\t\t\t\t\twidth: 800px;\n\t\t\t\t\t}"):n+="#jtg-".concat(e," {\n\t\t\twidth: 1100px;\n\t\t\t}"),n+="#jtg-".concat(e," .modula-items {\n\t\theight: auto;\n\t\t}"),n+="#jtg-".concat(e," .modula-item {\n\t\tbackground-color: transparent;\n\t\ttransform: none;\n\t\t}")),null!=a.filters&&a.filters.length>1&&(n+="#jtg-".concat(e,".modula-gallery .filters {\n\t\t\ttext-align: ").concat(a.filterTextAlignment,";\n\t\t}")),React.createElement("style",{dangerouslySetInnerHTML:{__html:"\n \t\t\t\t".concat(n,"\n \t\t\t\t")}})},y=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function b(){return(b=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}var w=wp.element,j=w.Fragment,E=w.useEffect,R=wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,c=t.settings,o=t.checkHoverEffect,i=t.modulaRun,r=t.modulaSlickRun;E((function(){void 0!==c&&o(c.effect),"slider"!==c.type?i(n):r(l)}),[]);var d="modula modula-gallery ",u="modula-items";return"creative-gallery"==c.type?d+="modula-creative-gallery":"custom-grid"==c.type?d+="modula-custom-grid":"slider"==c.type?d="modula-slider":(d+="modula-columns",u+=" grid-gallery","automatic"==c.grid_type&&(u+=" justified-gallery")),[React.createElement(j,null,React.createElement(v,{id:l,settings:c}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":JSON.stringify(n)},"grid"==c.type&&"automatic"!=c.grid_type&&React.createElement("div",{className:"modula-grid-sizer"}," "),React.createElement(y,b({},t,{position:"top"})),React.createElement("div",{className:u},a.length>0&&React.createElement(j,null,React.createElement(j,null,a.map((function(e,a){return[React.createElement(h,b({},t,{img:e,key:a,index:a}))]}))))),React.createElement(y,b({},t,{position:"bottom"}))))]}));function k(){return(k=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])}return t}).apply(this,arguments)}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var a=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==a)return;var n,l,c=[],o=!0,i=!1;try{for(a=a.call(t);!(o=(n=a.next()).done)&&(c.push(n.value),!e||c.length!==e);o=!0);}catch(t){i=!0,l=t}finally{try{o||null==a.return||a.return()}finally{if(i)throw l}}return c}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return _(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a<e;a++)n[a]=t[a];return n}var C=wp.i18n.__,z=wp.element,S=z.Fragment,N=z.useEffect,T=z.useState,M=wp.data.withSelect,F=wp.components,I=F.Button,O=F.Spinner,q=F.ToolbarGroup,V=F.ToolbarItem,B=wp.blockEditor.BlockControls,L=(0,wp.compose.compose)(M((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:5})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,c=e.id,o=e.images,i=e.status,r=e.settings,d=e.jsConfig,u=e.galleryId,m=(e.currentGallery,e.currentSelectize),f=x(T(t.attributes.align),2),p=(f[0],f[1],x(T(c),2)),h=p[0];p[1];N((function(){0!==c&&v(c)}),[]),N((function(){jQuery(document).on("modula_api_after_init",(function(e,a){t.setAttributes({instance:a})})),null!=t.attributes.instance&&null!=r&&"grid"==r.type&&t.attributes.instance.reset(t.attributes.instance)}));var v=function(t){isNaN(t)||""==t||(t=parseInt(t),wp.apiFetch({path:"wp/v2/modula-gallery/".concat(t)}).then((function(e){n({currentGallery:e}),n({currentSelectize:[{value:t,label:""===e.title.rendered?"Unnamed":e.title.rendered}]}),jQuery.ajax({type:"POST",data:{action:"modula_get_gallery_meta",id:t,nonce:modulaVars.nonce},url:modulaVars.ajaxURL,success:function(e){return y(t,e)}})})))},y=function(t,e){!1!==e.success?(h==t&&null!=r||b(t),n({id:t,images:e,status:"ready"})):n({id:t,status:"ready"})},b=function(t){fetch("".concat(modulaVars.restURL,"wp/v2/modula-gallery/").concat(t)).then((function(t){return t.json()})).then((function(t){var e=t;n({status:"loading"}),jQuery.ajax({type:"POST",data:{action:"modula_get_jsconfig",nonce:modulaVars.nonce,settings:e.modulaSettings},url:modulaVars.ajaxURL,success:function(t){var a=Math.floor(999*Math.random());n({galleryId:a,settings:e.modulaSettings,jsConfig:t,status:"ready"})}})}))},w=React.createElement(B,null,o&&o.length>0&&React.createElement(q,null,React.createElement(V,null,React.createElement(I,{label:C("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+c+"&action=edit",target:"_blank"}))));return 0==c&&"none"===e.galleryType?React.createElement(S,null,React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement("div",{className:"modula-button-group"},0==a.length&&React.createElement("p",null," ",C("Sorry no galleries found","modula-best-grid-gallery")," "),a.length>0&&React.createElement(I,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},C("Display An Existing Gallery","modula-best-grid-gallery"),g.chevronRightFancy),null==t.attributes.proInstalled&&a.length>0&&React.createElement(I,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},C("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery")))))):"loading"===i?React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),React.createElement(O,null))):0==c||0===o.length?React.createElement(S,{key:"233"},React.createElement(s,k({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:C("select a gallery","modula-best-grid-gallery")}];return a.forEach((function(e){var a=e.title,n=e.id;0==a.rendered.length?t.push({value:n,label:C("Unnamed Gallery","modula-best-grid-gallery")+n}):t.push({value:n,label:a.rendered})})),t}},t)),React.createElement("div",{className:"modula-block-preview"},React.createElement("div",{className:"modula-block-preview__content"},React.createElement("div",{className:"modula-block-preview__logo"}),a.length>0&&React.createElement(S,null,React.createElement(l,{id:c,key:c,value:c,options:m,onIdChange:v,galleries:a}),0!=c&&React.createElement(I,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+c+"&action=edit",isPrimary:!0},C("Edit Gallery")))))):r?React.createElement(S,{key:"1"},w,React.createElement(s,k({onIdChange:function(t){v(t)}},t)),React.createElement(R,k({},t,{settings:r,jsConfig:d,modulaRun:function(t){if(null!=t){n({status:"ready"});var e=jQuery(".modula.modula-gallery");jQuery.each(e,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config");t.lazyLoad=0,jQuery(this).modulaGallery(t)}))}},modulaSlickRun:function(t){if(t="jtg-".concat(t),n({status:"ready"}),jQuery(".modula-slider").length>0&&void 0!==jQuery.fn.slick){var e=jQuery("#".concat(t)).data("config"),a=jQuery("#".concat(t)).find(".modula-slider-nav"),l=jQuery("#".concat(t)).find(".modula-items");if(l.slick(e.slider_settings),a.length){var c=a.data("config"),o=l.slick("slickCurrentSlide");a.on("init",(function(t,e){a.find('.slick-slide[data-slick-index="'+o+'"]').addClass("is-active")})),a.slick(c),l.on("afterChange",(function(t,e,n){a.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';a.find(".slick-slide.is-active").removeClass("is-active"),a.find(l).addClass("is-active")})),a.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");l.slick("slickGoTo",e)}))}}},checkHoverEffect:function(t){jQuery.ajax({type:"POST",data:{action:"modula_check_hover_effect",nonce:modulaVars.nonce,effect:t},url:modulaVars.ajaxURL,success:function(t){n({effectCheck:t})}})},galleryId:u}))):null}));function P(t,e){for(var a=0;a<e.length;a++){var n=e[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Q=wp.i18n.__,A=wp.blocks.registerBlockType;new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.registerBlock()}var e,a,n;return e=t,(a=[{key:"registerBlock",value:function(){this.blockName="modula/gallery",this.blockAttributes={id:{type:"number",default:0},images:{type:"array",default:[]},status:{type:"string",default:"ready"},galleryId:{type:"number",default:0},defaultSettings:{type:"object",default:[]},galleryType:{type:"string",default:"none"},currentGallery:{type:"object",default:{}},currentSelectize:{type:"array",default:[]}},A(this.blockName,{title:modulaVars.gutenbergTitle,icon:g.modula,description:Q("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[Q("gallery"),Q("modula"),Q("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:L,save:function(){return null}})}}])&&P(e.prototype,a),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}())}]);
assets/src/js/components/ModulaGallery.js CHANGED
@@ -44,14 +44,14 @@ export const ModulaGallery = (props) => {
44
  : ''}`}
45
  data-config={JSON.stringify(jsConfig)}
46
  >
47
- {settings.type == 'grid' && 'automatic' != settings.grid_type && <div class="modula-grid-sizer"> </div>}
48
  <ModulaItemsExtraComponent {...props} position={'top'} />
49
  <div className={itemsClassNames}>
50
  {images.length > 0 && (
51
  <Fragment>
52
  <Fragment>
53
  {images.map((img, index) => {
54
- return [ <ModulaGalleryImage {...props} img={img} index={index} /> ];
55
  })}
56
  </Fragment>
57
  </Fragment>
44
  : ''}`}
45
  data-config={JSON.stringify(jsConfig)}
46
  >
47
+ {settings.type == 'grid' && 'automatic' != settings.grid_type && <div className="modula-grid-sizer"> </div>}
48
  <ModulaItemsExtraComponent {...props} position={'top'} />
49
  <div className={itemsClassNames}>
50
  {images.length > 0 && (
51
  <Fragment>
52
  <Fragment>
53
  {images.map((img, index) => {
54
+ return [ <ModulaGalleryImage {...props} img={img} key={index} index={index} /> ];
55
  })}
56
  </Fragment>
57
  </Fragment>
assets/src/js/components/ModulaGalleryImageInner.js CHANGED
@@ -12,13 +12,13 @@ const ModulaGalleryImageInner = (props) => {
12
  return [
13
  <Fragment>
14
  {effectArray.includes(settings.effect) && (
15
- <div class="tilter__deco tilter__deco--shine">
16
  <div />
17
  </div>
18
  )}
19
- {overlayArray.includes(settings.effect) && <div class="tilter__deco tilter__deco--overlay" />}
20
 
21
- {svgArray.includes(settings.effect) && <div class="tilter__deco tilter__deco--lines" />}
22
 
23
  <div className="figc">
24
  <div className="figc-inner">
12
  return [
13
  <Fragment>
14
  {effectArray.includes(settings.effect) && (
15
+ <div className="tilter__deco tilter__deco--shine">
16
  <div />
17
  </div>
18
  )}
19
+ {overlayArray.includes(settings.effect) && <div className="tilter__deco tilter__deco--overlay" />}
20
 
21
+ {svgArray.includes(settings.effect) && <div className="tilter__deco tilter__deco--lines" />}
22
 
23
  <div className="figc">
24
  <div className="figc-inner">
assets/src/js/components/ModulaGallerySearch.js CHANGED
@@ -28,9 +28,9 @@ export const ModulaGallerySearch = (props) => {
28
  option: function(item, escape) {
29
  return (
30
  '<div>' +
31
- '<span class="title">' +
32
  escape(item.label) +
33
- '<span class="name">( #' +
34
  escape(item.value) +
35
  ' )</span>' +
36
  '</div>'
@@ -61,7 +61,7 @@ export const ModulaGallerySearch = (props) => {
61
  });
62
  }, []);
63
 
64
- return <input className="modula-gallery-input" value={'0' == id ? '' : id} />;
65
  };
66
 
67
  export default ModulaGallerySearch;
28
  option: function(item, escape) {
29
  return (
30
  '<div>' +
31
+ '<span className="title">' +
32
  escape(item.label) +
33
+ '<span className="name">( #' +
34
  escape(item.value) +
35
  ' )</span>' +
36
  '</div>'
61
  });
62
  }, []);
63
 
64
+ return <input className="modula-gallery-input" defaultValue={'0' == id ? '' : id} />;
65
  };
66
 
67
  export default ModulaGallerySearch;
assets/src/js/components/edit.js CHANGED
@@ -246,7 +246,7 @@ export const ModulaEdit = (props) => {
246
  );
247
 
248
  if (id == 0 && 'none' === attributes.galleryType) {
249
- return [
250
  <Fragment>
251
  <div className="modula-block-preview">
252
  <div className="modula-block-preview__content">
@@ -297,26 +297,24 @@ export const ModulaEdit = (props) => {
297
  </div>
298
  </div>
299
  </div>
300
- </Fragment>,
301
- ];
302
  }
303
 
304
  if (status === 'loading') {
305
- return [
306
- <Fragment>
307
  <div className="modula-block-preview">
308
  <div className="modula-block-preview__content">
309
  <div className="modula-block-preview__logo" />
310
  <Spinner />
311
  </div>
312
  </div>
313
- </Fragment>,
314
- ];
315
  }
316
 
317
  if (id == 0 || images.length === 0) {
318
- return [
319
- <Fragment>
320
  <Inspector
321
  onIdChange={(id) => onIdChange(id)}
322
  selectOptions={selectOptions}
@@ -355,12 +353,12 @@ export const ModulaEdit = (props) => {
355
  )}
356
  </div>
357
  </div>
358
- </Fragment>,
359
- ];
360
  }
361
  if (settings) {
362
- return [
363
- <Fragment>
364
  {blockControls}
365
  <Inspector
366
  onIdChange={(id) => {
@@ -377,8 +375,8 @@ export const ModulaEdit = (props) => {
377
  checkHoverEffect={checkHoverEffect}
378
  galleryId={galleryId}
379
  />
380
- </Fragment>,
381
- ];
382
  }
383
 
384
  return null;
246
  );
247
 
248
  if (id == 0 && 'none' === attributes.galleryType) {
249
+ return (
250
  <Fragment>
251
  <div className="modula-block-preview">
252
  <div className="modula-block-preview__content">
297
  </div>
298
  </div>
299
  </div>
300
+ </Fragment>
301
+ )
302
  }
303
 
304
  if (status === 'loading') {
305
+ return (
 
306
  <div className="modula-block-preview">
307
  <div className="modula-block-preview__content">
308
  <div className="modula-block-preview__logo" />
309
  <Spinner />
310
  </div>
311
  </div>
312
+ );
 
313
  }
314
 
315
  if (id == 0 || images.length === 0) {
316
+ return (
317
+ <Fragment key="233">
318
  <Inspector
319
  onIdChange={(id) => onIdChange(id)}
320
  selectOptions={selectOptions}
353
  )}
354
  </div>
355
  </div>
356
+ </Fragment>
357
+ );
358
  }
359
  if (settings) {
360
+ return (
361
+ <Fragment key="1">
362
  {blockControls}
363
  <Inspector
364
  onIdChange={(id) => {
375
  checkHoverEffect={checkHoverEffect}
376
  galleryId={galleryId}
377
  />
378
+ </Fragment>
379
+ );
380
  }
381
 
382
  return null;
assets/src/js/utils/icons.js CHANGED
@@ -81,7 +81,7 @@ icons.twitter = (
81
  aria-hidden="true"
82
  data-prefix="fab"
83
  data-icon="twitter"
84
- class="svg-inline--fa fa-twitter fa-w-16"
85
  role="img"
86
  xmlns="http://www.w3.org/2000/svg"
87
  viewBox="0 0 512 512"
@@ -98,7 +98,7 @@ icons.facebook = (
98
  aria-hidden="true"
99
  data-prefix="fab"
100
  data-icon="facebook-f"
101
- class="svg-inline--fa fa-facebook-f fa-w-9"
102
  role="img"
103
  xmlns="http://www.w3.org/2000/svg"
104
  viewBox="0 0 264 512"
@@ -124,7 +124,7 @@ icons.pinterest = (
124
  aria-hidden="true"
125
  data-prefix="fab"
126
  data-icon="pinterest-p"
127
- class="svg-inline--fa fa-pinterest-p fa-w-12"
128
  role="img"
129
  xmlns="http://www.w3.org/2000/svg"
130
  viewBox="0 0 384 512"
@@ -142,7 +142,7 @@ icons.linkedin = (
142
  focusable="false"
143
  data-prefix="fab"
144
  data-icon="linkedin-in"
145
- class="svg-inline--fa fa-linkedin-in fa-w-14"
146
  role="img"
147
  xmlns="http://www.w3.org/2000/svg"
148
  viewBox="0 0 448 512"
@@ -169,11 +169,11 @@ icons.chevronRightFancy = (
169
  width="16"
170
  height="16"
171
  fill="currentColor"
172
- class="bi bi-chevron-right"
173
  viewBox="0 0 16 16"
174
  >
175
  <path
176
- fill-rule="evenodd"
177
  d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
178
  />
179
  </svg>
81
  aria-hidden="true"
82
  data-prefix="fab"
83
  data-icon="twitter"
84
+ className="svg-inline--fa fa-twitter fa-w-16"
85
  role="img"
86
  xmlns="http://www.w3.org/2000/svg"
87
  viewBox="0 0 512 512"
98
  aria-hidden="true"
99
  data-prefix="fab"
100
  data-icon="facebook-f"
101
+ className="svg-inline--fa fa-facebook-f fa-w-9"
102
  role="img"
103
  xmlns="http://www.w3.org/2000/svg"
104
  viewBox="0 0 264 512"
124
  aria-hidden="true"
125
  data-prefix="fab"
126
  data-icon="pinterest-p"
127
+ className="svg-inline--fa fa-pinterest-p fa-w-12"
128
  role="img"
129
  xmlns="http://www.w3.org/2000/svg"
130
  viewBox="0 0 384 512"
142
  focusable="false"
143
  data-prefix="fab"
144
  data-icon="linkedin-in"
145
+ className="svg-inline--fa fa-linkedin-in fa-w-14"
146
  role="img"
147
  xmlns="http://www.w3.org/2000/svg"
148
  viewBox="0 0 448 512"
169
  width="16"
170
  height="16"
171
  fill="currentColor"
172
+ className="bi bi-chevron-right"
173
  viewBox="0 0 16 16"
174
  >
175
  <path
176
+ fillRule="evenodd"
177
  d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"
178
  />
179
  </svg>
changelog.txt CHANGED
@@ -1,3 +1,10 @@
 
 
 
 
 
 
 
1
  = 2.6.2 - 22/02/2022 =
2
  Fixed: Mime type giving error if no file_path - https://github.com/WPChill/modula-lite/issues/632
3
  Fixed: Gallery width when using Full Site Editing - https://github.com/WPChill/modula-lite/issues/601
1
+ = 2.6.3 - 21/02/2022 =
2
+ Fixed: Sanitization and preparation for WP Core galleries import ( https://github.com/WPChill/modula-lite/issues/625 )
3
+ Fixed: Metaboxes forever opened and arrows hidden ( https://github.com/WPChill/modula-lite/issues/639 )
4
+ Fixed: Custom Posts Gutenberg block - now available everywhere Gutenberg is ( https://github.com/WPChill/modula-lite/issues/626 )
5
+ Fixed: React warnings ( https://github.com/WPChill/modula-lite/issues/628 )
6
+ Fixed: Blank links in accesibility reports ( https://github.com/WPChill/modula-lite/issues/640 )
7
+
8
  = 2.6.2 - 22/02/2022 =
9
  Fixed: Mime type giving error if no file_path - https://github.com/WPChill/modula-lite/issues/632
10
  Fixed: Gallery width when using Full Site Editing - https://github.com/WPChill/modula-lite/issues/601
includes/admin/class-modula-addons.php CHANGED
@@ -9,9 +9,41 @@ class Modula_Addons {
9
  function __construct() {
10
  // Add ajax action to reload extensions
11
  add_action( 'wp_ajax_modula_reload_extensions', array( $this, 'reload_extensions' ), 20 );
 
12
 
13
  // Add free
14
- $this->free_addons = apply_filters( 'modula_free_extensions', array() );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
 
17
  private function check_for_addons() {
@@ -57,40 +89,13 @@ class Modula_Addons {
57
  if ( ! empty( $addons ) ) {
58
  foreach ( $addons as $addon ) {
59
 
60
- if( ! function_exists( 'get_plugin_data' ) ) {
61
- require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
62
- }
63
-
64
- $plugin_data = false;
65
-
66
- if(file_exists(WP_PLUGIN_DIR .'/' . $addon['slug'] . '/' . $addon['slug'] . '.php') ){
67
- $plugin_data = get_plugin_data( WP_PLUGIN_DIR .'/' . $addon['slug'] . '/' . $addon['slug'] . '.php' );
68
- }
69
-
70
- $image = ( in_array( $addon[ 'slug' ], $addons_images ) ) ? MODULA_URL . 'assets/images/addons/' . $addon[ 'slug' ] . '.png' : MODULA_URL . 'assets/images/modula-logo.jpg';
71
- echo '<div class="modula-addon">';
72
- echo '<div class="modula-addon-box">';
73
-
74
- if ( !isset( $addon['image'] ) || '' == $addon['image'] ){
75
- echo '<div><img src="' . esc_url( apply_filters( 'modula_admin_default_addon_image', esc_attr( $image ) ) ) . '"></div>';
76
- } else {
77
- echo '<div><img src="' . esc_url( $addon['image'] ) . '"></div>';
78
- }
79
-
80
- echo '<div class="modula-addon-content">';
81
- echo '<h3>' . esc_html( $addon['name'] ) . '</h3>';
82
- echo ( isset( $addon['version'] ) ) ? '<span class="modula-addon-version">' . esc_html( 'V ' . $addon['version'] ) . '</span>' : '';
83
- echo '<div class="modula-addon-description">' . wp_kses_post( $addon['description'] ) . '</div>';
84
- echo '</div>';
85
- echo '</div>';
86
- // echo '<div class="modula-addon-info">';
87
- // do_action('modula_addon_info',$addon, $plugin_data);
88
- // echo ( isset( $addon['url'] ) && '' != $addon['url'] ) ? '<a href="' . esc_url( $addon['url'] ) . '" target="_blank" >' . esc_html( 'Read more ' ) . '</a>' : '';
89
- // echo '</div>';
90
  echo '<div class="modula-addon-actions">';
 
91
  echo apply_filters( 'modula_addon_settings_link','', $addon );
92
  echo apply_filters( "modula_addon_button_action", '<a href="' . esc_url( MODULA_PRO_STORE_UPGRADE_URL . '/?utm_source=modula-lite&utm_campaign=extensions-page&utm_medium='. esc_attr( $addon['slug'] ) ).'" target="_blank" class="button primary-button">' . esc_html__( 'Upgrade to unlock this feature', 'modula-best-grid-gallery' ) . '</a>', $addon );
93
- echo '</div>';
 
94
  echo '</div>';
95
 
96
 
@@ -105,15 +110,6 @@ class Modula_Addons {
105
  */
106
  public function render_free_addons() {
107
 
108
- // Addon Images
109
- $addons_images = array(
110
- 'modula-envira-migrator',
111
- 'modula-foo-migrator',
112
- 'modula-nextgen-migrator',
113
- 'modula-ftg-migrator',
114
- 'modula-photoblocks-migrator'
115
- );
116
-
117
  if ( ! empty( $this->free_addons ) ) {
118
 
119
  foreach ( $this->free_addons as $addon ) {
@@ -121,6 +117,14 @@ class Modula_Addons {
121
  $slug = $addon['slug'];
122
  $plugin_path = $slug . '/' . $slug . '.php';
123
 
 
 
 
 
 
 
 
 
124
  $activate_url = add_query_arg(
125
  array(
126
  'action' => 'activate',
@@ -157,37 +161,21 @@ class Modula_Addons {
157
  $action = 'installed';
158
  }
159
 
160
- $image = ( in_array( $slug, $addons_images ) ) ? MODULA_URL . 'assets/images/addons/' . $slug . '.png' : MODULA_URL . 'assets/images/modula-logo.jpg';
161
-
162
- echo '<div class="modula-addon">';
163
- echo '<div class="modula-addon-box">';
164
-
165
- if ( ! isset( $addon['image'] ) || '' === $addon['image'] ) {
166
- echo '<div><img src="' . esc_url( apply_filters( 'modula_admin_default_addon_image', esc_attr( $image ) ) ) . '" alt="' . esc_attr( $addon['name'] ) . '"></div>';
167
- } else {
168
- echo '<div><img src="' . esc_url( $addon['image'] ) . '" alt="' . esc_attr( $addon['name'] ) . '"></div>';
169
- }
170
 
171
- $link = '<div class="modula-toggle">';
172
- $link .= '<input class="modula-toggle__input" type="checkbox" name="modula-free-addons" data-action="' . esc_attr( $action ) . '" data-activateurl="' . esc_url( $activate_url ) . '" data-deactivateurl="' . esc_url( $deactivate_url ) . '" value="1" data-slug="' . esc_attr( $slug ) . '" ' . checked( 'installed', $action, false ) . '>';
173
- $link .= '<div class="modula-toggle__items">';
174
- $link .= '<span class="modula-toggle__track"></span>';
175
- $link .= '<span class="modula-toggle__thumb"></span>';
176
- $link .= '<svg class="modula-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>';
177
- $link .= '<svg class="modula-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>';
178
- $link .= '</div>';
179
- $link .= '</div>';
180
- $link .= '<span class="modula-action-texts"></span>';
181
-
182
- echo '<div class="modula-addon-content">';
183
- echo '<h3>' . esc_html( $addon['name'] ) . '</h3>';
184
- echo '<div class="modula-addon-description">' . wp_kses_post( $addon['description'] ) . '</div>';
185
  echo '</div>';
186
  echo '</div>';
 
187
 
188
- echo '<div class="modula-free-addon-actions">';
189
- echo $link;
190
- echo '</div>';
191
  echo '</div>';
192
  }
193
 
@@ -222,6 +210,50 @@ class Modula_Addons {
222
  return !empty( $this->free_addons );
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  }
226
 
227
  $addons = new Modula_Addons();
9
  function __construct() {
10
  // Add ajax action to reload extensions
11
  add_action( 'wp_ajax_modula_reload_extensions', array( $this, 'reload_extensions' ), 20 );
12
+ add_filter( 'modula_free_extensions', array( $this, 'check_for_release' ), 999 );
13
 
14
  // Add free
15
+ $this->free_addons = apply_filters( 'modula_free_extensions', array(
16
+ 'modula-foo-migrator' => array(
17
+ 'slug' => 'modula-foo-migrator',
18
+ 'name' => __( 'Migrate away from FooGallery', 'modula-best-grid-gallery' ),
19
+ 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
20
+ 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery')
21
+ ),
22
+ 'modula-nextgen-migrator' => array(
23
+ 'slug' => 'modula-nextgen-migrator',
24
+ 'name' => __( 'Migrate away from NextGEN', 'modula-best-grid-gallery' ),
25
+ 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
26
+ 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery')
27
+ ),
28
+ /* 'modula-envira-migrator' => array(
29
+ 'slug' => 'modula-envira-migrator',
30
+ 'name' => __( 'Migrate away from Envira', 'modula-best-grid-gallery' ),
31
+ 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
32
+ 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery')
33
+ ),
34
+ 'modula-photoblocks-migrator' => array(
35
+ 'slug' => 'modula-photoblocks-migrator',
36
+ 'name' => __( 'Migrate away from PhotoBlocks', 'modula-best-grid-gallery' ),
37
+ 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
38
+ 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery')
39
+ ),
40
+ 'modula-final-tiles-migrator' => array(
41
+ 'slug' => 'modula-final-tiles-migrator',
42
+ 'name' => __( 'Migrate away from Final Tiles', 'modula-best-grid-gallery' ),
43
+ 'image' => 'https://wp-modula.com/wp-content/uploads/edd/2021/04/069-refresh.png',
44
+ 'description' => esc_html__('Want to change your gallery plugin and impress your potential clients with a fully customizable WordPress gallery plugin that\'s fully mobile responsive', 'moudla-best-grid-gallery')
45
+ ) */
46
+ ) );
47
  }
48
 
49
  private function check_for_addons() {
89
  if ( ! empty( $addons ) ) {
90
  foreach ( $addons as $addon ) {
91
 
92
+ $this->render_addon_top( $addon, $addons_images );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  echo '<div class="modula-addon-actions">';
94
+
95
  echo apply_filters( 'modula_addon_settings_link','', $addon );
96
  echo apply_filters( "modula_addon_button_action", '<a href="' . esc_url( MODULA_PRO_STORE_UPGRADE_URL . '/?utm_source=modula-lite&utm_campaign=extensions-page&utm_medium='. esc_attr( $addon['slug'] ) ).'" target="_blank" class="button primary-button">' . esc_html__( 'Upgrade to unlock this feature', 'modula-best-grid-gallery' ) . '</a>', $addon );
97
+
98
+ echo '</div>'; // .modula-addon-actions
99
  echo '</div>';
100
 
101
 
110
  */
111
  public function render_free_addons() {
112
 
 
 
 
 
 
 
 
 
 
113
  if ( ! empty( $this->free_addons ) ) {
114
 
115
  foreach ( $this->free_addons as $addon ) {
117
  $slug = $addon['slug'];
118
  $plugin_path = $slug . '/' . $slug . '.php';
119
 
120
+ if ( 'modula-foo-migrator' === $slug ) {
121
+ $plugin_path = $slug . '/migrate-away-from-foogallery.php';
122
+ }
123
+
124
+ if ( 'modula-nextgen-migrator' === $slug ) {
125
+ $plugin_path = $slug . '/migrate-away-from-nextgen.php';
126
+ }
127
+
128
  $activate_url = add_query_arg(
129
  array(
130
  'action' => 'activate',
161
  $action = 'installed';
162
  }
163
 
164
+ $this->render_addon_top( $addon );
165
+ echo '<div class="modula-free-addon-actions">';
 
 
 
 
 
 
 
 
166
 
167
+ echo '<div class="modula-toggle">';
168
+ echo '<input class="modula-toggle__input" type="checkbox" name="modula-free-addons" data-action="' . esc_attr( $action ) . '" data-activateurl="' . esc_url( $activate_url ) . '" data-deactivateurl="' . esc_url( $deactivate_url ) . '" value="1" data-slug="' . esc_attr( $slug ) . '" ' . checked( 'installed', $action, false ) . '>';
169
+ echo '<div class="modula-toggle__items">';
170
+ echo '<span class="modula-toggle__track"></span>';
171
+ echo '<span class="modula-toggle__thumb"></span>';
172
+ echo '<svg class="modula-toggle__off" width="6" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 6 6"><path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path></svg>';
173
+ echo '<svg class="modula-toggle__on" width="2" height="6" aria-hidden="true" role="img" focusable="false" viewBox="0 0 2 6"><path d="M0 0h2v6H0z"></path></svg>';
 
 
 
 
 
 
 
174
  echo '</div>';
175
  echo '</div>';
176
+ echo '<span class="modula-action-texts"></span>';
177
 
178
+ echo '</div>'; // .modula-free-addon-actions
 
 
179
  echo '</div>';
180
  }
181
 
210
  return !empty( $this->free_addons );
211
  }
212
 
213
+ /**
214
+ * Render the top markup for addons
215
+ */
216
+ public function render_addon_top( $addon = false, $addons_images = false ) {
217
+
218
+ if ( ! $addon ) {
219
+ return;
220
+ }
221
+
222
+ if( ! function_exists( 'get_plugin_data' ) ) {
223
+ require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
224
+ }
225
+
226
+ $plugin_data = false;
227
+
228
+ if(file_exists(WP_PLUGIN_DIR .'/' . $addon['slug'] . '/' . $addon['slug'] . '.php') ){
229
+ $plugin_data = get_plugin_data( WP_PLUGIN_DIR .'/' . $addon['slug'] . '/' . $addon['slug'] . '.php' );
230
+ }
231
+
232
+ $image = ( $addons_images && in_array( $addon[ 'slug' ], $addons_images ) ) ? MODULA_URL . 'assets/images/addons/' . $addon[ 'slug' ] . '.png' : MODULA_URL . 'assets/images/modula-logo.jpg';
233
+
234
+ echo '<div class="modula-addon">';
235
+ echo '<div class="modula-addon-box">';
236
+
237
+ if ( !isset( $addon['image'] ) || '' == $addon['image'] ){
238
+ echo '<div><img src="' . esc_url( apply_filters( 'modula_admin_default_addon_image', esc_attr( $image ) ) ) . '"></div>';
239
+ } else {
240
+ echo '<div><img src="' . esc_url( $addon['image'] ) . '"></div>';
241
+ }
242
+
243
+ echo '<div class="modula-addon-content">';
244
+ echo '<h3>' . esc_html( $addon['name'] ) . '</h3>';
245
+ echo ( isset( $addon['version'] ) ) ? '<span class="modula-addon-version">' . esc_html( 'V ' . $addon['version'] ) . '</span>' : '';
246
+ echo '<div class="modula-addon-description">' . wp_kses_post( $addon['description'] ) . '</div>';
247
+ echo '</div>';
248
+ echo '</div>';
249
+ }
250
+
251
+ /**
252
+ * Check if the free addons were released
253
+ */
254
+ public function check_for_release( $addons ) {
255
+ return $addons;
256
+ }
257
  }
258
 
259
  $addons = new Modula_Addons();
includes/admin/class-modula-upsells.php CHANGED
@@ -909,7 +909,7 @@ class Modula_Upsells {
909
 
910
  $upgrade = apply_filters( 'modula_upgrade_plugin_action', array(
911
  'upgrade_available' => true,
912
- 'link' => '<a class="modula-lite-vs-pro" href="https://wp-modula.com/free-vs-pro/?utm_source=modula-lite&utm_medium=plugin_settings&utm_campaign=upsell">' . esc_html__( 'Upgrade to PRO!', 'modula-best-grid-gallery' ) . '</a>'
913
  ) );
914
 
915
  if ( ! $upgrade['upgrade_available'] ) {
909
 
910
  $upgrade = apply_filters( 'modula_upgrade_plugin_action', array(
911
  'upgrade_available' => true,
912
+ 'link' => '<a target="_blank" class="modula-lite-vs-pro" href="https://wp-modula.com/pricing/?utm_source=modula-lite&utm_medium=plugin_settings&utm_campaign=upsell">' . esc_html__( 'Upgrade to PRO!', 'modula-best-grid-gallery' ) . '</a>'
913
  ) );
914
 
915
  if ( ! $upgrade['upgrade_available'] ) {
includes/admin/tabs/about.php CHANGED
@@ -1,38 +1,15 @@
1
  <?php
2
  $issues = array(
3
  'added' => array(
4
- esc_html__( 'Link to Modula\'s about page in the plugin\'s branding header', 'modula-best-grid-gallery' ),
5
- esc_html__( 'Upsell to Modula PRO in plugins page', 'modula-best-grid-gallery' ),
6
- esc_html__( 'Mobile Gallery Height setting', 'modula-best-grid-gallery' ),
7
  ),
8
  'changed' => array(
9
- esc_html__( 'Gallery title html element (from h2 to div)', 'modula-best-grid-gallery' ),
10
- esc_html__( 'Default "Hide Title" setting value to ON', 'modula-best-grid-gallery' ),
11
- esc_html__( 'Lazy load setting default ON', 'modula-best-grid-gallery' ),
12
- esc_html__( 'Updated CPT settings conditions', 'modula-best-grid-gallery' ),
13
- esc_html__( 'Grid Automatic default Row Height from 150 to 250', 'modula-best-grid-gallery' ),
14
- esc_html__( 'Update settings texts.', 'modula-best-grid-gallery' ),
15
- esc_html__( 'Last 5 galleries now appear in selectize without searching', 'modula-best-grid-gallery' ),
16
- esc_html__( 'Import/Export page received a new design', 'modula-best-grid-gallery' ),
17
- esc_html__( 'Improved Upsells', 'modula-best-grid-gallery' ),
18
  ),
19
  'fixed' => array(
20
- esc_html__( 'Modula metabox return to default position if previously moved into the sidebar and further prevent dragging the metabox.' ),
21
- esc_html__( 'Modula gallery display in tabs/accordions', 'modula-best-grid-gallery' ),
22
- esc_html__( 'Get proper mime type', 'modula-best-grid-gallery' ),
23
- esc_html__( 'Added tracking db options to uninstall process', 'modula-best-grid-gallery' ),
24
- esc_html__( 'Unset link image attribute when importing from NextGEN', 'modula-best-grid-gallery' ),
25
- esc_html__( 'Error when trying to get images that were not imported correctly / do not exist as entries in db', 'modula-best-grid-gallery' ),
26
- esc_html__( 'Incompatibility with Gutenberg block and widgets', 'modula-best-grid-gallery' ),
27
- esc_html__( 'Modula Widget before and after args', 'modula-best-grid-gallery' ),
28
- esc_html__( 'Sharing on LinkedIn', 'modula-best-grid-gallery' ),
29
- esc_html__( 'Migration from NextGEN galleries replacement for `[nggallery id=”xx″]` shortcode format', 'modula-best-grid-gallery' ),
30
- esc_html__( 'JavaScript error when Syntax Highlighting is disabled', 'modula-best-grid-gallery' ),
31
- esc_html__( 'Don\'t enqueue scripts/styles when not needed', 'modula-best-grid-gallery' ),
32
- esc_html__( 'Mobile/table gutter not working correctly', 'modula-best-grid-gallery' ),
33
- esc_html__( 'Set a default widht of 100% when there is no value', 'modula-best-grid-gallery' ),
34
- esc_html__( 'Admin Notice placement in Modula\'s Settings page', 'modula-best-grid-gallery' ),
35
- esc_html__( 'Compatibility issue with Meow Lightbox', 'modula-best-grid-gallery' ),
36
  )
37
  );
38
 
1
  <?php
2
  $issues = array(
3
  'added' => array(
 
 
 
4
  ),
5
  'changed' => array(
 
 
 
 
 
 
 
 
 
6
  ),
7
  'fixed' => array(
8
+ esc_html__( 'Sanitization and preparation for WP Core galleries import', 'modula-best-grid-gallery' ),
9
+ esc_html__( 'Metaboxes forever opened and arrows hidden', 'modula-best-grid-gallery' ),
10
+ esc_html__( 'Custom Posts Gutenberg block - now available everywhere Gutenberg is', 'modula-best-grid-gallery' ),
11
+ esc_html__( 'React warnings', 'modula-best-grid-gallery' ),
12
+ esc_html__( 'Blank links in accesibility reports', 'modula-best-grid-gallery' ),
 
 
 
 
 
 
 
 
 
 
 
13
  )
14
  );
15
 
includes/admin/templates/modal/modula-modal-albums-defaults-upgrade.php CHANGED
@@ -17,7 +17,7 @@
17
 
18
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
19
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
20
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=albums-modula&utm_campaign=modula-albums" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
21
 
22
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
23
 
17
 
18
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
19
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
20
+ $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=popup&utm_campaign=modula-albums-defaults" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
21
 
22
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
23
 
includes/admin/templates/modal/modula-modal-albums-upgrade.php CHANGED
@@ -25,7 +25,7 @@
25
 
26
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
27
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
28
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=albums-modula&utm_campaign=modula-albums" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
29
 
30
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
31
 
25
 
26
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
27
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
28
+ $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=popup&utm_campaign=modula-albums" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
29
 
30
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
31
 
includes/admin/templates/modal/modula-modal-gallery-defaults-upgrade.php CHANGED
@@ -16,7 +16,7 @@
16
 
17
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
18
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
19
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=albums-modula&utm_campaign=modula-albums" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
20
 
21
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
22
 
16
 
17
  $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
18
  $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
19
+ $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=popup&utm_campaign=modula-gallery-defaults" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
20
 
21
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
22
 
includes/class-modula-gutenberg.php CHANGED
@@ -62,21 +62,30 @@ class Modula_Gutenberg {
62
  global $pagenow;
63
  $screen = get_current_screen();
64
 
65
- if ( 'post' === $screen->post_type || 'page' === $screen->post_type || 'widgets.php' === $pagenow ) {
66
- wp_enqueue_style( 'modula', MODULA_URL . 'assets/css/front.css', null, MODULA_LITE_VERSION );
67
 
68
- do_action( 'modula_block_style' );
 
 
69
 
70
- wp_enqueue_script( 'modula-selectize', MODULA_URL . 'assets/js/admin/selectize.js', null, MODULA_LITE_VERSION, true );
71
- wp_enqueue_style( 'modula-selectize', MODULA_URL . 'assets/css/admin/selectize.default.css' );
72
- wp_enqueue_script( 'modula-isotope', MODULA_URL . 'assets/js/front/isotope.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
73
- wp_enqueue_script( 'modula-isotope-packery', MODULA_URL . 'assets/js/front/isotope-packery.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
74
- wp_enqueue_script( 'modula-grid-justified-gallery', MODULA_URL . 'assets/js/front/justifiedGallery.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
75
 
76
- do_action( 'modula_block_scripts' );
 
77
 
78
- wp_enqueue_script( 'modula', MODULA_URL . 'assets/js/front/jquery-modula.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
79
- }
 
 
 
 
 
 
 
 
 
80
  }
81
 
82
  /**
@@ -174,11 +183,14 @@ class Modula_Gutenberg {
174
  * @since 2.5.0
175
  */
176
  public function get_jsconfig() {
177
- if ( isset( $_POST['nonce'] ) ) {
178
- if ( ! wp_verify_nonce( $_POST['nonce'], 'modula_nonce' ) ) {//phpcs:ignore
179
- wp_send_json_error();
180
- die();
181
- }
 
 
 
182
  }
183
 
184
  if ( isset( $_POST['settings'] ) ) {
@@ -210,12 +222,16 @@ class Modula_Gutenberg {
210
  * @param string $effect Selected effect so we can check if we add title and caption to it.
211
  */
212
  public function check_hover_effect( $effect ) {
213
- if ( isset( $_POST['nonce'] ) ) {
214
- if ( ! wp_verify_nonce( $_POST['nonce'], 'modula_nonce' ) ) { //phpcs:ignore
215
- wp_send_json_error();
216
- die();
217
- }
218
  }
 
 
 
 
 
 
219
  if ( isset( $_POST['effect'] ) ) {
220
  $effect = $_POST['effect']; //phpcs:ignore
221
  }
62
  global $pagenow;
63
  $screen = get_current_screen();
64
 
65
+ //Early return to avoid loading Gutenberg assets on non-Gutenberg pages.
 
66
 
67
+ if ( function_exists( 'is_gutenberg_page' ) && ! is_gutenberg_page() ) {
68
+ return;
69
+ }
70
 
71
+ if ( method_exists( $screen, 'is_block_editor' ) && ! $screen->is_block_editor() ) {
72
+ return;
73
+ }
 
 
74
 
75
+ // If we end up here it means that the block is enabled, so let's enqueue our scripts
76
+ wp_enqueue_style( 'modula', MODULA_URL . 'assets/css/front.css', null, MODULA_LITE_VERSION );
77
 
78
+ do_action( 'modula_block_style' );
79
+
80
+ wp_enqueue_script( 'modula-selectize', MODULA_URL . 'assets/js/admin/selectize.js', null, MODULA_LITE_VERSION, true );
81
+ wp_enqueue_style( 'modula-selectize', MODULA_URL . 'assets/css/admin/selectize.default.css', array(), MODULA_LITE_VERSION );
82
+ wp_enqueue_script( 'modula-isotope', MODULA_URL . 'assets/js/front/isotope.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
83
+ wp_enqueue_script( 'modula-isotope-packery', MODULA_URL . 'assets/js/front/isotope-packery.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
84
+ wp_enqueue_script( 'modula-grid-justified-gallery', MODULA_URL . 'assets/js/front/justifiedGallery.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
85
+
86
+ do_action( 'modula_block_scripts' );
87
+
88
+ wp_enqueue_script( 'modula', MODULA_URL . 'assets/js/front/jquery-modula.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
89
  }
90
 
91
  /**
183
  * @since 2.5.0
184
  */
185
  public function get_jsconfig() {
186
+ if( !isset( $_POST['nonce'] ) ) {
187
+ wp_send_json_error( 'no nonce' );
188
+ die();
189
+ }
190
+
191
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'modula_nonce' ) ) {//phpcs:ignore
192
+ wp_send_json_error();
193
+ die();
194
  }
195
 
196
  if ( isset( $_POST['settings'] ) ) {
222
  * @param string $effect Selected effect so we can check if we add title and caption to it.
223
  */
224
  public function check_hover_effect( $effect ) {
225
+ if( !isset( $_POST['nonce'] ) ) {
226
+ wp_send_json_error( 'no nonce' );
227
+ die();
 
 
228
  }
229
+
230
+ if ( ! wp_verify_nonce( $_POST['nonce'], 'modula_nonce' ) ) {//phpcs:ignore
231
+ wp_send_json_error();
232
+ die();
233
+ }
234
+
235
  if ( isset( $_POST['effect'] ) ) {
236
  $effect = $_POST['effect']; //phpcs:ignore
237
  }
includes/class-modula-upgrades.php CHANGED
@@ -8,7 +8,7 @@ class Modula_Upgrades {
8
 
9
  private $upgrades_key = 'modula_completed_upgrades';
10
  private $completed_upgrades = array();
11
-
12
  function __construct() {
13
  $upgrades = array(
14
  'modula_v2' => array(
@@ -56,7 +56,7 @@ class Modula_Upgrades {
56
  // Check if is a new 2.0.0 install or an old install
57
  $version = get_option( 'modula_version', array() );
58
 
59
-
60
  $check = false;
61
  if(!empty($version) && $version['current_version'] !== MODULA_LITE_VERSION ){
62
  $check = true;
@@ -95,7 +95,7 @@ class Modula_Upgrades {
95
 
96
  $version = get_option( 'modula_version' );
97
  foreach ( $this->upgrades as $key => $upgrade ) {
98
-
99
  if ( version_compare( $version['upgraded_from'], $upgrade['version'], $upgrade['compare'] ) && ! $this->check_upgrade_complete( $key ) ) {
100
  $this->isNotice = true;
101
  printf(
@@ -164,9 +164,9 @@ class Modula_Upgrades {
164
  global $wpdb;
165
  $table_name = $wpdb->prefix.'modula';
166
  $galleries = $wpdb->get_var( "SELECT COUNT(Id) as galleries FROM $table_name" );
167
-
168
  if ( '0' == $galleries ) {
169
-
170
  echo '<div class="wrap" style="text-align:center;margin-top:70px;"><h1>' . esc_html__( 'Hooray you don\'t have any Modula galleries to upgrade.', 'modula-best-grid-gallery' ) . '</h1>';
171
  echo '<p class="about-text">' . esc_html__( 'It seems like you didn\'t create any galleries with Modula', 'modula-best-grid-gallery' ) . '</p>';
172
  echo '<a href="' . admin_url( 'post-new.php?post_type=modula-gallery' ) . '" class="button button-primary button-hero">' . esc_html__( 'Create a gallery now !', 'modula-best-grid-gallery' ) . '</a>';
@@ -196,7 +196,7 @@ class Modula_Upgrades {
196
  echo '<p>' . esc_html__( 'This will import all your galleries.', 'modula-best-grid-gallery' ) . '</p>';
197
  echo '<a href="#" id="modula-upgrade-v2" class="button button-primary">' . esc_html__( 'Start upgrade', 'modula-best-grid-gallery' ) . '</a>';
198
  }elseif ( 'custom-import' == $tab ) {
199
-
200
  global $wpdb;
201
  $galleries_query = 'SELECT * FROM ' . $wpdb->prefix . 'modula';
202
  $galleries = $wpdb->get_results( $galleries_query );
@@ -218,7 +218,7 @@ class Modula_Upgrades {
218
 
219
  echo '</div>';
220
 
221
-
222
  echo '</div>';
223
 
224
  }
@@ -276,11 +276,12 @@ class Modula_Upgrades {
276
  }
277
 
278
  global $wpdb;
279
- $galleries_query = 'SELECT * FROM ' . $wpdb->prefix . 'modula WHERE Id=' . $gallery_ID;
 
280
  $gallery = $wpdb->get_row( $galleries_query );
281
 
282
  if ( $gallery ) {
283
-
284
  $id = $gallery->Id;
285
  $config = json_decode( $gallery->configuration, true );
286
 
@@ -311,7 +312,7 @@ class Modula_Upgrades {
311
 
312
  $modula_settings[ 'enableSocial' ] = (isset($modula_settings['disableSocial']) && '1' == $modula_settings['disableSocial']) ? 0 : 1;
313
  unset( $modula_settings['disableSocial'] );
314
-
315
  $default_gallery_settings = array(
316
  'type' => 'creative-gallery',
317
  'width' => '100%',
8
 
9
  private $upgrades_key = 'modula_completed_upgrades';
10
  private $completed_upgrades = array();
11
+
12
  function __construct() {
13
  $upgrades = array(
14
  'modula_v2' => array(
56
  // Check if is a new 2.0.0 install or an old install
57
  $version = get_option( 'modula_version', array() );
58
 
59
+
60
  $check = false;
61
  if(!empty($version) && $version['current_version'] !== MODULA_LITE_VERSION ){
62
  $check = true;
95
 
96
  $version = get_option( 'modula_version' );
97
  foreach ( $this->upgrades as $key => $upgrade ) {
98
+
99
  if ( version_compare( $version['upgraded_from'], $upgrade['version'], $upgrade['compare'] ) && ! $this->check_upgrade_complete( $key ) ) {
100
  $this->isNotice = true;
101
  printf(
164
  global $wpdb;
165
  $table_name = $wpdb->prefix.'modula';
166
  $galleries = $wpdb->get_var( "SELECT COUNT(Id) as galleries FROM $table_name" );
167
+
168
  if ( '0' == $galleries ) {
169
+
170
  echo '<div class="wrap" style="text-align:center;margin-top:70px;"><h1>' . esc_html__( 'Hooray you don\'t have any Modula galleries to upgrade.', 'modula-best-grid-gallery' ) . '</h1>';
171
  echo '<p class="about-text">' . esc_html__( 'It seems like you didn\'t create any galleries with Modula', 'modula-best-grid-gallery' ) . '</p>';
172
  echo '<a href="' . admin_url( 'post-new.php?post_type=modula-gallery' ) . '" class="button button-primary button-hero">' . esc_html__( 'Create a gallery now !', 'modula-best-grid-gallery' ) . '</a>';
196
  echo '<p>' . esc_html__( 'This will import all your galleries.', 'modula-best-grid-gallery' ) . '</p>';
197
  echo '<a href="#" id="modula-upgrade-v2" class="button button-primary">' . esc_html__( 'Start upgrade', 'modula-best-grid-gallery' ) . '</a>';
198
  }elseif ( 'custom-import' == $tab ) {
199
+
200
  global $wpdb;
201
  $galleries_query = 'SELECT * FROM ' . $wpdb->prefix . 'modula';
202
  $galleries = $wpdb->get_results( $galleries_query );
218
 
219
  echo '</div>';
220
 
221
+
222
  echo '</div>';
223
 
224
  }
276
  }
277
 
278
  global $wpdb;
279
+ $galleries_query = $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "modula WHERE Id = %d", $gallery_ID );
280
+
281
  $gallery = $wpdb->get_row( $galleries_query );
282
 
283
  if ( $gallery ) {
284
+
285
  $id = $gallery->Id;
286
  $config = json_decode( $gallery->configuration, true );
287
 
312
 
313
  $modula_settings[ 'enableSocial' ] = (isset($modula_settings['disableSocial']) && '1' == $modula_settings['disableSocial']) ? 0 : 1;
314
  unset( $modula_settings['disableSocial'] );
315
+
316
  $default_gallery_settings = array(
317
  'type' => 'creative-gallery',
318
  'width' => '100%',
includes/class-modula.php CHANGED
@@ -175,7 +175,8 @@ class Modula {
175
 
176
  //returns modula CPT metaboxes to the default position.
177
  add_filter('get_user_option_meta-box-order_modula-gallery', '__return_empty_string');
178
-
 
179
  //prevents the modula metaboxes from being dragged.
180
  wp_deregister_script('postbox');
181
  }
@@ -378,4 +379,18 @@ class Modula {
378
  return $result;
379
  }
380
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381
  }
175
 
176
  //returns modula CPT metaboxes to the default position.
177
  add_filter('get_user_option_meta-box-order_modula-gallery', '__return_empty_string');
178
+ add_filter('get_user_option_closedpostboxes_modula-gallery', '__return_empty_string');
179
+ add_filter( 'admin_body_class', array( $this, 'no_drag_classes' ), 15, 1 );
180
  //prevents the modula metaboxes from being dragged.
181
  wp_deregister_script('postbox');
182
  }
379
  return $result;
380
  }
381
 
382
+ /**
383
+ * Add the `modula-no-drag` class to body so we know when to hide the arrows
384
+ * @param String $classes The classes of the body, a space-separated string of class names instead of an array
385
+ * @return String
386
+ *
387
+ * @since 2.6.3
388
+ */
389
+ public function no_drag_classes( $classes ) {
390
+
391
+ $classes .= ' modula-no-drag';
392
+
393
+ return $classes;
394
+ }
395
+
396
  }
includes/migrate/wp-core-gallery/class-modula-wp-core-gallery-importer.php CHANGED
@@ -49,7 +49,7 @@ class Modula_WP_Core_Gallery_Importer {
49
  }
50
  }
51
 
52
- $sql = "SELECT * FROM " . $wpdb->prefix . "posts WHERE `post_content` LIKE '%[galler%' AND `post_type` IN ($post_in)";
53
  $galleries = $wpdb->get_results($sql);
54
 
55
  if (count($galleries) != 0) {
49
  }
50
  }
51
 
52
+ $sql = $wpdb->prepare("SELECT ID, post_title, post_content FROM {$wpdb->posts} WHERE post_type IN ({$post_in}) AND post_content LIKE %s", '%[gallery%');
53
  $galleries = $wpdb->get_results($sql);
54
 
55
  if (count($galleries) != 0) {
includes/public/class-modula-shortcode.php CHANGED
@@ -304,6 +304,7 @@ class Modula_Shortcode {
304
  $activeTheme = wp_get_theme(); // gets the current theme
305
  $themeArray = array( 'Twenty Twenty' ); // Themes that have this problem
306
  if ( in_array( $activeTheme->name, $themeArray ) || in_array( $activeTheme->parent_theme, $themeArray ) ) {
 
307
  $css .= "#{$gallery_id}{max-width:" . esc_attr( $width ) . "}";
308
  }
309
 
304
  $activeTheme = wp_get_theme(); // gets the current theme
305
  $themeArray = array( 'Twenty Twenty' ); // Themes that have this problem
306
  if ( in_array( $activeTheme->name, $themeArray ) || in_array( $activeTheme->parent_theme, $themeArray ) ) {
307
+ $width = ( ! empty( $settings['width'] ) ) ? $settings['width'] : '100%';
308
  $css .= "#{$gallery_id}{max-width:" . esc_attr( $width ) . "}";
309
  }
310
 
includes/public/modula-helper-functions.php CHANGED
@@ -102,9 +102,10 @@ function modula_check_lightboxes_and_links( $item_data, $item, $settings ) {
102
 
103
  if ( 'attachment-page' == $settings['lightbox'] ) {
104
 
105
- $item_data['link_attributes']['class'][] = 'modula-simple-link';
106
- $item_data['item_classes'][] = 'modula-simple-link';
107
-
 
108
  if ( '' != $item['link'] ) {
109
 
110
  $item_data['link_attributes']['href'] = $item['link'];
@@ -120,19 +121,22 @@ function modula_check_lightboxes_and_links( $item_data, $item, $settings ) {
120
 
121
  } else if ( 'direct' == $settings['lightbox'] ) {
122
 
123
- $item_data['link_attributes']['href'] = $item_data['image_full'];
124
- $item_data['link_attributes']['class'][] = 'modula-simple-link';
125
- $item_data['item_classes'][] = 'modula-simple-link';
 
 
126
 
127
  } else {
128
 
129
  $item_data['link_attributes']['href'] = $item_data['image_full'];
130
  $item_data['link_attributes']['rel'] = $settings['gallery_id'];
131
  $item_data['link_attributes']['data-caption'] = $caption;
 
 
132
 
133
  }
134
 
135
-
136
  return $item_data;
137
  }
138
 
102
 
103
  if ( 'attachment-page' == $settings['lightbox'] ) {
104
 
105
+ $item_data['link_attributes']['class'][] = 'modula-simple-link';
106
+ $item_data['item_classes'][] = 'modula-simple-link';
107
+ $item_data['link_attributes']['aria-label'] = esc_html__('Open attachment page', 'modula-best-grid-gallery');
108
+ $item_data['link_attributes']['title'] = esc_html__('Open attachment page', 'modula-best-grid-gallery');
109
  if ( '' != $item['link'] ) {
110
 
111
  $item_data['link_attributes']['href'] = $item['link'];
121
 
122
  } else if ( 'direct' == $settings['lightbox'] ) {
123
 
124
+ $item_data['link_attributes']['href'] = $item_data['image_full'];
125
+ $item_data['link_attributes']['class'][] = 'modula-simple-link';
126
+ $item_data['item_classes'][] = 'modula-simple-link';
127
+ $item_data['link_attributes']['aria-label'] = esc_html__('Open image', 'modula-best-grid-gallery');
128
+ $item_data['link_attributes']['title'] = esc_html__('Open image', 'modula-best-grid-gallery');
129
 
130
  } else {
131
 
132
  $item_data['link_attributes']['href'] = $item_data['image_full'];
133
  $item_data['link_attributes']['rel'] = $settings['gallery_id'];
134
  $item_data['link_attributes']['data-caption'] = $caption;
135
+ $item_data['link_attributes']['aria-label'] = esc_html__('Open image in lightbox', 'modula-best-grid-gallery');
136
+ $item_data['link_attributes']['title'] = esc_html__('Open image in lightbox', 'modula-best-grid-gallery');
137
 
138
  }
139
 
 
140
  return $item_data;
141
  }
142
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
4
  Requires at least: 5.2
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
- Stable tag: 2.6.2
8
  License: GNU General Public License v3.0 or later
9
 
10
  The WordPress gallery plugin that's highlighy customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
@@ -184,18 +184,6 @@ This errors means that the browser doesn't know the Modula JavaScript plugin, mo
184
 
185
  If you get blurry and pixellated images then you need to raise the "Minimum image width" parameter inside the "General" section.
186
 
187
- = I want to use another lightbox instead of the provided one =
188
-
189
- The PRO license bundles 6 different lightboxes. However you can use any other lightbox you want also with the Lite license. If you have installed a lightbox plugin then you just need to select "Direct link to image" in the "Lightbox" settings.
190
-
191
- = How can I change the lightbox's background? =
192
-
193
- You can change the lightbox popup background color using the following code:
194
-
195
- `body .lg-backdrop {
196
- background-color: white;
197
- }`
198
-
199
  = How can I get support? =
200
 
201
  Free support is included only with a PRO license: [Buy Modula PRO](https://wp-modula.com/pricing/)
4
  Requires at least: 5.2
5
  Tested up to: 5.9
6
  Requires PHP: 5.6
7
+ Stable tag: 2.6.3
8
  License: GNU General Public License v3.0 or later
9
 
10
  The WordPress gallery plugin that's highlighy customizable & you can use to impress your clients. Create beautiful image galleries in minutes.
184
 
185
  If you get blurry and pixellated images then you need to raise the "Minimum image width" parameter inside the "General" section.
186
 
 
 
 
 
 
 
 
 
 
 
 
 
187
  = How can I get support? =
188
 
189
  Free support is included only with a PRO license: [Buy Modula PRO](https://wp-modula.com/pricing/)