Gallery – Photo Gallery – Image Gallery - Version 2.5.4

Version Description

Download this release

Release Info

Developer giucu91
Plugin Icon wp plugin Gallery – Photo Gallery – Image Gallery
Version 2.5.4
Comparing to
See all releases

Code changes from version 2.5.3 to 2.5.4

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.5.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,7 +47,7 @@
47
  * @since 2.0.2
48
  */
49
 
50
- define( 'MODULA_LITE_VERSION' , '2.5.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' );
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.5.4
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.5.4' );
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/modula-cpt.css CHANGED
@@ -537,6 +537,17 @@ tr[data-container="effect"] > td {
537
  transform : translate(-50%, -50%);
538
  }
539
 
 
 
 
 
 
 
 
 
 
 
 
540
  /* Upsells */
541
  .modula-upsell {
542
  background: #f1f1f1;
@@ -546,6 +557,10 @@ tr[data-container="effect"] > td {
546
  margin-top: 30px;
547
  }
548
 
 
 
 
 
549
  .modula-settings-container .modula-upsell {
550
  margin:30px;
551
  }
@@ -583,6 +598,8 @@ tr[data-container="effect"] > td {
583
  .modula-upsell p {
584
  margin: 0;
585
  }
 
 
586
  .modula-upsell p.modula-upsell-description {
587
  font-size: 13px;
588
  line-height: 1.5;
537
  transform : translate(-50%, -50%);
538
  }
539
 
540
+ /**
541
+ * General Metabox
542
+ */
543
+
544
+ .modula-metabox {
545
+ border : 0;
546
+ padding : 15px;
547
+ margin-top : 30px;
548
+ text-align:center;
549
+ }
550
+
551
  /* Upsells */
552
  .modula-upsell {
553
  background: #f1f1f1;
557
  margin-top: 30px;
558
  }
559
 
560
+ #modula-debug .modula-metabox p.modula-metabox-description {
561
+ padding:0;
562
+ }
563
+
564
  .modula-settings-container .modula-upsell {
565
  margin:30px;
566
  }
598
  .modula-upsell p {
599
  margin: 0;
600
  }
601
+
602
+ .modula-metabox p.modula-metabox-description,
603
  .modula-upsell p.modula-upsell-description {
604
  font-size: 13px;
605
  line-height: 1.5;
assets/css/admin/welcome.css CHANGED
@@ -28,10 +28,14 @@ body.modula-gallery_page_modula-lite-vs-pro #wpcontent .wrap {
28
  }
29
 
30
  .lite-vs-pro-section h3 {
31
- display:inline-block;
32
- vertical-align:middle;
33
  position:relative;
34
- margin:0 2.5% 0 25px;
 
 
 
 
 
35
  }
36
 
37
  .wpchill-plans-table {
@@ -42,7 +46,32 @@ body.modula-gallery_page_modula-lite-vs-pro #wpcontent .wrap {
42
  margin-top : 50px;
43
  }
44
 
45
- .wpchill-plans-table.table-header .wpchill-pricing-package:last-child:before {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  content : '';
47
  width : auto;
48
  display : inline-block;
@@ -60,21 +89,8 @@ body.modula-gallery_page_modula-lite-vs-pro #wpcontent .wrap {
60
  transform : translateY(-100%);
61
  }
62
 
63
- .wpchill-plans-table .wpchill-pricing-package {
64
- text-align : center;
65
- border-left : 1px solid #ebebeb;
66
- border-top : 1px solid #ebebeb;
67
- line-height : 1.5;
68
- height : 50px;
69
- display : -ms-flexbox;
70
- display : flex;
71
- -ms-flex-align : center;
72
- align-items : center;
73
- -ms-flex-pack : center;
74
- justify-content : center;
75
- padding-left : 10px;
76
- padding-right : 10px;
77
- background : #fff;
78
  }
79
 
80
  .wpchill-plans-table .wpchill-pricing-package.wpchill-title {
@@ -139,16 +155,35 @@ body.modula-gallery_page_modula-lite-vs-pro #wpcontent .wrap {
139
 
140
  .wpchill-plans-table .wpchill-pricing-package.feature-name {
141
  justify-content : space-between;
142
- font-weight : 700;
143
  text-align : left;
 
 
 
144
  }
145
 
146
  .wpchill-plans-table .wpchill-pricing-package .dashicons-saved {
147
  color : green;
148
  }
149
 
 
 
 
 
 
 
150
  .wpchill-plans-table .wpchill-pricing-package .dashicons-no-alt {
151
- color : #cdcdcd;
 
 
 
 
 
 
 
 
 
 
152
  }
153
 
154
  /**
28
  }
29
 
30
  .lite-vs-pro-section h3 {
31
+ display:block;
 
32
  position:relative;
33
+ font-size: 16px;
34
+ margin: 0;
35
+ }
36
+ .lite-vs-pro-section p {
37
+ font-size: 14px;
38
+ margin: 0;
39
  }
40
 
41
  .wpchill-plans-table {
46
  margin-top : 50px;
47
  }
48
 
49
+ .wpchill-plans-table.table-footer .wpchill-pricing-package:last-child {
50
+ border:0;
51
+ }
52
+
53
+ .wpchill-plans-table .wpchill-pricing-package {
54
+ text-align : center;
55
+ line-height : 1.5;
56
+ padding : 10px 15px;
57
+ display : flex;
58
+ align-content : center;
59
+ align-items : center;
60
+ justify-content : center;
61
+ background : #fff;
62
+ border-top : 1px solid #ccc;
63
+ }
64
+
65
+ .wpchill-plans-table .wpchill-pricing-package:not(:first-child) {
66
+ max-width : 300px;
67
+ }
68
+
69
+ .wpchill-plans-table.table-header .wpchill-pricing-package {
70
+ border:0;
71
+ }
72
+
73
+ .wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before,
74
+ .wpchill-plans-table .wpchill-pricing-package.wpchill-title.wpchill-highlight::before{
75
  content : '';
76
  width : auto;
77
  display : inline-block;
89
  transform : translateY(-100%);
90
  }
91
 
92
+ .lite-vs-pro-section .wpchill-plans-table.table-header {
93
+ border-top: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
 
96
  .wpchill-plans-table .wpchill-pricing-package.wpchill-title {
155
 
156
  .wpchill-plans-table .wpchill-pricing-package.feature-name {
157
  justify-content : space-between;
158
+ font-weight : 400;
159
  text-align : left;
160
+ font-size : 13px;
161
+ display : block;
162
+ background : transparent;
163
  }
164
 
165
  .wpchill-plans-table .wpchill-pricing-package .dashicons-saved {
166
  color : green;
167
  }
168
 
169
+ .wpchill-plans-table .wpchill-pricing-package .dashicons {
170
+ width : 30px;
171
+ height : 30px;
172
+ font-size : 30px;
173
+ }
174
+
175
  .wpchill-plans-table .wpchill-pricing-package .dashicons-no-alt {
176
+ color : #ff3439;
177
+ }
178
+
179
+ .wpchill-plans-table .wpchill-pricing-package:last-child {
180
+ background : #fefff0;
181
+ }
182
+
183
+ .wpchill-pricing-package .button .dashicons {
184
+ font-size: 16px;
185
+ vertical-align: middle;
186
+ line-height: 26px;
187
  }
188
 
189
  /**
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);wp.i18n.__;var n=wp.element,l=(n.Component,n.Fragment,n.useEffect),o=(n.useState,wp.data.withSelect,wp.components),c=(o.SelectControl,o.Button,o.Spinner,o.Toolbar,o.IconButton,wp.editor.BlockControls,wp.compose.compose,wp.components.__experimentalInputControl,function(t){var e=t.onIdChange,a=t.id,n=t.options;return l((function(){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:n,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})}),i=wp.i18n.__,r=wp.element,d=(r.Component,r.Fragment),u=wp.editor.InspectorControls,s=wp.components,m=(s.SelectControl,s.Button),g=s.PanelBody,f=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=(t.setAttributes,t.galleries),n=t.onIdChange,l=e.id,o=(e.currentGallery,e.currentSelectize);return React.createElement(d,null,React.createElement(u,null,React.createElement(g,{title:i("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(d,null,React.createElement(c,{id:l,key:l,value:l,options:o,onIdChange:n}),0!=l&&React.createElement(m,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isDefault:!0},i("Edit gallery"))))))})),p={};p.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"}))),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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 h=p,v=wp.element.Fragment,y=function(t){var e=t.settings,a=t.img,n=(t.effectCheck,t.hideTitle),l=t.hideDescription,o=t.hideSocial;return[React.createElement(v,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("h2",{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," "),!o&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",h.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",h.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",h.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",h.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",h.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",h.email," "))))))]},b=(wp.i18n.__,wp.element),w=(b.useState,b.useEffect,wp.components),j=(w.Button,w.ButtonGroup,wp.blockEditor),E=(j.MediaUpload,j.MediaPlaceholder,wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=(e.images,e.settings),n=(e.id,e.effectCheck),l=t.img,o=t.index;t.setAttributes,t.checkHoverEffect;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(y,{settings:a,img:l,index:o,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]}))),R=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")}})},k=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function x(){return(x=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)}wp.i18n.__;var C=wp.element,_=(C.Component,C.Fragment),S=C.useEffect,z=(C.useState,wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,o=t.settings,c=(t.galleryId,t.checkHoverEffect),i=t.modulaRun,r=t.modulaSlickRun;S((function(){void 0!==o&&c(o.effect),"slider"!==o.type?i(n):r()}),[]);var d="modula modula-gallery ",u="modula-items";return"creative-gallery"==o.type?d+="modula-creative-gallery":"custom-grid"==o.type?d+="modula-custom-grid":"slider"==o.type?d="modula-slider":(d+="modula-columns",u+=" grid-gallery","automatic"==o.grid_type&&(u+=" justified-gallery")),[React.createElement(_,null,React.createElement(R,{id:l,settings:o}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":JSON.stringify(n)},"grid"==o.type&&"automatic"!=o.grid_type&&React.createElement("div",{class:"modula-grid-sizer"}," "),React.createElement(k,x({},t,{position:"top"})),React.createElement("div",{className:u},a.length>0&&React.createElement(_,null,React.createElement(_,null,a.map((function(e,a){return[React.createElement(E,x({},t,{img:e,index:a}))]}))))),React.createElement(k,x({},t,{position:"bottom"}))))]})));function N(){return(N=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 T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var a=[],n=!0,l=!1,o=void 0;try{for(var c,i=t[Symbol.iterator]();!(n=(c=i.next()).done)&&(a.push(c.value),!e||a.length!==e);n=!0);}catch(t){l=!0,o=t}finally{try{n||null==i.return||i.return()}finally{if(l)throw o}}return a}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return M(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 M(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 M(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 I=wp.i18n.__,F=wp.element,O=(F.Component,F.Fragment),B=F.useEffect,q=F.useState,Q=wp.data.withSelect,V=wp.components,L=(V.SelectControl,V.Button),P=V.Spinner,A=V.Toolbar,G=V.IconButton,U=wp.editor.BlockControls,H=(0,wp.compose.compose)(Q((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:1})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,l=e.id,o=e.images,i=e.status,r=e.settings,d=e.jsConfig,u=e.galleryId,s=(e.currentGallery,e.currentSelectize),m=T(q(t.attributes.align),2),g=(m[0],m[1],T(q(l),2)),p=g[0];g[1];B((function(){0!==l&&v(l)}),[]),B((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?(p==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(U,null,o&&o.length>0&&React.createElement(A,null,React.createElement(G,{label:I("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",target:"_blank"})));return 0==l&&"none"===e.galleryType?[React.createElement(O,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," ",I("Sorry no galleries found","modula-best-grid-gallery")," "),a.length>0&&React.createElement(L,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},I("Display An Existing Gallery","modula-best-grid-gallery"),h.chevronRightFancy),null==t.attributes.proInstalled&&a.length>0&&React.createElement(L,{href:"https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},I("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery"))))))]:"loading"===i?[React.createElement(O,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(P,null))))]:0==l||0===o.length?[React.createElement(O,null,React.createElement(f,N({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:I("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:I("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(O,null,React.createElement(c,{id:l,key:l,value:l,options:s,onIdChange:v}),0!=l&&React.createElement(L,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isPrimary:!0},I("Edit Gallery"))))))]:r?[React.createElement(O,null,w,React.createElement(f,N({onIdChange:function(t){v(t)}},t)),React.createElement(z,N({},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(){var t=jQuery(".modula-slider");t.length>0&&void 0!==jQuery.fn.slick&&jQuery.each(t,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config"),e=jQuery(this).find(".modula-slider-nav"),a=jQuery(this).find(".modula-items");if(a.slick(t.slider_settings),e.length){var n=e.data("config"),l=a.slick("slickCurrentSlide");e.on("init",(function(t,a){e.find('.slick-slide[data-slick-index="'+l+'"]').addClass("is-active")})),e.slick(n),a.on("afterChange",(function(t,a,n){e.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';e.find(".slick-slide.is-active").removeClass("is-active"),e.find(l).addClass("is-active")})),e.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");a.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 D(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 $=wp.i18n.__,W=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:[]}},W(this.blockName,{title:modulaVars.gutenbergTitle,icon:h.modula,description:$("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[$("gallery"),$("modula"),$("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:H,save:function(){return null}})}}])&&D(e.prototype,a),n&&D(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);wp.i18n.__;var n=wp.element,l=(n.Component,n.Fragment,n.useEffect),o=(n.useState,wp.data.withSelect,wp.components),c=(o.SelectControl,o.Button,o.Spinner,o.Toolbar,o.IconButton,wp.editor.BlockControls,wp.compose.compose,wp.components.__experimentalInputControl,function(t){var e=t.onIdChange,a=t.id,n=t.options;return l((function(){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:n,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})}),i=wp.i18n.__,r=wp.element,d=(r.Component,r.Fragment),u=wp.editor.InspectorControls,s=wp.components,m=(s.SelectControl,s.Button),g=s.PanelBody,f=wp.components.withFilters("modula.ModulaInspector")((function(t){var e=t.attributes,a=(t.setAttributes,t.galleries),n=t.onIdChange,l=e.id,o=(e.currentGallery,e.currentSelectize);return React.createElement(d,null,React.createElement(u,null,React.createElement(g,{title:i("Gallery Settings","modula-best-grid-gallery"),initialOpen:!0},a.length>0&&React.createElement(d,null,React.createElement(c,{id:l,key:l,value:l,options:o,onIdChange:n}),0!=l&&React.createElement(m,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isDefault:!0},i("Edit gallery"))))))})),p={};p.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"}))),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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"})),p.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 h=p,v=wp.element.Fragment,y=function(t){var e=t.settings,a=t.img,n=(t.effectCheck,t.hideTitle),l=t.hideDescription,o=t.hideSocial;return[React.createElement(v,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("h2",{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," "),!o&&"1"==e.enableSocial&&React.createElement("div",{className:"jtg-social"},"1"==e.enableTwitter&&React.createElement("a",{className:"modula-icon-twitter",href:"#"}," ","$",h.twitter," "),"1"==e.enableFacebook&&React.createElement("a",{className:"modula-icon-facebook",href:"#"}," ","$",h.facebook," "),"1"==e.enableWhatsapp&&React.createElement("a",{className:"modula-icon-whatsapp",href:"#"}," ","$",h.whatsapp," "),"1"==e.enableLinkedin&&React.createElement("a",{className:"modula-icon-linkedin",href:"#"}," ","$",h.linkedin," "),"1"==e.enablePinterest&&React.createElement("a",{className:"modula-icon-pinterest",href:"#"}," ","$",h.pinterest," "),"1"==e.enableEmail&&React.createElement("a",{className:"modula-icon-email",href:"#"}," ","$",h.email," "))))))]},b=(wp.i18n.__,wp.element),w=(b.useState,b.useEffect,wp.components),j=(w.Button,w.ButtonGroup,wp.blockEditor),E=(j.MediaUpload,j.MediaPlaceholder,wp.components.withFilters("modula.ModulaGalleryImage")((function(t){var e=t.attributes,a=(e.images,e.settings),n=(e.id,e.effectCheck),l=t.img,o=t.index;t.setAttributes,t.checkHoverEffect;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(y,{settings:a,img:l,index:o,hideTitle:null==n||1!=n.title,hideDescription:null==n||1!=n.description,hideSocial:null==n||1!=n.social,effectCheck:n})))]}))),R=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")}})},k=wp.components.withFilters("modula.ModulaItemsExtraComponent")((function(t){return null}));function x(){return(x=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)}wp.i18n.__;var C=wp.element,_=(C.Component,C.Fragment),S=C.useEffect,z=(C.useState,wp.components.withFilters("modula.modulaGallery")((function(t){var e=t.attributes,a=e.images,n=e.jsConfig,l=e.id,o=t.settings,c=(t.galleryId,t.checkHoverEffect),i=t.modulaRun,r=t.modulaSlickRun;S((function(){void 0!==o&&c(o.effect),"slider"!==o.type?i(n):r()}),[]);var d="modula modula-gallery ",u="modula-items";return"creative-gallery"==o.type?d+="modula-creative-gallery":"custom-grid"==o.type?d+="modula-custom-grid":"slider"==o.type?d="modula-slider":(d+="modula-columns",u+=" grid-gallery","automatic"==o.grid_type&&(u+=" justified-gallery")),[React.createElement(_,null,React.createElement(R,{id:l,settings:o}),React.createElement("div",{id:"jtg-".concat(l),className:"".concat(d," ").concat(null!=t.attributes.modulaDivClassName?t.attributes.modulaDivClassName:""),"data-config":JSON.stringify(n)},"grid"==o.type&&"automatic"!=o.grid_type&&React.createElement("div",{class:"modula-grid-sizer"}," "),React.createElement(k,x({},t,{position:"top"})),React.createElement("div",{className:u},a.length>0&&React.createElement(_,null,React.createElement(_,null,a.map((function(e,a){return[React.createElement(E,x({},t,{img:e,index:a}))]}))))),React.createElement(k,x({},t,{position:"bottom"}))))]})));function N(){return(N=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 T(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,o=[],c=!0,i=!1;try{for(a=a.call(t);!(c=(n=a.next()).done)&&(o.push(n.value),!e||o.length!==e);c=!0);}catch(t){i=!0,l=t}finally{try{c||null==a.return||a.return()}finally{if(i)throw l}}return o}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return M(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 M(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 M(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 I=wp.i18n.__,F=wp.element,O=(F.Component,F.Fragment),B=F.useEffect,q=F.useState,Q=wp.data.withSelect,V=wp.components,L=(V.SelectControl,V.Button),P=V.Spinner,A=V.Toolbar,G=V.IconButton,U=wp.editor.BlockControls,H=(0,wp.compose.compose)(Q((function(t,e){return{galleries:(0,t("core").getEntityRecords)("postType","modula-gallery",{post_status:"publish",per_page:1})||[]}})),wp.components.withFilters("modula.ModulaEdit"))((function(t){var e=t.attributes,a=t.galleries,n=t.setAttributes,l=e.id,o=e.images,i=e.status,r=e.settings,d=e.jsConfig,u=e.galleryId,s=(e.currentGallery,e.currentSelectize),m=T(q(t.attributes.align),2),g=(m[0],m[1],T(q(l),2)),p=g[0];g[1];B((function(){0!==l&&v(l)}),[]),B((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?(p==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(U,null,o&&o.length>0&&React.createElement(A,null,React.createElement(G,{label:I("Edit gallery","modula-best-grid-gallery"),icon:"edit",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",target:"_blank"})));return 0==l&&"none"===e.galleryType?[React.createElement(O,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," ",I("Sorry no galleries found","modula-best-grid-gallery")," "),a.length>0&&React.createElement(L,{className:"modula-button",target:"_blank",onClick:function(t){n({status:"ready",id:0,galleryType:"gallery"})}},I("Display An Existing Gallery","modula-best-grid-gallery"),h.chevronRightFancy),null==t.attributes.proInstalled&&a.length>0&&React.createElement(L,{href:"https://chl.so/get-lite",className:"modula-button-upsell",isSecondary:!0,target:"_blank"},I("Upgrade to PRO to create galleries using a preset ( fastest way )","modula-best-grid-gallery"))))))]:"loading"===i?[React.createElement(O,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(P,null))))]:0==l||0===o.length?[React.createElement(O,null,React.createElement(f,N({onIdChange:function(t){return v(t)},selectOptions:function(){var t=[{value:0,label:I("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:I("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(O,null,React.createElement(c,{id:l,key:l,value:l,options:s,onIdChange:v}),0!=l&&React.createElement(L,{target:"_blank",href:modulaVars.adminURL+"post.php?post="+l+"&action=edit",isPrimary:!0},I("Edit Gallery"))))))]:r?[React.createElement(O,null,w,React.createElement(f,N({onIdChange:function(t){v(t)}},t)),React.createElement(z,N({},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(){var t=jQuery(".modula-slider");t.length>0&&void 0!==jQuery.fn.slick&&jQuery.each(t,(function(){jQuery(this).attr("id");var t=jQuery(this).data("config"),e=jQuery(this).find(".modula-slider-nav"),a=jQuery(this).find(".modula-items");if(a.slick(t.slider_settings),e.length){var n=e.data("config"),l=a.slick("slickCurrentSlide");e.on("init",(function(t,a){e.find('.slick-slide[data-slick-index="'+l+'"]').addClass("is-active")})),e.slick(n),a.on("afterChange",(function(t,a,n){e.slick("slickGoTo",n);var l='.slick-slide[data-slick-index="'+n+'"]';e.find(".slick-slide.is-active").removeClass("is-active"),e.find(l).addClass("is-active")})),e.on("click",".slick-slide",(function(t){t.preventDefault();var e=jQuery(this).data("slick-index");a.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 D(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 $=wp.i18n.__,W=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:[]}},W(this.blockName,{title:modulaVars.gutenbergTitle,icon:h.modula,description:$("Make your galleries stand out.","modula-best-grid-gallery"),keywords:[$("gallery"),$("modula"),$("images")],category:"common",supports:{align:!0,customClassName:!1},attributes:this.blockAttributes,edit:H,save:function(){return null}})}}])&&D(e.prototype,a),n&&D(e,n),t}())}]);
assets/src/js/components/edit.js CHANGED
@@ -226,7 +226,7 @@ export const ModulaEdit = (props) => {
226
  {undefined == props.attributes.proInstalled &&
227
  galleries.length > 0 && (
228
  <Button
229
- href="https://wp-modula.com/pricing/?utm_source=modula-lite&utm_campaign=upsell"
230
  className="modula-button-upsell"
231
  isSecondary
232
  target="_blank"
226
  {undefined == props.attributes.proInstalled &&
227
  galleries.length > 0 && (
228
  <Button
229
+ href="https://chl.so/get-lite"
230
  className="modula-button-upsell"
231
  isSecondary
232
  target="_blank"
changelog.txt CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  = 2.5.3 - 26/07/2021 =
2
  Fixed: Method assignment for upsells
3
  Fixed: Screen option button
1
+ = 2.5.4 - 14/09/2021 =
2
+ Changed: Upsells update
3
+ Fixed: Image cropping based on image alignment
4
+
5
  = 2.5.3 - 26/07/2021 =
6
  Fixed: Method assignment for upsells
7
  Fixed: Screen option button
includes/admin/class-modula-addons.php CHANGED
@@ -84,7 +84,12 @@ class Modula_Addons {
84
  // echo '</div>';
85
  echo '<div class="modula-addon-actions">';
86
  echo apply_filters( 'modula_addon_settings_link','', $addon );
87
- 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 );
 
 
 
 
 
88
  echo '</div>';
89
  echo '</div>';
90
 
84
  // echo '</div>';
85
  echo '<div class="modula-addon-actions">';
86
  echo apply_filters( 'modula_addon_settings_link','', $addon );
87
+
88
+ $slug = $addon['slug'];
89
+ if ( 'modula-password-protect' == $addon['slug'] ) {
90
+ $slug = 'modula-password';
91
+ }
92
+ echo apply_filters( "modula_addon_button_action", '<a href="' . esc_url( 'https://chl.so/extension-' . $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
 
includes/admin/class-modula-admin.php CHANGED
@@ -88,8 +88,8 @@ class Modula_Admin {
88
  'priority' => 35,
89
  ),
90
  'freevspro' => array(
91
- 'page_title' => esc_html__( 'Free vs Premium', 'modula-best-grid-gallery' ),
92
- 'menu_title' => esc_html__( 'Free vs Premium', 'modula-best-grid-gallery' ),
93
  'capability' => 'manage_options',
94
  'menu_slug' => 'modula-lite-vs-pro',
95
  'function' => array( $this, 'lite_vs_pro' ),
@@ -517,7 +517,7 @@ class Modula_Admin {
517
  include MODULA_PATH . 'includes/admin/tabs/affiliate-options.php';
518
  }
519
 
520
- /**
521
  * Add LITE vs PRO page
522
  *
523
  * @since 2.5.0
@@ -532,7 +532,15 @@ class Modula_Admin {
532
  'gallery-sorting' => array(
533
  'title' => esc_html__( 'Gallery Sorting', 'modula-best-grid-gallery' ),
534
  'description' => esc_html__( 'Multiple choices for sorting out images from your gallery: manual, date created, date modified, alphabetically, reverse or random', 'modula-best-grid-gallery' ),
535
- )
 
 
 
 
 
 
 
 
536
  );
537
 
538
  echo '<div class="modula wrap lite-vs-pro-section about-wrap">';
88
  'priority' => 35,
89
  ),
90
  'freevspro' => array(
91
+ 'page_title' => esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ),
92
+ 'menu_title' => esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ),
93
  'capability' => 'manage_options',
94
  'menu_slug' => 'modula-lite-vs-pro',
95
  'function' => array( $this, 'lite_vs_pro' ),
517
  include MODULA_PATH . 'includes/admin/tabs/affiliate-options.php';
518
  }
519
 
520
+ /**
521
  * Add LITE vs PRO page
522
  *
523
  * @since 2.5.0
532
  'gallery-sorting' => array(
533
  'title' => esc_html__( 'Gallery Sorting', 'modula-best-grid-gallery' ),
534
  'description' => esc_html__( 'Multiple choices for sorting out images from your gallery: manual, date created, date modified, alphabetically, reverse or random', 'modula-best-grid-gallery' ),
535
+ ),
536
+ 'hover-effects' => array(
537
+ 'title' => esc_html__( 'Hover Effects', 'modula-best-grid-gallery' ),
538
+ 'description' => esc_html__( 'Choose from 42 different hover effects.', 'modula-best-grid-gallery' ),
539
+ ),
540
+ 'loadng-effects' => array(
541
+ 'title' => esc_html__( 'Loading Effects', 'modula-best-grid-gallery' ),
542
+ 'description' => esc_html__( 'Build your own effects with these new customizations', 'modula-best-grid-gallery' ),
543
+ ),
544
  );
545
 
546
  echo '<div class="modula wrap lite-vs-pro-section about-wrap">';
includes/admin/class-modula-cpt.php CHANGED
@@ -897,6 +897,37 @@ class Modula_CPT {
897
  die();
898
 
899
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
900
  }
901
 
902
 
897
  die();
898
 
899
  }
900
+
901
+ public function output_upsell_albums() {
902
+ ?>
903
+ <div class="modula-upsells-carousel-wrapper">
904
+ <div class="modula-upsells-carousel">
905
+ <div class="modula-upsell modula-upsell-item">
906
+ <h2><?php esc_html_e( 'Modula Albums', 'modula-best-grid-gallery' ) ?></h2>
907
+ <h4 class="modula-upsell-description"><?php esc_html_e( 'Get the Modula Albums add-on to create wonderful albums from your galleries.', 'modula-best-grid-gallery' ) ?></h4>
908
+ <ul class="modula-upsells-list">
909
+ <li>Redirect to a gallery or a custom URL with the standalone functionality</li>
910
+ <li>Arrange your albums using columns or the custom grid</li>
911
+ <li>Hover effects</li>
912
+ <li>Fully compatible with all the other Modula extensions</li>
913
+ <li>Premium support</li>
914
+ <li>Shuffle galleries inside an album on page refresh</li>
915
+ <li>Shuffle album cover images (randomly pick a cover image from the gallery)</li>
916
+ </ul>
917
+ <p>
918
+ <a target="_blank"
919
+ href="<?php echo esc_url( admin_url('edit.php?post_type=modula-gallery&page=modula-lite-vs-pro') ); ?>"
920
+ class="button"><?php esc_html_e( 'Free vs PRO', 'modula-best-grid-gallery' ) ?></a>
921
+ <a target="_blank"
922
+ style="margin-top:10px;"
923
+ href="<?php echo esc_url( 'https://chl.so/get-albums-metabox' ); ?>"
924
+ class="button-primary button"><?php esc_html_e( 'Get Modula Pro!', 'modula-best-grid-gallery' ) ?></a>
925
+ </p>
926
+ </div>
927
+ </div>
928
+ </div>
929
+ <?php
930
+ }
931
  }
932
 
933
 
includes/admin/class-modula-debug.php CHANGED
@@ -293,6 +293,7 @@ class Modula_Debug {
293
  * @since 2.5.0
294
  */
295
  public function add_debug_meta_box() {
 
296
  add_meta_box(
297
  'modula-debug', // Unique ID
298
  esc_html__('Debug gallery', 'modula-best-grid-gallery'), // Title
@@ -313,8 +314,8 @@ class Modula_Debug {
313
  ?>
314
  <div class="modula-upsells-carousel-wrapper">
315
  <div class="modula-upsells-carousel">
316
- <div class="modula-upsell modula-upsell-item">
317
- <p class="modula-upsell-description"><?php echo esc_html__( 'Export gallery and send it to Modula\'s support team so that we can debug your problem much easier.', 'modula-best-grid-gallery' ); ?></p>
318
  <p>
319
  <a href="<?php echo add_query_arg( array(
320
  'modula_single_download' => absint( get_the_ID() ),
293
  * @since 2.5.0
294
  */
295
  public function add_debug_meta_box() {
296
+
297
  add_meta_box(
298
  'modula-debug', // Unique ID
299
  esc_html__('Debug gallery', 'modula-best-grid-gallery'), // Title
314
  ?>
315
  <div class="modula-upsells-carousel-wrapper">
316
  <div class="modula-upsells-carousel">
317
+ <div class="modula-metabox">
318
+ <p class="modula-metabox-description"><?php echo esc_html__( 'Export gallery and send it to Modula\'s support team so that we can debug your problem much easier.', 'modula-best-grid-gallery' ); ?></p>
319
  <p>
320
  <a href="<?php echo add_query_arg( array(
321
  'modula_single_download' => absint( get_the_ID() ),
includes/admin/class-modula-upsells.php CHANGED
@@ -12,6 +12,13 @@ class Modula_Upsells {
12
  */
13
  private $wpchill_upsells = false;
14
 
 
 
 
 
 
 
 
15
  function __construct() {
16
 
17
  if ( class_exists( 'WPChill_Upsells' ) ) {
@@ -51,6 +58,10 @@ class Modula_Upsells {
51
  add_filter( 'modula_exif_tab_content', array( $this, 'exif_tab_upsell' ) );
52
  add_filter( 'modula_zoom_tab_content', array( $this, 'zoom_tab_upsell' ) );
53
 
 
 
 
 
54
  // Add modula whitelabel upsell
55
  if ( ! $this->wpchill_upsells || $this->wpchill_upsells->is_upgradable_addon( 'modula-whitelabel' ) ) {
56
  add_action( 'modula_side_admin_tab', array( $this, 'render_whitelabel_upsell' ) );
@@ -64,13 +75,14 @@ class Modula_Upsells {
64
  add_action( 'load-post.php', array( $this, 'meta_boxes_setup' ) );
65
  add_action( 'load-post-new.php', array( $this, 'meta_boxes_setup' ) );
66
 
 
 
67
 
68
  }
69
 
70
  public function generate_upsell_box( $title, $description, $tab, $features = array() ) {
71
 
72
- $upsell_box = '<div class="modula-upsell">';
73
- $upsell_box .= '<h2>' . esc_html( $title ) . '</h2>';
74
 
75
  if ( ! empty( $features ) ) {
76
  $upsell_box .= '<ul class="modula-upsell-features">';
@@ -92,27 +104,7 @@ class Modula_Upsells {
92
  $upsell_box .= '</ul>';
93
  }
94
 
95
- $campaign = $tab;
96
- $pro_simple = array( 'filters', 'hovereffects', 'loadingeffects', 'general', 'misc', 'lightboxes' );
97
- if ( ! in_array( $tab, $pro_simple ) ) {
98
- $campaign = 'modula-' . $tab;
99
-
100
- if ( 'password' == $tab ) {
101
- $campaign = 'modula-password-protect';
102
- }
103
- }
104
-
105
  $upsell_box .= '<p class="modula-upsell-description">' . esc_html( $description ) . '</p>';
106
- $upsell_box .= '<p>';
107
-
108
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
109
- $buttons = '<a target="_blank" href="' . $lite_vs_pro_url . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
110
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=' . $tab . '_tab_upsell-tab&utm_campaign=' . $campaign . '" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
111
-
112
- $upsell_box .= apply_filters( 'modula_upsell_buttons', $buttons, $tab );
113
-
114
- $upsell_box .= '</p>';
115
- $upsell_box .= '</div>';
116
 
117
  return $upsell_box;
118
  }
@@ -126,8 +118,21 @@ class Modula_Upsells {
126
  $upsell_title = esc_html__( 'Looking for even more control and even more powerful galleries?', 'modula-best-grid-gallery' );
127
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to get access to Fancybox Lightbox extra options, extra styles and more...', 'modula-best-grid-gallery' );
128
 
 
129
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'general' );
130
 
 
 
 
 
 
 
 
 
 
 
 
 
131
  return $tab_content;
132
  }
133
 
@@ -140,8 +145,21 @@ class Modula_Upsells {
140
  $upsell_title = esc_html__( 'Not enough control?', 'modula-best-grid-gallery' );
141
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to unlock the ability to scale an image, and add horizontal/vertical slides...', 'modula-best-grid-gallery' );
142
 
 
143
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'loadingeffects' );
144
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  return $tab_content;
146
 
147
  }
@@ -155,8 +173,21 @@ class Modula_Upsells {
155
  $upsell_title = esc_html__( 'Need new hover effects and cursors ?', 'modula-best-grid-gallery' );
156
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to unlock 41 more hover effects and custom cursors...', 'modula-best-grid-gallery' );
157
 
 
158
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'hovereffects' );
159
 
 
 
 
 
 
 
 
 
 
 
 
 
160
  return $tab_content;
161
 
162
  }
@@ -170,8 +201,21 @@ class Modula_Upsells {
170
  $upsell_title = esc_html__( 'Trying to add a video to your gallery?', 'modula-best-grid-gallery' );
171
  $upsell_description = esc_html__( 'Adding a video gallery with self-hosted videos or videos from sources like YouTube and Vimeo to your website has never been easier.', 'modula-best-grid-gallery' );
172
 
 
173
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'video' );
174
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  return $tab_content;
176
 
177
  }
@@ -185,8 +229,21 @@ class Modula_Upsells {
185
  $upsell_title = esc_html__( 'Looking to make your gallery load faster ?', 'modula-best-grid-gallery' );
186
  $upsell_description = esc_html__( 'Allow Modula to automatically optimize your images to load as fast as possible by reducing their file sizes, resizing them and serving them from StackPath’s content delivery network.', 'modula-best-grid-gallery' );
187
 
 
188
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'speedup' );
189
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  return $tab_content;
191
 
192
  }
@@ -200,8 +257,21 @@ class Modula_Upsells {
200
  $upsell_title = esc_html__( 'Looking to add filters to your gallery?', 'modula-best-grid-gallery' );
201
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to filters and separate the images in your gallery.', 'modula-best-grid-gallery' );
202
 
 
203
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'filters' );
204
 
 
 
 
 
 
 
 
 
 
 
 
 
205
  return $tab_content;
206
 
207
  }
@@ -295,8 +365,21 @@ class Modula_Upsells {
295
  )
296
  );
297
 
 
298
  $tab_content .= $this->generate_upsell_box( $title, $description, 'lightboxes', $features );
299
 
 
 
 
 
 
 
 
 
 
 
 
 
300
  return $tab_content;
301
 
302
  }
@@ -310,8 +393,21 @@ class Modula_Upsells {
310
  $upsell_title = esc_html__( 'Looking to add deeplink functionality to your lightbox or protect your images from stealing?', 'modula-best-grid-gallery' );
311
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Protection and Modula Deeplink add-ons and increase the functionality and copyright your images.', 'modula-best-grid-gallery' );
312
 
 
313
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'misc' );
314
 
 
 
 
 
 
 
 
 
 
 
 
 
315
  return $tab_content;
316
 
317
  }
@@ -325,8 +421,21 @@ class Modula_Upsells {
325
  $upsell_title = esc_html__( 'Looking to protect your galleries with a password ?', 'modula-best-grid-gallery' );
326
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Password Protect add-on and protect your galleries with a password.', 'modula-best-grid-gallery' );
327
 
 
328
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'password' );
329
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  return $tab_content;
331
 
332
  }
@@ -340,8 +449,21 @@ class Modula_Upsells {
340
  $upsell_title = esc_html__( 'Looking to watermark your galleries?', 'modula-best-grid-gallery' );
341
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Watermark add-on and add a watermark to your gallery images.', 'modula-best-grid-gallery' );
342
 
 
343
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'watermark' );
344
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  return $tab_content;
346
 
347
  }
@@ -355,8 +477,21 @@ class Modula_Upsells {
355
  $upsell_title = esc_html__( 'Want to make slideshows from your gallery?', 'modula-best-grid-gallery' );
356
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Slidfeshow add-on allows you to turn your gallery\'s lightbox into a stunning slideshow.', 'modula-best-grid-gallery' );
357
 
 
358
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'slideshow' );
359
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  return $tab_content;
361
 
362
  }
@@ -385,8 +520,21 @@ class Modula_Upsells {
385
  ),
386
  );
387
 
 
388
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'zoom', $features );
389
 
 
 
 
 
 
 
 
 
 
 
 
 
390
  return $tab_content;
391
 
392
  }
@@ -414,8 +562,21 @@ class Modula_Upsells {
414
  ),
415
  );
416
 
 
417
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'exif', $features );
418
 
 
 
 
 
 
 
 
 
 
 
 
 
419
  return $tab_content;
420
 
421
  }
@@ -441,7 +602,20 @@ class Modula_Upsells {
441
  ),
442
  );
443
 
444
- $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'download', $features );
 
 
 
 
 
 
 
 
 
 
 
 
 
445
 
446
  return $tab_content;
447
 
@@ -499,9 +673,8 @@ class Modula_Upsells {
499
  <p>
500
  <?php
501
 
502
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
503
- $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
504
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=sorting-metabox&utm_campaign=modula-sorting" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
505
 
506
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-pro' );
507
 
@@ -532,11 +705,10 @@ class Modula_Upsells {
532
  <p>
533
  <?php
534
 
535
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
536
- $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
537
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=defaults-metabox&utm_campaign=modula-defaults" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
538
 
539
- echo apply_filters( 'modula_upsell_buttons', $buttons, 'defaults' );
540
 
541
  ?>
542
  </p>
@@ -571,11 +743,10 @@ class Modula_Upsells {
571
  <p style="text-align:center">
572
  <?php
573
 
574
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
575
- $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
576
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=roles-metabox&utm_campaign=modula-roles" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
577
 
578
- echo apply_filters( 'modula_upsell_buttons', $buttons, 'roles' );
579
 
580
  ?>
581
  </p>
@@ -593,11 +764,10 @@ class Modula_Upsells {
593
  <p style="text-align:center">
594
  <?php
595
 
596
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
597
- $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
598
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=roles-metabox&utm_campaign=modula-roles" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
599
 
600
- echo apply_filters( 'modula_upsell_buttons', $buttons, 'whitelabel' );
601
 
602
  ?>
603
  </p>
@@ -615,11 +785,10 @@ class Modula_Upsells {
615
  <p>
616
  <?php
617
 
618
- $lite_vs_pro_url = admin_url( 'edit.php?post_type=modula-gallery&page=modula-lite-vs-pro' );
619
- $buttons = '<a target="_blank" href="' . esc_url( $lite_vs_pro_url ) . '" class="button">' . esc_html__( 'See Free vs Premium Differences', 'modula-best-grid-gallery' ) . '</a>';
620
- $buttons .= '<a target="_blank" href="https://wp-modula.com/pricing/?utm_source=upsell&utm_medium=whitelabel-metabox&utm_campaign=modula-whitelabel" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get Premium!', 'modula-best-grid-gallery' ) . '</a>';
621
 
622
- echo apply_filters( 'modula_upsell_buttons', $buttons, 'whitelabel' );
623
 
624
  ?>
625
  </p>
@@ -644,4 +813,23 @@ class Modula_Upsells {
644
 
645
  }
646
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
647
  }
12
  */
13
  private $wpchill_upsells = false;
14
 
15
+ /**
16
+ * The link for the Free vs PRO page
17
+ *
18
+ * @var string
19
+ */
20
+ private $free_vs_pro_link = '#';
21
+
22
  function __construct() {
23
 
24
  if ( class_exists( 'WPChill_Upsells' ) ) {
58
  add_filter( 'modula_exif_tab_content', array( $this, 'exif_tab_upsell' ) );
59
  add_filter( 'modula_zoom_tab_content', array( $this, 'zoom_tab_upsell' ) );
60
 
61
+ if ( $this->wpchill_upsells && $this->wpchill_upsells->is_upgradable_addon( 'modula-albums' ) ) {
62
+ add_filter( 'modula_cpt_metaboxes', array( $this, 'albums_upsell_meta' ) );
63
+ }
64
+
65
  // Add modula whitelabel upsell
66
  if ( ! $this->wpchill_upsells || $this->wpchill_upsells->is_upgradable_addon( 'modula-whitelabel' ) ) {
67
  add_action( 'modula_side_admin_tab', array( $this, 'render_whitelabel_upsell' ) );
75
  add_action( 'load-post.php', array( $this, 'meta_boxes_setup' ) );
76
  add_action( 'load-post-new.php', array( $this, 'meta_boxes_setup' ) );
77
 
78
+ $this->free_vs_pro_link = admin_url('edit.php?post_type=modula-gallery&page=modula-lite-vs-pro');
79
+
80
 
81
  }
82
 
83
  public function generate_upsell_box( $title, $description, $tab, $features = array() ) {
84
 
85
+ $upsell_box = '<h2>' . esc_html( $title ) . '</h2>';
 
86
 
87
  if ( ! empty( $features ) ) {
88
  $upsell_box .= '<ul class="modula-upsell-features">';
104
  $upsell_box .= '</ul>';
105
  }
106
 
 
 
 
 
 
 
 
 
 
 
107
  $upsell_box .= '<p class="modula-upsell-description">' . esc_html( $description ) . '</p>';
 
 
 
 
 
 
 
 
 
 
108
 
109
  return $upsell_box;
110
  }
118
  $upsell_title = esc_html__( 'Looking for even more control and even more powerful galleries?', 'modula-best-grid-gallery' );
119
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to get access to Fancybox Lightbox extra options, extra styles and more...', 'modula-best-grid-gallery' );
120
 
121
+ $tab_content .= '<div class="modula-upsell">';
122
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'general' );
123
 
124
+ $tab_content .= '<p>';
125
+
126
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
127
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-general" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
128
+
129
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'general' );
130
+
131
+ $tab_content .= $buttons;
132
+
133
+ $tab_content .= '</p>';
134
+ $tab_content .= '</div>';
135
+
136
  return $tab_content;
137
  }
138
 
145
  $upsell_title = esc_html__( 'Not enough control?', 'modula-best-grid-gallery' );
146
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to unlock the ability to scale an image, and add horizontal/vertical slides...', 'modula-best-grid-gallery' );
147
 
148
+ $tab_content .= '<div class="modula-upsell">';
149
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'loadingeffects' );
150
 
151
+ $tab_content .= '<p>';
152
+
153
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
154
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-loadingeffects" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
155
+
156
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'loadingeffects' );
157
+
158
+ $tab_content .= $buttons;
159
+
160
+ $tab_content .= '</p>';
161
+ $tab_content .= '</div>';
162
+
163
  return $tab_content;
164
 
165
  }
173
  $upsell_title = esc_html__( 'Need new hover effects and cursors ?', 'modula-best-grid-gallery' );
174
  $upsell_description = esc_html__( 'Upgrade to Modula Premium today to unlock 41 more hover effects and custom cursors...', 'modula-best-grid-gallery' );
175
 
176
+ $tab_content .= '<div class="modula-upsell">';
177
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'hovereffects' );
178
 
179
+ $tab_content .= '<p>';
180
+
181
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
182
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-hovereffects" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
183
+
184
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'hovereffects' );
185
+
186
+ $tab_content .= $buttons;
187
+
188
+ $tab_content .= '</p>';
189
+ $tab_content .= '</div>';
190
+
191
  return $tab_content;
192
 
193
  }
201
  $upsell_title = esc_html__( 'Trying to add a video to your gallery?', 'modula-best-grid-gallery' );
202
  $upsell_description = esc_html__( 'Adding a video gallery with self-hosted videos or videos from sources like YouTube and Vimeo to your website has never been easier.', 'modula-best-grid-gallery' );
203
 
204
+ $tab_content .= '<div class="modula-upsell">';
205
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'video' );
206
 
207
+ $tab_content .= '<p>';
208
+
209
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
210
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-video" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
211
+
212
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-video' );
213
+
214
+ $tab_content .= $buttons;
215
+
216
+ $tab_content .= '</p>';
217
+ $tab_content .= '</div>';
218
+
219
  return $tab_content;
220
 
221
  }
229
  $upsell_title = esc_html__( 'Looking to make your gallery load faster ?', 'modula-best-grid-gallery' );
230
  $upsell_description = esc_html__( 'Allow Modula to automatically optimize your images to load as fast as possible by reducing their file sizes, resizing them and serving them from StackPath’s content delivery network.', 'modula-best-grid-gallery' );
231
 
232
+ $tab_content .= '<div class="modula-upsell">';
233
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'speedup' );
234
 
235
+ $tab_content .= '<p>';
236
+
237
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
238
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-speedup" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
239
+
240
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-speedup' );
241
+
242
+ $tab_content .= $buttons;
243
+
244
+ $tab_content .= '</p>';
245
+ $tab_content .= '</div>';
246
+
247
  return $tab_content;
248
 
249
  }
257
  $upsell_title = esc_html__( 'Looking to add filters to your gallery?', 'modula-best-grid-gallery' );
258
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to filters and separate the images in your gallery.', 'modula-best-grid-gallery' );
259
 
260
+ $tab_content .= '<div class="modula-upsell">';
261
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'filters' );
262
 
263
+ $tab_content .= '<p>';
264
+
265
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
266
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-filters" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
267
+
268
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'filters' );
269
+
270
+ $tab_content .= $buttons;
271
+
272
+ $tab_content .= '</p>';
273
+ $tab_content .= '</div>';
274
+
275
  return $tab_content;
276
 
277
  }
365
  )
366
  );
367
 
368
+ $tab_content .= '<div class="modula-upsell">';
369
  $tab_content .= $this->generate_upsell_box( $title, $description, 'lightboxes', $features );
370
 
371
+ $tab_content .= '<p>';
372
+
373
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
374
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-lightboxes" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
375
+
376
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'lightboxes' );
377
+
378
+ $tab_content .= $buttons;
379
+
380
+ $tab_content .= '</p>';
381
+ $tab_content .= '</div>';
382
+
383
  return $tab_content;
384
 
385
  }
393
  $upsell_title = esc_html__( 'Looking to add deeplink functionality to your lightbox or protect your images from stealing?', 'modula-best-grid-gallery' );
394
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Protection and Modula Deeplink add-ons and increase the functionality and copyright your images.', 'modula-best-grid-gallery' );
395
 
396
+ $tab_content .= '<div class="modula-upsell">';
397
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'misc' );
398
 
399
+ $tab_content .= '<p>';
400
+
401
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
402
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-misc" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
403
+
404
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'misc' );
405
+
406
+ $tab_content .= $buttons;
407
+
408
+ $tab_content .= '</p>';
409
+ $tab_content .= '</div>';
410
+
411
  return $tab_content;
412
 
413
  }
421
  $upsell_title = esc_html__( 'Looking to protect your galleries with a password ?', 'modula-best-grid-gallery' );
422
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Password Protect add-on and protect your galleries with a password.', 'modula-best-grid-gallery' );
423
 
424
+ $tab_content .= '<div class="modula-upsell">';
425
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'password' );
426
 
427
+ $tab_content .= '<p>';
428
+
429
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
430
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-password-protect" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
431
+
432
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-password-protect' );
433
+
434
+ $tab_content .= $buttons;
435
+
436
+ $tab_content .= '</p>';
437
+ $tab_content .= '</div>';
438
+
439
  return $tab_content;
440
 
441
  }
449
  $upsell_title = esc_html__( 'Looking to watermark your galleries?', 'modula-best-grid-gallery' );
450
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Watermark add-on and add a watermark to your gallery images.', 'modula-best-grid-gallery' );
451
 
452
+ $tab_content .= '<div class="modula-upsell">';
453
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'watermark' );
454
 
455
+ $tab_content .= '<p>';
456
+
457
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
458
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-watermark" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
459
+
460
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-watermark' );
461
+
462
+ $tab_content .= $buttons;
463
+
464
+ $tab_content .= '</p>';
465
+ $tab_content .= '</div>';
466
+
467
  return $tab_content;
468
 
469
  }
477
  $upsell_title = esc_html__( 'Want to make slideshows from your gallery?', 'modula-best-grid-gallery' );
478
  $upsell_description = esc_html__( 'Ugrade to Modula Premium today and get access to Modula Slidfeshow add-on allows you to turn your gallery\'s lightbox into a stunning slideshow.', 'modula-best-grid-gallery' );
479
 
480
+ $tab_content .= '<div class="modula-upsell">';
481
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'slideshow' );
482
 
483
+ $tab_content .= '<p>';
484
+
485
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
486
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-slideshow" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
487
+
488
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-slideshow' );
489
+
490
+ $tab_content .= $buttons;
491
+
492
+ $tab_content .= '</p>';
493
+ $tab_content .= '</div>';
494
+
495
  return $tab_content;
496
 
497
  }
520
  ),
521
  );
522
 
523
+ $tab_content .= '<div class="modula-upsell">';
524
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'zoom', $features );
525
 
526
+ $tab_content .= '<p>';
527
+
528
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
529
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-zoom" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
530
+
531
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-zoom' );
532
+
533
+ $tab_content .= $buttons;
534
+
535
+ $tab_content .= '</p>';
536
+ $tab_content .= '</div>';
537
+
538
  return $tab_content;
539
 
540
  }
562
  ),
563
  );
564
 
565
+ $tab_content .= '<div class="modula-upsell">';
566
  $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'exif', $features );
567
 
568
+ $tab_content .= '<p>';
569
+
570
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
571
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-exif" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
572
+
573
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-exif' );
574
+
575
+ $tab_content .= $buttons;
576
+
577
+ $tab_content .= '</p>';
578
+ $tab_content .= '</div>';
579
+
580
  return $tab_content;
581
 
582
  }
602
  ),
603
  );
604
 
605
+ $tab_content .= '<div class="modula-upsell">';
606
+ $tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'download' );
607
+
608
+ $tab_content .= '<p>';
609
+
610
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
611
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-download" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
612
+
613
+ $buttons = apply_filters( 'modula_upsell_buttons', $buttons, 'modula-download' );
614
+
615
+ $tab_content .= $buttons;
616
+
617
+ $tab_content .= '</p>';
618
+ $tab_content .= '</div>';
619
 
620
  return $tab_content;
621
 
673
  <p>
674
  <?php
675
 
676
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
677
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-sorting" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
 
678
 
679
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-pro' );
680
 
705
  <p>
706
  <?php
707
 
708
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
709
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-defaults" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
 
710
 
711
+ echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-defaults' );
712
 
713
  ?>
714
  </p>
743
  <p style="text-align:center">
744
  <?php
745
 
746
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
747
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-roles" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
 
748
 
749
+ echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-roles' );
750
 
751
  ?>
752
  </p>
764
  <p style="text-align:center">
765
  <?php
766
 
767
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
768
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-roles" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
 
769
 
770
+ echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-whitelabel' );
771
 
772
  ?>
773
  </p>
785
  <p>
786
  <?php
787
 
788
+ $buttons = '<a target="_blank" href="' . esc_url( $this->free_vs_pro_link ) . '" class="button">' . esc_html__( 'Free vs PRO', 'modula-best-grid-gallery' ) . '</a>';
789
+ $buttons .= '<a target="_blank" href="https://chl.so/modula-whitelabel" style="margin-top:10px;" class="button-primary button">' . esc_html__( 'Get PRO!', 'modula-best-grid-gallery' ) . '</a>';
 
790
 
791
+ echo apply_filters( 'modula_upsell_buttons', $buttons, 'modula-whitelabel' );
792
 
793
  ?>
794
  </p>
813
 
814
  }
815
 
816
+ /**
817
+ * Add Albums Upsell Metabox
818
+ *
819
+ * @param $met
820
+ * @return mixed
821
+ * @since 2.2.7
822
+ */
823
+ public function albums_upsell_meta( $met ) {
824
+
825
+ $met['modula-albums-upsell'] = array(
826
+ 'title' => esc_html__( 'Albums Upsell', 'modula-best-grid-gallery' ),
827
+ 'callback' => 'output_upsell_albums',
828
+ 'context' => 'normal',
829
+ 'priority' => 5,
830
+ );
831
+
832
+ return $met;
833
+ }
834
+
835
  }
includes/admin/class-wpchill-upsells.php CHANGED
@@ -270,8 +270,9 @@ if ( ! class_exists( 'WPChill_Upsells' ) ) {
270
  */
271
  public function lite_vs_premium( $pro_features ) {
272
 
273
- $upsell_packages = array();
274
- $addons = array();
 
275
 
276
  $lite_plan['modula-lite'] = array(
277
  'name' => esc_html__( 'Modula - LITE', 'modula-best-grid-gallery' ),
@@ -290,12 +291,35 @@ if ( ! class_exists( 'WPChill_Upsells' ) ) {
290
  }
291
 
292
  if ( isset( $packages['upsell_packages'] ) ) {
 
 
 
 
 
 
 
 
 
293
  $upsell_packages = $packages['upsell_packages'];
294
  }
295
 
296
  // Lets sort them by price, higher is better
297
  uasort( $upsell_packages, array( 'WPChill_Upsells', 'sort_data_by_price' ) );
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
299
  // Get our extensions from the heighest paid package as it has all of them
300
  // Also we need to reverse the addons so that they appear in a cascade
301
  if(isset(array_values($upsell_packages)[0]['extensions'])){
@@ -310,8 +334,9 @@ if ( ! class_exists( 'WPChill_Upsells' ) ) {
310
 
311
  // Make the size of the element based on number of addons
312
  if ( count( $upsell_packages ) > 0 ) {
313
- echo '<style>.wpchill-pricing-package {width:' . ( intval( 100 / ( count( $upsell_packages ) + 2 ) ) - 1 ) . '%}.wpchill-plans-table.table-header .wpchill-pricing-package:last-child:before{content:"'.esc_html__('Current package','modula-best-grid-gallery').'";}</style>';
314
  }
 
315
  ?>
316
 
317
  <div class="wpchill-plans-table table-header">
@@ -338,86 +363,82 @@ if ( ! class_exists( 'WPChill_Upsells' ) ) {
338
  $priority .= '<div class="wpchill-pricing-package"><a href="https://wordpress.org/support/plugin/modula-best-grid-gallery/" target="_blank">wp.org</a></div>';
339
  }
340
 
 
 
341
  ?>
342
- <div class="wpchill-pricing-package wpchill-title wpchill-<?php echo esc_attr( $slug ) ?>">
343
  <!--Usually the names are "Plugin name - Package" so we make the explode -->
344
  <p class="wpchill-name"><strong><?php echo esc_html__( isset( explode( '-', $package['name'] )[1] ) ? explode( '-', $package['name'] )[1] : $package['name'] ); ?></strong></p>
345
- <?php
346
-
347
- // Lets display the price and other info about our packages
348
- if ( isset( $package['upgrade_price'] ) && 'modula-lite' != $slug ) {
349
- $price = number_format( $package['upgrade_price'], 2 );
350
- $price_parts = explode( '.', $price );
351
- $normal_price = false;
352
-
353
- if ( isset( $package['normal_price'] ) ) {
354
- $normal_price = number_format( $package['normal_price'], 2 );
355
- $normal_price_parts = explode( '.', $normal_price );
356
- }
357
 
358
- $checkout_page = trailingslashit( $this->shop_url ) . $this->endpoints['checkout'];
359
- $url = add_query_arg( array(
360
- 'edd_action' => 'add_to_cart',
361
- 'download_id' => $package['id'],
362
- 'utm_source' => 'upsell',
363
- 'utm_medium' => 'litevspro',
364
- 'utm_campaign' => $slug,
365
- ), $checkout_page );
 
 
366
 
367
- $buy_button = apply_filters(
368
- 'wpchill-upsells-buy-button',
369
- array( 'url' => $url, 'label' => esc_html__( 'Buy Now', 'modula-best-grid-gallery' ) ),
370
- $slug,
371
- $package,
372
- $this
373
- );
374
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  ?>
376
- <p class="description"><?php echo ( isset( $package['excerpt'] ) ) ? esc_html( $package['excerpt'] ) : ' '; ?></p>
377
- <div class="wpchill-price">
378
- <?php if ( $normal_price ) { ?>
379
- <p class="old-price"><?php echo '$<strong>' . esc_html( $normal_price_parts[0] ) . '</strong><sup>.' . esc_html( $normal_price_parts[1] ) . '</sup>'; ?></p>
380
- <?php } ?>
381
-
382
- <p><?php echo '<sup>$</sup><strong>' . esc_html( $price_parts[0] ) . '</strong><sup>.' . esc_html( $price_parts[1] ) . '</sup>'; ?></p>
383
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  </div>
385
- <a href="<?php echo esc_url( $buy_button['url'] ); ?>" target="_blank" class="button button-primary button-hero">
386
- <?php echo esc_html($buy_button['label']); ?>
387
- </a>
388
  <?php } ?>
389
-
390
  </div>
391
- <?php } ?>
392
- </div>
393
-
394
- <div class="wpchill-plans-table">
395
- <div class="wpchill-pricing-package feature-name">
396
- <?php echo esc_html__( 'Sites', 'modula-best-grid-gallery' ); ?>
397
- </div>
398
- <?php echo $sites; ?>
399
- </div>
400
-
401
- <div class="wpchill-plans-table">
402
- <div class="wpchill-pricing-package feature-name">
403
- <?php echo esc_html__( 'Support', 'modula-best-grid-gallery' ); ?>
404
- </div>
405
- <?php echo $priority; ?>
406
- </div>
407
- <?php
408
 
409
  // Now lets loop through each addon described in LITE version of the plugin
410
  foreach ( $addons as $key => $addon ) {
 
 
 
 
 
 
 
411
  ?>
412
- <div class="wpchill-plans-table">
413
  <div class="wpchill-pricing-package feature-name">
414
- <?php echo esc_html( $addon['name'] ); ?>
415
  <?php
416
  if ( isset( $addon['description'] ) ) {
417
  ?>
418
- <div class="tab-header-tooltip-container modula-tooltip"><span>[?]</span>
419
- <div class="tab-header-description modula-tooltip-content"><?php echo wp_kses_post( $addon['description'] ) ?></div>
420
- </div>
421
  <?php
422
  }
423
  ?>
@@ -440,43 +461,86 @@ if ( ! class_exists( 'WPChill_Upsells' ) ) {
440
  </div>
441
  <?php }
442
 
443
- // Pro features are features that are present in the PRO version of the plugin
444
- // And not in extensions / addons
445
- if ( ! empty( $pro_features ) ) {
446
- foreach ( $pro_features as $pro_feature ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  ?>
448
- <div class="wpchill-plans-table">
449
- <div class="wpchill-pricing-package feature-name">
450
- <?php echo esc_html( $pro_feature['title'] ); ?>
451
- <?php
452
- // Tooltip the description if any
453
- if ( isset( $pro_feature['description'] ) ) {
454
- ?>
455
- <div class="tab-header-tooltip-container modula-tooltip"><span>[?]</span>
456
- <div class="tab-header-description modula-tooltip-content"><?php echo wp_kses_post( $pro_feature['description'] ) ?></div>
457
- </div>
458
- <?php
 
 
459
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  ?>
461
- </div>
462
 
463
- <?php
464
- // Now let's go through our packages
465
- foreach ( $all_packages as $slug => $upsell ) { ?>
466
- <div class="wpchill-pricing-package">
467
- <?php
468
- // We need the LITE version because if there is no license key / current package the LITE will be a package also
469
- if ( 'modula-lite' != $slug ) {
470
- echo '<span class="dashicons dashicons-saved"></span>';
471
- } else {
472
- echo '<span class="dashicons dashicons-no-alt"></span>';
473
- }
474
- ?>
475
  </div>
476
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
477
  </div>
478
- <?php }
479
- }
 
 
480
  }
481
 
482
  /**
270
  */
271
  public function lite_vs_premium( $pro_features ) {
272
 
273
+ $upsell_packages = array();
274
+ $addons = array();
275
+ $current_upsell_extensions = isset( $_GET['extension'] ) ? $_GET['extension'] : false;
276
 
277
  $lite_plan['modula-lite'] = array(
278
  'name' => esc_html__( 'Modula - LITE', 'modula-best-grid-gallery' ),
291
  }
292
 
293
  if ( isset( $packages['upsell_packages'] ) ) {
294
+
295
+ // We don't want the lifetime deals here
296
+ foreach ( $packages['upsell_packages'] as $key => $package ) {
297
+
298
+ if ( strpos( $key,'lifetime' ) > 0 ) {
299
+ unset( $packages['upsell_packages'][ $key ] );
300
+ }
301
+ }
302
+
303
  $upsell_packages = $packages['upsell_packages'];
304
  }
305
 
306
  // Lets sort them by price, higher is better
307
  uasort( $upsell_packages, array( 'WPChill_Upsells', 'sort_data_by_price' ) );
308
 
309
+ // If only LITE then we do not want all the packages, only the highest one
310
+ if ( $pro_features && count( $pro_features ) > 0 ) {
311
+
312
+ if ( is_array( $upsell_packages ) && ! empty( $upsell_packages ) ) {
313
+ $first_key = array_key_first( $upsell_packages );
314
+ $upsell_packages = array_slice( $upsell_packages, 0, 1 );
315
+ $upsell_packages[ $first_key ]['name'] = esc_html__( 'PRO', 'modula-best-grid-gallery' );
316
+ unset( $upsell_packages[ $first_key ]['upgrade_price'] );
317
+ unset( $upsell_packages[ $first_key ]['excerpt'] );
318
+ unset( $upsell_packages[ $first_key ]['extra_features']['sites'] );
319
+ }
320
+
321
+ }
322
+
323
  // Get our extensions from the heighest paid package as it has all of them
324
  // Also we need to reverse the addons so that they appear in a cascade
325
  if(isset(array_values($upsell_packages)[0]['extensions'])){
334
 
335
  // Make the size of the element based on number of addons
336
  if ( count( $upsell_packages ) > 0 ) {
337
+ echo '<style>.wpchill-pricing-package {width:' . ( intval( 100 / ( count( $upsell_packages ) + 2 ) ) - 1 ) . '%}.wpchill-plans-table.table-header .wpchill-pricing-package:not(.wpchill-modula-lite):last-child:before{content:"'.esc_html__('Current package','modula-best-grid-gallery').'";}</style>';
338
  }
339
+
340
  ?>
341
 
342
  <div class="wpchill-plans-table table-header">
363
  $priority .= '<div class="wpchill-pricing-package"><a href="https://wordpress.org/support/plugin/modula-best-grid-gallery/" target="_blank">wp.org</a></div>';
364
  }
365
 
366
+ $package_class = 'wpchill-pricing-package wpchill-title wpchill-'.$slug;
367
+
368
  ?>
369
+ <div class="<?php echo esc_attr($package_class); ?>">
370
  <!--Usually the names are "Plugin name - Package" so we make the explode -->
371
  <p class="wpchill-name"><strong><?php echo esc_html__( isset( explode( '-', $package['name'] )[1] ) ? explode( '-', $package['name'] )[1] : $package['name'] ); ?></strong></p>
372
+ <?php echo ( isset( $package['excerpt'] ) ) ? '<p class="description">' . esc_html( $package['excerpt'] ) . '</p>' : ''; ?>
373
+ </div>
374
+ <?php } ?>
375
+ </div>
 
 
 
 
 
 
 
 
376
 
377
+ <?php if ( ! $pro_features || count( $pro_features ) === 0 ) {
378
+ ?>
379
+ <div class="wpchill-plans-table">
380
+ <div class="wpchill-pricing-package feature-name">
381
+ <h3><?php echo esc_html__( 'Sites', 'modula-best-grid-gallery' ); ?></h3>
382
+ </div>
383
+ <?php echo $sites; ?>
384
+ </div>
385
+ <?php
386
+ }
387
 
 
 
 
 
 
 
 
388
 
389
+ // Pro features are features that are present in the PRO version of the plugin
390
+ // And not in extensions / addons
391
+ if ( ! empty( $pro_features ) ) {
392
+ foreach ( $pro_features as $pro_feature ) {
393
+ ?>
394
+ <div class="wpchill-plans-table">
395
+ <div class="wpchill-pricing-package feature-name">
396
+ <h3><?php echo esc_html( $pro_feature['title'] ); ?></h3>
397
+ <?php
398
+ // Tooltip the description if any
399
+ if ( isset( $pro_feature['description'] ) ) {
400
+ ?>
401
+ <p class="tab-header-description modula-tooltip-content"><?php echo wp_kses_post( $pro_feature['description'] ) ?></p>
402
+ <?php
403
+ }
404
  ?>
405
+ </div>
 
 
 
 
 
 
406
 
407
+ <?php
408
+ // Now let's go through our packages
409
+ foreach ( $all_packages as $slug => $upsell ) { ?>
410
+ <div class="wpchill-pricing-package">
411
+ <?php
412
+ // We need the LITE version because if there is no license key / current package the LITE will be a package also
413
+ if ( 'modula-lite' != $slug ) {
414
+ echo '<span class="dashicons dashicons-saved"></span>';
415
+ } else {
416
+ echo '<span class="dashicons dashicons-no-alt"></span>';
417
+ }
418
+ ?>
419
  </div>
 
 
 
420
  <?php } ?>
 
421
  </div>
422
+ <?php }
423
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
 
425
  // Now lets loop through each addon described in LITE version of the plugin
426
  foreach ( $addons as $key => $addon ) {
427
+
428
+ $addon_class = '';
429
+
430
+ if ( $current_upsell_extensions && $key == $current_upsell_extensions ) {
431
+
432
+ $addon_class = 'wpchill-highlight';
433
+ }
434
  ?>
435
+ <div class="wpchill-plans-table <?php echo esc_attr( $addon_class ); ?>">
436
  <div class="wpchill-pricing-package feature-name">
437
+ <h3><?php echo esc_html( $addon['name'] ); ?></h3>
438
  <?php
439
  if ( isset( $addon['description'] ) ) {
440
  ?>
441
+ <p><?php echo wp_kses_post( $addon['description'] ) ?></p>
 
 
442
  <?php
443
  }
444
  ?>
461
  </div>
462
  <?php }
463
 
464
+ ?>
465
+ <div class="wpchill-plans-table">
466
+ <div class="wpchill-pricing-package feature-name">
467
+ <h3><?php echo esc_html__( 'Support', 'modula-best-grid-gallery' ); ?></h3>
468
+ </div>
469
+ <?php echo $priority; ?>
470
+ </div>
471
+ <div class="wpchill-plans-table tabled-footer">
472
+ <div class="wpchill-pricing-package wpchill-empty">
473
+ <!--This is an empty div so that we can have an empty corner-->
474
+ </div>
475
+ <?php
476
+ foreach ( $all_packages as $slug => $package ) {
477
+
478
+
479
+ $package_class = 'wpchill-pricing-package wpchill-title wpchill-'.$slug;
480
+
481
  ?>
482
+ <div class="<?php echo esc_attr( $package_class ); ?>">
483
+
484
+ <?php
485
+
486
+ // Lets display the price and other info about our packages
487
+ if ( isset( $package['upgrade_price'] ) && 'modula-lite' != $slug ) {
488
+ $price = number_format( $package['upgrade_price'], 2 );
489
+ $price_parts = explode( '.', $price );
490
+ $normal_price = false;
491
+
492
+ if ( isset( $package['normal_price'] ) ) {
493
+ $normal_price = number_format( $package['normal_price'], 2 );
494
+ $normal_price_parts = explode( '.', $normal_price );
495
  }
496
+
497
+ $checkout_page = trailingslashit( $this->shop_url ) . $this->endpoints['checkout'];
498
+ $url = add_query_arg( array(
499
+ 'edd_action' => 'add_to_cart',
500
+ 'download_id' => $package['id'],
501
+ 'utm_source' => 'upsell',
502
+ 'utm_medium' => 'litevspro',
503
+ 'utm_campaign' => $slug,
504
+ ), $checkout_page );
505
+
506
+ $buy_button = apply_filters(
507
+ 'wpchill-upsells-buy-button',
508
+ array( 'url' => $url,
509
+ 'label' => esc_html__( 'Buy Now', 'modula-best-grid-gallery' )
510
+ ),
511
+ $slug,
512
+ $package,
513
+ $this
514
+ );
515
  ?>
 
516
 
517
+ <div class="wpchill-price">
518
+ <?php if ( $normal_price ) { ?>
519
+ <p class="old-price"><?php echo '$<strong>' . esc_html( $normal_price_parts[0] ) . '</strong><sup>.' . esc_html( $normal_price_parts[1] ) . '</sup>'; ?></p>
520
+ <?php } ?>
521
+
522
+ <p><?php echo '<sup>$</sup><strong>' . esc_html( $price_parts[0] ) . '</strong><sup>.' . esc_html( $price_parts[1] ) . '</sup>'; ?></p>
523
+
 
 
 
 
 
524
  </div>
525
+ <a href="<?php echo esc_url( $buy_button['url'] ); ?>" target="_blank"
526
+ class="button button-primary button-hero">
527
+ <?php echo esc_html( $buy_button['label'] ); ?>
528
+ </a>
529
+ <?php
530
+ } else if ( isset( $lite_plan['modula-lite'] ) && 'modula-lite' !== $slug ) {
531
+ ?>
532
+ <a href="https://chl.so/lite-vs-pro-page" target="_blank"
533
+ class="button button-primary button-hero "><span class="dashicons dashicons-cart"></span>
534
+ <?php echo esc_html__( 'Upgrade now!', 'modula-best-grid-gallery' ); ?>
535
+ </a>
536
+ <?php
537
+ } ?>
538
+
539
  </div>
540
+ <?php } ?>
541
+ </div>
542
+ <?php
543
+
544
  }
545
 
546
  /**
includes/admin/tabs/about.php CHANGED
@@ -2,11 +2,10 @@
2
  $issues = array(
3
  'added' => array(),
4
  'changed' => array(
5
- esc_html__( 'Albums upsell' ),
6
- esc_html__( 'Free vs Premium page and Upsells integration' ),
7
  ),
8
  'fixed' => array(
9
- esc_html__( 'Added data-srcset and data-sizes attributes for lazy load functionality', 'modula-best-grid-gallery' ),
10
  )
11
  );
12
 
2
  $issues = array(
3
  'added' => array(),
4
  'changed' => array(
5
+ esc_html__( 'Free vs PRO page and Upsells integration' ),
 
6
  ),
7
  'fixed' => array(
8
+ esc_html__( 'Image cropping based on image alignment', 'modula-best-grid-gallery' ),
9
  )
10
  );
11
 
includes/admin/templates/modal/modula-modal-upgrade.php CHANGED
@@ -24,8 +24,8 @@
24
  <?php
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__( 'See Free vs Premium Differences', '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 Premium!', 'modula-best-grid-gallery' ) . '</a>';
29
 
30
  echo apply_filters( 'modula_upsell_buttons', $buttons, 'albums' );
31
 
24
  <?php
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://chl.so/get-albums-modal" 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/public/modula-helper-functions.php CHANGED
@@ -46,8 +46,31 @@ function modula_generate_image_links( $item_data, $item, $settings ){
46
  }
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  $sizes = $resizer->get_image_size( $item['id'], $gallery_type, $grid_sizes, $crop );
50
- $resized = $resizer->resize_image( $sizes['url'], $sizes['width'], $sizes['height'], $crop );
51
  $image_info = false;
52
 
53
  // If we couldn't resize the image we will return the full image.
46
  }
47
  }
48
 
49
+ $align = 'c';
50
+
51
+ if ( 'top' == $item['valign'] ) {
52
+ $valign = 't';
53
+ } else if ( 'bottom' == $item['valign'] ) {
54
+ $valign = 'b';
55
+ } else {
56
+ $valign = 'c';
57
+ }
58
+
59
+ if ( 'left' == $item['halign'] ) {
60
+ $halign = 'l';
61
+ } else if ( 'right' == $item['halign'] ) {
62
+ $halign = 'r';
63
+ } else {
64
+ $halign = 'c';
65
+ }
66
+
67
+ if ( $valign !== $halign ) {
68
+ $align = $valign . $halign;
69
+ }
70
+
71
+
72
  $sizes = $resizer->get_image_size( $item['id'], $gallery_type, $grid_sizes, $crop );
73
+ $resized = $resizer->resize_image( $sizes['url'], $sizes['width'], $sizes['height'], $crop, $align );
74
  $image_info = false;
75
 
76
  // If we couldn't resize the image we will return the full image.
readme.txt CHANGED
@@ -4,89 +4,154 @@ Tags: best gallery plugin, image gallery, video gallery, free gallery, wordpress
4
  Requires at least: 5.2
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
7
- Stable tag: 2.5.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.
11
 
12
- == Description ==
13
-
14
- Impress your potential clients with a fully customizable WordPress gallery plugin that's fully mobile responsive, doesn't slow down your website and doesn't require a single line of code to work.
15
-
16
- If you're tired of lacking control over how your galleries end up looking, the bad image cropping, the lack of control over your photos, videos and how they look on mobile devices - you don't have to look any further.
17
-
18
- Modula **fixes all of the above** and more. Read on to see what we're all about.
19
-
20
- = Unlock even more features with Modula Pro =
21
-
22
- * Defaults Extension: easily create galleries with the same settings starting from a preset. Add a new gallery, select a preset previously created then just add your images. It's lightning fast to create galleries, without having to manually tweak gallery settings every time you create a new one.
23
- * [Video Extension](https://wp-modula.com/demo/video-gallery/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): combine videos with images in your galleries. Works with YouTube, Vimeo and self-hosted videos.
24
- * [Slideshow](https://wp-modula.com/demo/modula-slideshow?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): convert your gallery's lightbox view into a stunning slideshow.
25
- * [Password Protect]((https://wp-modula.com/demo/password-protection?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): block access to your galleries by using a password. Great for giving access to your clients to specific gallery pages.
26
- * [Slider]((https://wp-modula.com/demo/modula-slider?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): convert your gallery into a beautiful slider. Slider can be synced with a thumbnail strip below it. You can switch it up by adding different elements to the slider: dots, arrows, a fade effect, infinite loop, center mode and more.
27
- * [Gallery Filters]((https://wp-modula.com/demo/filterable-wordpress-galleries?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): Allow your website's visitors to easily sort through your gallery by applying one or more filters to your images.
28
- * [Albums](https://wp-modula.com/demo/albums?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): create albums, add galleries, manage cover photos, show gallery titles, select hover effect, grid type, randomize album order, randomize album cover photo and display album image counts.
29
- * [Deeplink](https://wp-modula.com/demo/deeplinking/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): you can create a unique (and indexable URL - as in Google can access and index this).
30
- * [Image Loading Effects](https://wp-modula.com/demo/image-loaded-effects/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): add animations: Rotate or Horizontally/Vertically animate the images on each page loads.
31
- * [Hover effects](https://wp-modula.com/demo/hover-effects/appear/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): access to over 50+ built-in image hover effects.
32
- * Gallery Sorting: sort the images from your gallery based on: date created, date modified, alphabetically, reverse or random.
33
- * Right-Click Protection: use it to prevent visitors from downloading your images with right-click protection. Also disables keyboard shortcuts for download images.
34
- * Watermark: protect your photos by adding custom watermarks.
35
- * Advanced Shortcodes: you can dynamically link to specific galleries without creating pages for them by using URLs with query strings.
36
- * Speed UP: using this extension you can optimize your images by reducing their file sizes, resizing them through ShortPixel's image optimization algorithms and serve them from StackPath's CDN (content delivery network). The result? A really REALLY fast website without the high costs associated.
37
- * Migration tool: great if you're looking to move over your gallery from any of our competitors. Works great now with NextGen, Envira, Final Tiles Grid Gallery, Photoblocks and even native WordPress galleries can be converted to Modula.
38
- * Import/Export tool: really great for moving your galleries to another site without jumping through hoops.
39
- * Email support
40
- * Support and updates, included with each purchase, for 1 year.
 
 
 
41
  >
42
  >[Learn more about Modula Pro.](https://wp-modula.com/pricing?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)**
43
 
44
- **the author was also very responsive with support**
45
- >I had been searching for a gallery that lets me decide the size/cropping for EACH image. This cool plugin does exactly that!
46
 
47
- **I don’t often leave reviews, but I really love Modula!**
48
- >I’m a HUGE fan of the free Modula and the Pro version is WAY more amazing. I haven’t had any problems and I am confident their support would be responsive if I did.
49
 
50
- >Another happy Modula user.
51
 
52
- = Even more happy Modula users =
53
- >1. I really like the plugin and would recommend to anyone want to create a cool gallery! Great and quick customer support, thank you for helping me solve problem!
54
- >2. I had paid good money for the leading gallery plugin. But it didn’t create links of the photos so I could send people to a shopping cart for that image. Modula does. BIG advantage. Plus the customer service is top notch. Thanks Modula!
55
- >3. There is a lot of gallery plugins but for some reason, they are not 100% masonry – they layout the photos often in an ugly way, and not at an even height. This plugin makes a perfect masonry, what is the main reason I use it.
56
 
57
- Still not convinced? Check our what our [raving users had to say about Modula](https://wordpress.org/support/plugin/modula-best-grid-gallery/reviews/?filter=5)
58
 
59
- = SEE HOW EASY IT IS TO CREATE A PHOTO OR VIDEO GALLERY WITH MODULA =
60
- https://www.youtube.com/watch?v=NxrTXQNExh4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  **SOME MODULA DEMO APPLICATIONS / USAGES**
63
 
 
64
  Not sure if Modula is the right gallery plugin for you? We encourage you to take a look at other gallery plugins, but one thing you'll notice is that **they all look the same...**
65
 
66
  **Sick and tired of boring galleries? Make your own and stand out with Modula.**
 
67
  Galleries created with Modula don't always look identical. With the Modula custom grid functionality, you can easily adjust the size and aspect ratio of each individual image by dragging from the bottom right-hand corner in the gallery edit area.
 
68
  Custom grids give you greater flexibility over how you display the images on your website. Easily control the size and look of your gallery - choosing the images you want to stand out, rather than relying on an algorithm.
 
69
  Yes, that means you don't have to worry about your gallery awkwardly cropping out your subject or your subject not being at the center of the image.
70
 
71
- **Modula is the most powerful, customizable and easy-to-use WordPress gallery plugin** available because we give you the power to choose everything from the height and width of your gallery down to resizing individual images within the container that makes sure your images never exceed the content area.
72
 
73
  **Ease-of-use shouldn't mean sample/basic Galleries**
74
- Modula has been designed to be user-friendly from the ground up so that users of varying WordPress experience can easily create the perfect WordPress photo, video and image galleries.
75
- If you don't want all the customization features, you can leave everything up to the algorithm, and if you do - they're there so you can easily choose gallery size, margins between images, the color and size of captions.
76
- If you can't seem to figure something out, you can always check our [documentation](https://wp-modula.com/docs) or [get in touch](https://wp-modula.com/contact-us) - we're always happy to help...
77
 
78
- == 3rd party or external service disclaimer ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
 
80
- The plugin sends data (User action) to our website through an API Call (https://tracking.wp-modula.com/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
 
82
  The plugin connects to our website through an API call (https://wp-modula.com/wp-json/mt/v1/get-all-extensions) in order to request a list of available extensions.
83
 
84
- **Modula Gallery does not send any data without consent or user action to our website, nor do we collect sensitive information from the requests.**
85
 
86
- Our full privacy policy can be found [here](https://wp-modula.com/privacy-policy/).
87
 
88
  == Installation ==
89
-
90
  = For automatic installation: =
91
 
92
  The simplest way to install is to click on \'Plugins\' then \'Add\' and type \'Modula\' in the search field.
@@ -99,7 +164,9 @@ The simplest way to install is to click on \'Plugins\' then \'Add\' and type \'M
99
  4. Select the plugin zip file (modula.x.x.x.zip) from your computer then click the Install Now button.
100
  5. You should see a message stating that the plugin was installed successfully.
101
  6. Click the Activate Plugin link.
 
102
  = For manual installation 2: =
 
103
  1. You should have access to the server where WordPress is installed. If you don\'t, see your system administrator.
104
  2. Copy the plugin zip file (modula.x.x.x.zip) up to your server and unzip it somewhere on the file system.
105
  3. Copy the \"modula-lite\" folder into the /wp-content/plugins directory of your WordPress installation.
@@ -109,18 +176,36 @@ The simplest way to install is to click on \'Plugins\' then \'Add\' and type \'M
109
  == Frequently Asked Questions ==
110
 
111
  = The layout doesn't look correct =
 
112
  Check the console of the browser and look if you see any error like: "Uncaught TypeError: undefined is not a function"
113
  This errors means that the browser doesn't know the Modula JavaScript plugin, most of the time the problem is caused by a wrong jQuery inclusion by the theme or another plugin.
 
114
  = Why does some image look blurry ? =
 
115
  If you get blurry and pixellated images then you need to raise the "Minimum image width" parameter inside the "General" section.
 
116
  = I want to use another lightbox instead of the provided one =
117
- That is no longer officially supported. However, we do offer a freely downloadable lightbox extension that brings back support for 5 more lighboxes. You can read more about it [here](https://wp-modula.com/modula-230/)
 
 
118
  = How can I change the lightbox's background? =
119
- This is a feature available with every Modula PRO purchase.
 
 
 
 
 
 
120
  = How can I get support? =
121
- By asking a question on the [support forums](https://wordpress.org/support/plugin/modula-best-grid-gallery/) or by [contacting us](https://wp-modula.com/contact-us/).
 
 
122
  = How can I say thanks? =
123
- * Just recommend our plugin to your friends!
 
 
 
 
124
  == Screenshots ==
125
 
126
  1. Custom Grid - Freely resize images
@@ -130,4 +215,4 @@ By asking a question on the [support forums](https://wordpress.org/support/plugi
130
 
131
  == Changelog ==
132
 
133
- See <a href="https://github.com/wpchill/modula-lite/blob/dev/changelog.txt" target="_blank">changelog</a>
4
  Requires at least: 5.2
5
  Tested up to: 5.8
6
  Requires PHP: 5.6
7
+ Stable tag: 2.5.4
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.
11
 
12
+ == Description ==
13
+
14
+ With Modula, it's easier than ever to build stunning [lightbox galleries](https://demo.wp-modula.com/lightbox-gallery?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite), masonry grids, custom grids and more in no more than a few clicks right from the WordPress dashboard.
15
+
16
+ Modula is the best WordPress gallery plugin for adding custom, unique and responsive galleries to your website. There is a free version of Modula available (Modula Lite) and a premium version (Modula Pro) both of which will allow you to add amazing, fast-loading galleries to your website.
17
+
18
+
19
+ = SEE HOW EASY IT IS TO CREATE A PHOTO GALLERY WITH MODULA =
20
+
21
+ https://www.youtube.com/watch?v=NxrTXQNExh4
22
+
23
+ > **Premium features only available in Modula Pro:**
24
+
25
+ > * Defaults Extension: easily create galleries with the same settings starting from a preset. Add a new gallery, select a preset previously created then just add your images. It's lightning fast to create galleries, without having to manually tweak gallery settings every time you create a new one.
26
+ > * [Video Extension](https://demo.wp-modula.com/video-gallery/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): combine videos with images in your galleries. Works with YouTube, Vimeo and self-hosted videos.
27
+ > * [Slideshow](https://demo.wp-modula.com/modula-slideshow?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): convert your gallery's lightbox view into a stunning slideshow.
28
+ > * [Password Protect]((https://demo.wp-modula.com/password-protection?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): block access to your galleries by using a password. Great for giving access to your clients to specific gallery pages.
29
+ > * [Slider]((https://demo.wp-modula.com/modula-slider?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): convert your gallery into a beautiful slider. Slider can be synced with a thumbnail strip below it. You can switch it up by adding different elements to the slider: dots, arrows, a fade effect, infinite loop, center mode and more.
30
+ > * [Gallery Filters]((https://demo.wp-modula.com/filterable-wordpress-galleries?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): Allow your website's visitors to easily sort through your gallery by applying one or more filters to your images.
31
+ > * [Albums](https://demo.wp-modula.com/albums?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)): create albums, add galleries, manage cover photos, show gallery titles, select hover effect, grid type, randomize album order, randomize album cover photo and display album image counts.
32
+ > * [Deeplink](https://demo.wp-modula.com/deeplinking/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): you can create a unique (and indexable URL - as in Google can access and index this).
33
+ > * [Image Loading Effects](https://demo.wp-modula.com/image-loaded-effects/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): add animations: Rotate or Horizontally/Vertically animate the images on each page loads.
34
+ > * [Hover effects](https://demo.wp-modula.com/hover-effects/appear/?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite): access to over 50+ built-in image hover effects.
35
+ > * Gallery Sorting: sort the images from your gallery based on: date created, date modified, alphabetically, reverse or random.
36
+ > * Right-Click Protection: use it to prevent visitors from downloading your images with right-click protection. Also disables keyboard shortcuts for download images.
37
+ > * Watermark: protect your photos by adding custom watermarks.
38
+ > * Advanced Shortcodes: you can dynamically link to specific galleries without creating pages for them by using URLs with query strings.
39
+ > * Speed UP: using this extension you can optimize your images by reducing their file sizes, resizing them through ShortPixel's image optimization algorithms and serve them from StackPath's CDN (content delivery network). The result? A really REALLY fast website without the high costs associated.
40
+ > * Migration tool: great if you're looking to move over your gallery from any of our competitors. Works great now with NextGen, Envira, Final Tiles Grid Gallery, Photoblocks and even native WordPress galleries can be converted to Modula.
41
+ > * Import/Export tool: really great for moving your galleries to another site without jumping through hoops.
42
+ > * Email support
43
+ > * Support and updates, included with each purchase, for 1 year.
44
  >
45
  >[Learn more about Modula Pro.](https://wp-modula.com/pricing?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)**
46
 
 
 
47
 
48
+ **SEE MODULA GALLERIES IN ACTION**
 
49
 
 
50
 
51
+ Want to see how easy it is to create a filterable WordPress gallery with Modula? [Click here.](https://demo.wp-modula.com/filterable-wordpress-galleries?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
 
 
 
52
 
53
+ * [Modula Filterable Gallery Demo](https://demo.wp-modula.com/filters?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
54
 
55
+
56
+ * [Custom Grid Gallery](https://demo.wp-modula.com/custom-grid?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
57
+
58
+ **[40+ Built-In Hover Effects](https://demo.wp-modula.com/effects/appear?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)**
59
+
60
+ The Modula [WordPress gallery plugin](https://wp-modula.com?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite) comes with 12 stunning and creative hover effects built in. Using an effect is a great, simple way to engage your audience. All hover effects are unique and can be used with a title, short description and social icons, resulting in unique and contemporary galleries. The effects are designed to be cross-browser compatible and with the use of modern techniques like CSS3 animations, the effects work perfectly on mobile devices too.
61
+
62
+ * [Appear](https://demo.wp-modula.com/hover-effects/appear?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
63
+ * [Cantinelle](https://demo.wp-modula.com/hover-effects/catinelle?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
64
+ * [Comodo](https://demo.wp-modula.com/hover-effects/comodo?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
65
+ * [Crafty](https://demo.wp-modula.com/hover-effects/crafty?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
66
+ * [Curtain](https://demo.wp-modula.com/hover-effects/curtain?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
67
+ * [Fluid Up](https://demo.wp-modula.com/hover-effects/fluid-up?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
68
+ * [Hide](https://demo.wp-modula.com/hover-effects/hide?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
69
+ * [Lens](https://demo.wp-modula.com/hover-effects/lens?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
70
+ * [Pufrobo](https://demo.wp-modula.com/hover-effects/pufrobo?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
71
+ * [Quiet](https://demo.wp-modula.com/hover-effects/quiet?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
72
+ * [Reflex](https://demo.wp-modula.com/hover-effects/reflex?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
73
+ * [Seemo](https://demo.wp-modula.com/hover-effects/seemo?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
74
+
75
+
76
+
77
+ To insert a gallery onto a WordPress post/page all you need to do is copy the shortcode from your Modula gallery edit page.
78
+
79
+ Your shortcode will look just like this:
80
+
81
+ > [Modula id="1192"]
82
 
83
  **SOME MODULA DEMO APPLICATIONS / USAGES**
84
 
85
+
86
  Not sure if Modula is the right gallery plugin for you? We encourage you to take a look at other gallery plugins, but one thing you'll notice is that **they all look the same...**
87
 
88
  **Sick and tired of boring galleries? Make your own and stand out with Modula.**
89
+
90
  Galleries created with Modula don't always look identical. With the Modula custom grid functionality, you can easily adjust the size and aspect ratio of each individual image by dragging from the bottom right-hand corner in the gallery edit area.
91
+
92
  Custom grids give you greater flexibility over how you display the images on your website. Easily control the size and look of your gallery - choosing the images you want to stand out, rather than relying on an algorithm.
93
+
94
  Yes, that means you don't have to worry about your gallery awkwardly cropping out your subject or your subject not being at the center of the image.
95
 
96
+ Modula is the most powerful, customizable and easy-to-use WordPress gallery plugin available because we give you the power to choose everything from the height and width of your gallery down to resizing individual images within the container that makes sure your images never exceed the content area.
97
 
98
  **Ease-of-use shouldn't mean sample/basic Galleries**
 
 
 
99
 
100
+ Modula has been designed to be user-friendly from the ground up so that users of varying WordPress experience can easily create the perfect WordPress photo and image galleries. If you don't want all the customization features, you can leave everything up to the algorithm, and if you do - they're there so you can easily choose gallery size, margins between images, the color and size of captions.
101
+
102
+ If you can't seem to figure something out, you can always check our [documentation](https://modula.helpscoutdocs.com) or [get in touch](https://wp-modula.com/contact-us) - we're always happy to help...
103
+
104
+ **What is Modula good for?**
105
+
106
+ Modula is also the best WordPress portfolio plugin as it allows you to easily showcase your amazing work in a stunning gallery. Other applications include:
107
+
108
+ * [Architecture](https://demo.wp-modula.com/applications/architecture?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
109
+
110
+ Modula is the perfect gallery to highlight the details of your architecture work. You can show your photos and drawings in a dynamic and fluid grid and add a short description to explain the subject of each item.
111
+
112
+ * [Art Showcase](https://demo.wp-modula.com/applications/art-gallery?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
113
+
114
+ Modula is the best gallery plugin to showcase your artistic, and creative work - it is extremely user-friendly, and offers a range of flexible customization options so you can make galleries just as amazing as your artwork.
115
+
116
+ * [Photography Portfolio](https://demo.wp-modula.com/applications/blackwhite-photography?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
117
+
118
+ Showcase your photography portfolio in a professional and creative way with Modula's ability to add captions, change lightbox styles, and add hover effects to each image.
119
+
120
+ * [Food Gallery](https://demo.wp-modula.com/applications/food?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
121
 
122
+ Modula is the perfect image gallery plugin for **food blogs** and **restaurant** websites. Let your delicious meals speak for themselves in your unique and creative galleries created with Modula.
123
+
124
+
125
+ * [Pets Gallery](https://demo.wp-modula.com/applications/pets-animals?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
126
+
127
+ Give your **pet blog** a stylish and unique touch with Modula Grid Gallery.
128
+
129
+ * [Tattoo Showcase](https://demo.wp-modula.com/applications/tattoo-attitude?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
130
+
131
+ Whether you are a **tattooist** or a **tattoo enthusiast** blogger, Modula is the perfect portfolio gallery plugin to create galleries and show your artistic work. Easily and quickly create your stunning galleries and make people share your tattoos by using the built-in social sharing functionality.
132
+
133
+ * [Travel Gallery](https://demo.wp-modula.com/applications/travel-gallery?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
134
+
135
+ **Who doesn't love traveling?** Use Modula to create stunning galleries to engage your travel blog or travel agency website's visitors.
136
+
137
+ * [Wedding Album
138
+ ](https://demo.wp-modula.com/applications/wedding-album?utm_source=wordpress.org&utm_medium=web&utm_campaign=Modula%20Lite)
139
+
140
+ Your **wedding** day has to be perfect, right? So, why not make the perfect **wedding album**?
141
+
142
+ Modula is the perfect WordPress photo gallery plugin if you're a wedding planner, wedding blogger or building your own wedding website.
143
+
144
+ *Be as proud of your wedding album as you are of your wedding.*
145
+
146
+ == 3rd party or external service disclaimer ==
147
 
148
  The plugin connects to our website through an API call (https://wp-modula.com/wp-json/mt/v1/get-all-extensions) in order to request a list of available extensions.
149
 
150
+ IT DOES NOT SEND ANY DATA NOR DO WE COLLECT INFORMATION FROM THE REQUEST
151
 
152
+ Our privacy policy can be found at this URL https://wp-modula.com/privacy-policy/
153
 
154
  == Installation ==
 
155
  = For automatic installation: =
156
 
157
  The simplest way to install is to click on \'Plugins\' then \'Add\' and type \'Modula\' in the search field.
164
  4. Select the plugin zip file (modula.x.x.x.zip) from your computer then click the Install Now button.
165
  5. You should see a message stating that the plugin was installed successfully.
166
  6. Click the Activate Plugin link.
167
+
168
  = For manual installation 2: =
169
+
170
  1. You should have access to the server where WordPress is installed. If you don\'t, see your system administrator.
171
  2. Copy the plugin zip file (modula.x.x.x.zip) up to your server and unzip it somewhere on the file system.
172
  3. Copy the \"modula-lite\" folder into the /wp-content/plugins directory of your WordPress installation.
176
  == Frequently Asked Questions ==
177
 
178
  = The layout doesn't look correct =
179
+
180
  Check the console of the browser and look if you see any error like: "Uncaught TypeError: undefined is not a function"
181
  This errors means that the browser doesn't know the Modula JavaScript plugin, most of the time the problem is caused by a wrong jQuery inclusion by the theme or another plugin.
182
+
183
  = Why does some image look blurry ? =
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/)
202
+
203
  = How can I say thanks? =
204
+
205
+ * Just recommend our plugin to your friends! or
206
+ * Follow us on [Twitter](https://twitter.com/wpchillhq "Twitter")
207
+
208
+
209
  == Screenshots ==
210
 
211
  1. Custom Grid - Freely resize images
215
 
216
  == Changelog ==
217
 
218
+ See <a href="https://github.com/WPCHill/modula-lite/blob/dev/changelog.txt" target="_blank">changelog</a>