Gallery – Photo Gallery – Image Gallery - Version 2.2.4

Version Description

Download this release

Release Info

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

Code changes from version 2.2.3 to 2.2.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: MachoThemes
7
- * Version: 2.2.3
8
* Author URI: https://www.machothemes.com/
9
* License: GPLv3 or later
10
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -43,11 +43,12 @@
43
*
44
* @since 2.0.2
45
*/
46
- define( 'MODULA_LITE_VERSION', '2.2.3' );
47
- define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
48
- define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
49
- defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL', 'https://wp-modula.com' );
50
- defined( 'MODULA_PRO_STORE_UPGRADE_URL' ) || define( 'MODULA_PRO_STORE_UPGRADE_URL', 'https://wp-modula.com/pricing' );
51
52
/**
53
* The code that runs during plugin activation.
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: MachoThemes
7
+ * Version: 2.2.4
8
* Author URI: https://www.machothemes.com/
9
* License: GPLv3 or later
10
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
43
*
44
* @since 2.0.2
45
*/
46
+ define( 'MODULA_LITE_VERSION' , '2.2.4' );
47
+ define( 'MODULA_PATH' , plugin_dir_path( __FILE__ ) );
48
+ define( 'MODULA_URL' , plugin_dir_url( __FILE__ ) );
49
+ defined( 'MODULA_PRO_STORE_URL' ) || define( 'MODULA_PRO_STORE_URL' , 'https://wp-modula.com' );
50
+ defined( 'MODULA_PRO_STORE_UPGRADE_URL' ) || define( 'MODULA_PRO_STORE_UPGRADE_URL' , 'https://wp-modula.com/pricing' );
51
+ define( 'MODULA_FILE' , plugin_basename( __FILE__ ) );
52
53
/**
54
* The code that runs during plugin activation.
README.txt CHANGED
@@ -1,10 +1,10 @@
1
=== Modula Image Gallery ===
2
Contributors: machothemes, silkalns
3
Tags: best gallery plugin, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, masonry gallery, fancy gallery, media gallery, mosaic gallery, polaroid gallery, portfolio gallery
4
- Requires at least: 5.1
5
Tested up to: 5.3
6
Requires PHP: 5.6
7
- Stable tag: 2.2.3
8
License: GPLv3 or later
9
License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
1
=== Modula Image Gallery ===
2
Contributors: machothemes, silkalns
3
Tags: best gallery plugin, image gallery, photo gallery, responsive gallery, wordpress gallery plugin, wordpress portfolio plugin, masonry gallery, fancy gallery, media gallery, mosaic gallery, polaroid gallery, portfolio gallery
4
+ Requires at least: 4.6
5
Tested up to: 5.3
6
Requires PHP: 5.6
7
+ Stable tag: 2.2.4
8
License: GPLv3 or later
9
License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
assets/css/about.css ADDED
@@ -0,0 +1,55 @@
1
+ .about__header-title.modula-about-heading {
2
+ background-color:#774cce;
3
+ }
4
+
5
+ .modula-about-header .about__header-badge {
6
+ background-color:#472d7b;
7
+ }
8
+
9
+ .modula-about-header .about__header-text {
10
+ background-color:#2f1e52;
11
+ }
12
+
13
+ h1.modula-about-heading {
14
+ color: #774cce;
15
+ font-size:40px;
16
+ }
17
+
18
+ .modula-about-row .about__container h2 {
19
+ font-size:25px;
20
+ }
21
+
22
+ ul.modula-about-list {
23
+ padding-left:25px;
24
+ position:relative;
25
+ margin-left:0;
26
+ }
27
+
28
+ .modula-about-list li {
29
+ position:relative;
30
+ list-style-type: none;
31
+ font-size:18px;
32
+ }
33
+
34
+ .modula-about-list li:before {
35
+ font-family:Dashicons;
36
+ display:block;
37
+ position: absolute;
38
+ left:-25px;
39
+ }
40
+
41
+ .modula-about-list li.fix:before {
42
+ content: "\f107";
43
+ color:green;
44
+ }
45
+
46
+ .modula-about-list li.feature:before {
47
+ content: "\f132";
48
+ color:blue;
49
+ }
50
+
51
+ .modula-about-list li.removal:before {
52
+ content: "\f182";
53
+ color:red;
54
+ }
55
+
assets/css/about.min.css ADDED
@@ -0,0 +1 @@
1
+ .about__header-title.modula-about-heading{background-color:#774cce}.modula-about-header .about__header-badge{background-color:#472d7b}.modula-about-header .about__header-text{background-color:#2f1e52}h1.modula-about-heading{color:#774cce;font-size:40px}.modula-about-row .about__container h2{font-size:25px}ul.modula-about-list{padding-left:25px;position:relative;margin-left:0}.modula-about-list li{position:relative;list-style-type:none;font-size:18px}.modula-about-list li:before{font-family:Dashicons;display:block;position:absolute;left:-25px}.modula-about-list li.fix:before{content:"\f107";color:green}.modula-about-list li.feature:before{content:"\f132";color:#00f}.modula-about-list li.removal:before{content:"\f182";color:red}
assets/css/edit.css CHANGED
@@ -39,6 +39,7 @@
39
border-top-right-radius: 0;
40
border-bottom-right-radius: 0;
41
flex-grow:1;
42
}
43
.modula-copy-shortcode span {
44
width: 100%;
39
border-top-right-radius: 0;
40
border-bottom-right-radius: 0;
41
flex-grow:1;
42
+ width:calc(100% - 40px);
43
}
44
.modula-copy-shortcode span {
45
width: 100%;
assets/css/edit.min.css CHANGED
@@ -1 +1 @@
1
- .post-type-modula-gallery .wrap h1.wp-heading-inline,.post-type-modula-gallery .wrap>.page-title-action{display:none}.post-type-modula-gallery .wrap .nav-tab-wrapper .page-title-action{top:7px}.wrap .modula-feedback-notice{padding:22px;border:2px solid #2ebf91;margin-top:20px;position:relative}.wrap .modula-feedback-notice .notice-dismiss{text-decoration:none}.notice p.modula-feedback-title{font-size:26px;font-weight:700;display:flex;align-items:center;margin-top:0}.modula-feedback-title svg{width:35px;margin-right:10px}.modula-feedback-title svg path{fill:#2ebf91}.modula-copy-shortcode{display:flex;align-items:center;flex-wrap:wrap}.modula-copy-shortcode input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1}.modula-copy-shortcode span{width:100%}.wp-core-ui .modula-copy-shortcode a.button-primary{height:30px;border-top-left-radius:0;border-bottom-left-radius:0}.column-shortcode .modula-copy-shortcode{max-width:300px}
1
+ .post-type-modula-gallery .wrap h1.wp-heading-inline,.post-type-modula-gallery .wrap>.page-title-action{display:none}.post-type-modula-gallery .wrap .nav-tab-wrapper .page-title-action{top:7px}.wrap .modula-feedback-notice{padding:22px;border:2px solid #2ebf91;margin-top:20px;position:relative}.wrap .modula-feedback-notice .notice-dismiss{text-decoration:none}.notice p.modula-feedback-title{font-size:26px;font-weight:700;display:flex;align-items:center;margin-top:0}.modula-feedback-title svg{width:35px;margin-right:10px}.modula-feedback-title svg path{fill:#2ebf91}.modula-copy-shortcode{display:flex;align-items:center;flex-wrap:wrap}.modula-copy-shortcode input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1;width:calc(100% - 40px)}.modula-copy-shortcode span{width:100%}.wp-core-ui .modula-copy-shortcode a.button-primary{height:30px;border-top-left-radius:0;border-bottom-left-radius:0}.column-shortcode .modula-copy-shortcode{max-width:300px}
assets/css/modula-cpt.css CHANGED
@@ -386,16 +386,30 @@ tr label.th-label {
386
387
/* Upsells */
388
.modula-upsell {
389
- background: #e5f3e2;
390
- border: 1px solid #a8d69c;
391
- padding: 20px;
392
margin-top: 30px;
393
}
394
#poststuff .modula-upsell h2 {
395
- margin: 0 0 20px 0;
396
- font-size: 16px;
397
font-weight: 700;
398
- padding: 0;
399
}
400
.modula-upsell p {
401
margin: 0;
@@ -407,6 +421,7 @@ tr label.th-label {
407
opacity: .8;
408
margin-top: 0;
409
margin-bottom: 10px;
410
}
411
.modula-upsell .button {
412
height: 31px;
@@ -417,10 +432,10 @@ tr label.th-label {
417
margin-right: 10px;
418
}
419
.modula-upsell .button.button-primary {
420
- background-color: #52ad3a;
421
border-color: #378c21;
422
box-shadow: 0 1px 0 #378c21;
423
- text-shadow: 0 -1px 1px #378c21, 1px 0 1px #378c21, 0 1px 1px #378c21, -1px 0 1px #378c21;
424
}
425
.modula-upsell .action-link,
426
.modula-upsell .action-link:hover {
@@ -1130,23 +1145,142 @@ a.modula-tab-link {
1130
.modula-toggle__input[type=checkbox]:checked + .modula-toggle__items .modula-toggle__on {
1131
display: inline-block; }
1132
1133
/* Copy Shortcode */
1134
.modula-copy-shortcode {
1135
display: flex;
1136
align-items: center;
1137
flex-wrap: wrap;
1138
}
1139
.modula-copy-shortcode input {
1140
margin:0;
1141
border-top-right-radius: 0;
1142
border-bottom-right-radius: 0;
1143
flex-grow:1;
1144
}
1145
.modula-copy-shortcode span {
1146
width: 100%;
1147
}
1148
.wp-core-ui .modula-copy-shortcode a.button-primary {
1149
height: 30px;
1150
border-top-left-radius: 0;
1151
border-bottom-left-radius: 0;
1152
}
386
387
/* Upsells */
388
.modula-upsell {
389
+ background: #f1f1f1;
390
+ /* border: 1px solid #a8d69c;*/
391
+ border:0px;
392
+ padding: 15px;
393
margin-top: 30px;
394
}
395
+
396
+ /* We're handling the upsells inside metaboxes slightly different */
397
+ .form-table-wrapper .modula-upsell {
398
+ border: 1px solid #DDD;
399
+ text-align: center;
400
+ }
401
+
402
#poststuff .modula-upsell h2 {
403
+ margin: 0 0 20px 0;
404
+ font-size: 16px;
405
font-weight: 700;
406
+ background: #fff;
407
+ left: -15px;
408
+ top: -15px;
409
+ padding: 8px 12px;
410
+ position: relative;
411
+ width: calc(100% + 6px);
412
+ border-bottom: 1px solid #DDD
413
}
414
.modula-upsell p {
415
margin: 0;
421
opacity: .8;
422
margin-top: 0;
423
margin-bottom: 10px;
424
+ padding:0px 10px;
425
}
426
.modula-upsell .button {
427
height: 31px;
432
margin-right: 10px;
433
}
434
.modula-upsell .button.button-primary {
435
+ /*background-color: #52ad3a;
436
border-color: #378c21;
437
box-shadow: 0 1px 0 #378c21;
438
+ text-shadow: 0 -1px 1px #378c21, 1px 0 1px #378c21, 0 1px 1px #378c21, -1px 0 1px #378c21;*/
439
}
440
.modula-upsell .action-link,
441
.modula-upsell .action-link:hover {
1145
.modula-toggle__input[type=checkbox]:checked + .modula-toggle__items .modula-toggle__on {
1146
display: inline-block; }
1147
1148
+ p.description.alert {
1149
+ color:#ff0000;
1150
+ }
1151
+
1152
+ tr.troubleshoot-subfield.hide {
1153
+ display:none;
1154
+ }
1155
+
1156
/* Copy Shortcode */
1157
.modula-copy-shortcode {
1158
display: flex;
1159
align-items: center;
1160
flex-wrap: wrap;
1161
}
1162
+
1163
.modula-copy-shortcode input {
1164
margin:0;
1165
border-top-right-radius: 0;
1166
border-bottom-right-radius: 0;
1167
flex-grow:1;
1168
}
1169
+
1170
.modula-copy-shortcode span {
1171
width: 100%;
1172
}
1173
+
1174
.wp-core-ui .modula-copy-shortcode a.button-primary {
1175
height: 30px;
1176
border-top-left-radius: 0;
1177
border-bottom-left-radius: 0;
1178
+
1179
+ }
1180
+
1181
+ /*
1182
+ Ups-sells carousel
1183
+ @since 2.2.4
1184
+ */
1185
+
1186
+ @keyframes carousel {
1187
+ 0% {
1188
+ transform: translateX(0px);
1189
+ opacity: 1 !important;
1190
+ }
1191
+ 50% {
1192
+ transform: translateX(0px);
1193
+ opacity: 1 !important;
1194
+ }
1195
+ 51% {
1196
+ transform: translateX(-100%);
1197
+ opacity: 1 !important;
1198
+ }
1199
+ 99% {
1200
+ transform: translateX(-100%);
1201
+ opacity: 1 !important;
1202
+ }
1203
+ 100% {
1204
+ transform: translateX(-200%);
1205
+ opacity: 1 !important;
1206
+ }
1207
+ }
1208
+
1209
+ .modula-upsells-carousel-wrapper{
1210
+ position: relative;
1211
+ display:flex;
1212
+ overflow:hidden;
1213
+ }
1214
+
1215
+ .modula-upsells-carousel {
1216
+ /*animation: carousel 20s infinite;*/
1217
+ flex-shrink: 0;
1218
+ position: relative;
1219
+ /* display:flex;*/
1220
+ display:block;
1221
+ width:100%;
1222
+ }
1223
+
1224
+ .modula-upsells-carousel .modula-upsell-item {
1225
+ position: relative;
1226
+ width:100%;
1227
+ flex-shrink: 0;
1228
+ margin-top:0;
1229
+ left:-15px;
1230
+ }
1231
+
1232
+ .modula-upsells-carousel .modula-upsell-item {
1233
+ text-align: center;
1234
+ }
1235
+
1236
+ .modula-upsells-carousel .modula-upsell-item ul.modula-upsells-list {
1237
+ padding-left:40px;
1238
+ }
1239
+
1240
+ .modula-upsells-carousel .modula-upsell-item ul li {
1241
+ position: relative;
1242
+ list-style-type: none !important;
1243
+ text-align:left;
1244
+ }
1245
+
1246
+ #modula-albums-upsell .modula-upsells-carousel .modula-upsell-item ul li {
1247
+ display: inline-block;
1248
+ margin: 0px 15px 15px 35px;
1249
+ }
1250
+
1251
+ .modula-upsells-carousel .modula-upsell-item ul li:before {
1252
+ font-family: Dashicons;
1253
+ content: "\f147";
1254
+ position: absolute;
1255
+ left: -30px;
1256
+ font-size: 14px;
1257
+ color: green;
1258
+ background-color: #FFF;
1259
+ padding: 0 3px;
1260
+ border-radius: 50%;
1261
+ border: 1px solid #DDD;
1262
+ top: -1px;
1263
+ }
1264
+ #modula-sorting-upsell > h2.hndle.ui-sortable-handle,
1265
+ #modula-sorting-upsell > button.handlediv,
1266
+ #modula-albums-upsell > h2.hndle.ui-sortable-handle,
1267
+ #modula-albums-upsell > button.handlediv {
1268
+ display:none;
1269
+ }
1270
+
1271
+ #modula-sorting-upsell > .inside,
1272
+ #modula-albums-upsell > .inside {
1273
+ padding:0px;
1274
+ margin:0 auto;
1275
+ }
1276
+
1277
+ #modula_troubleshooting_option .modula-select label {
1278
+ margin-right: 10px;
1279
+ }
1280
+ #modula_troubleshooting_option .modula-select label:last-child {
1281
+ margin-right: 0;
1282
+ }
1283
+
1284
+ #modula-albums-upsell h2 {
1285
+ margin: 0 !important;
1286
}
assets/css/modula-cpt.min.css CHANGED
@@ -1 +1 @@
1
- #modula-settings .inside{padding:0;margin:0}.modula-settings-container{display:flex}.modula-settings-container .modula-tabs{background-color:#f8f8f8}.modula-settings-container .modula-tabs .modula-tab{margin:0 10px 0 0;padding:15px 0;color:#9c9c9c;cursor:pointer;position:relative;width:165px;position:relative}.modula-settings-container .modula-tabs .modula-tab sup{margin-left:5px;padding:2px 5px;border-radius:5px;color:#fff;font-size:8px;background:#9c9c9c;display:inline-block;line-height:1;position:relative;top:-2px}.modula-settings-container .modula-tabs .modula-tab.active-tab sup,.modula-settings-container .modula-tabs .modula-tab:hover sup{background-color:#57a7c9}.modula-settings-container .modula-tabs .modula-tab.modula-responsive.active-tab sup,.modula-settings-container .modula-tabs .modula-tab.modula-responsive:hover sup{background:#dc3232}.modula-settings-container .modula-tabs .modula-tab>i{margin-right:10px;margin-left:15px}.modula-settings-container .modula-tabs .modula-tab:after{position:absolute;content:"";width:1px;height:100%;background-color:transparent;top:0;right:-1px}.modula-settings-container .modula-tabs .modula-tab.active-tab:first-child{border-top:0 none}.modula-settings-container .modula-tabs .modula-tab:hover{color:#333}.modula-settings-container .modula-tabs .modula-tab.active-tab{margin:0;padding:15px 10px 15px 0;background-color:#fff;border-bottom:1px solid #ddd;border-top:1px solid #ddd;color:#333}.modula-settings-container .modula-tabs .modula-tab.active-tab:before{content:"";position:absolute;left:0;top:0;width:3px;height:100%;background-color:#57a7c9}.modula-settings-container .modula-tabs .modula-tab.active-tab:after{background-color:#fff}tr label.th-label{color:#23282d;font-weight:600;margin-bottom:10px}.postbox .modula-settings-container table.form-table{margin:0}.postbox .modula-settings-container .form-table-wrapper{padding:0 0 0 20px;box-sizing:border-box}.modula-settings-container .modula-tabs-content{padding:10px 20px;border-left:1px solid #eee;flex-grow:1}.modula-tabs-content>div:not(.active-tab){display:none}.modula-settings-container .modula-tabs-content .tab-content-header{width:100%;padding-bottom:12px;margin-bottom:10px;border-bottom:1px solid #eee;padding-left:20px;padding-right:0;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions{display:flex;align-items:center}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions>span{margin:0 10px;font-style:italic}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions a.button>span{height:auto;line-height:26px;margin-right:10px}#poststuff .modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-title>h2{font-weight:700;padding:0;display:inline-block}#poststuff .modula-settings-container .modula-tabs-content .tab-content-header .tab-header-description p{margin:0}.modula-settings-container .form-table td p.description{font-size:13px}.modula-settings-container .slider-container{position:relative;height:2px;padding:10px 0;width:25em;box-sizing:border-box;margin-bottom:10px;display:flex;display:flex;justify-content:space-between;align-items:center}.modula-settings-container .slider-container input[type=text]{border:none;text-align:center;padding:2px;margin:0 20px 0 0;font-size:12px;color:#333;border-radius:10px;background-color:#fff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.16);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.16);box-shadow:inset 0 1px 1px rgba(0,0,0,.16);width:40px;height:22px;cursor:default}.modula-settings-container .slider-container .ui-slider{position:relative;text-align:left;height:2px;border-radius:3px;border:none;display:block;width:100%;background:#d6d6d6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.modula-settings-container .slider-container .ui-slider .ui-slider-handle{position:absolute;z-index:2;top:-10px;cursor:default;-ms-touch-action:none;touch-action:none;width:18px;height:18px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;background-color:#fff;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:solid 1px #d7d7d7;transform:translateX(-50%)}.modula-settings-container .slider-container .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0;background:#57a7c9;top:0;bottom:0}.modula-effects-preview{margin-top:20px}.modula-effects-preview .modula-item{width:400px;height:300px;overflow:hidden;position:relative}.modula-effects-preview .modula-item img{position:absolute;min-height:100%;min-width:100%}.modula-effects-preview .modula-item .figc{display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;text-align:center;position:absolute;left:0;width:100%;height:100%;padding:0}.modula-effects-preview .modula-item .figc h2{font-size:21px!important;color:#fff}.modula-effects-preview .modula-item .figc p{color:#fff;font-size:15px;font-style:normal}.modula .modula-items .modula-item h2{margin:0}.modula .modula-items .modula-item p{margin:0;padding:0}.modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}.modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;width:20px;padding:6px 4px;border:0;opacity:0;transition:opacity .3s}.modula .modula-item .jtg-social svg{width:20px;height:16px}.modula .modula-item:hover .jtg-social a{opacity:1}.modula .modula-items .jtg-social{opacity:0;transition:opacity .1s;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}.modula .modula-items .jtg-social{opacity:1}.modula .modula-items .jtg-social a:last-of-type{margin-right:0}.modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}.modula .modula-item.effect-pufrobo .figc{text-align:right}.modula .modula-item.effect-pufrobo h2,.modula .modula-item.effect-pufrobo p{position:absolute;right:30px;left:30px;padding:10px 0}.modula .modula-item:hover img{opacity:.8}.modula .modula-item{background-color:#000}.modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}.modula .modula-item.effect-pufrobo h2{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.modula .modula-item.effect-pufrobo:hover h2{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modula .modula-item.effect-pufrobo h2::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}.modula .modula-item.effect-pufrobo h2::after,.modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}.modula .modula-item.effect-pufrobo:hover h2::after,.modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modula-upsell{background:#e5f3e2;border:1px solid #a8d69c;padding:20px;margin-top:30px}#poststuff .modula-upsell h2{margin:0 0 20px 0;font-size:16px;font-weight:700;padding:0}.modula-upsell p{margin:0}.modula-upsell p.modula-upsell-description{font-size:13px;line-height:1.5;color:#333;opacity:.8;margin-top:0;margin-bottom:10px}.modula-upsell .button{height:31px;line-height:31px;font-weight:700}.modula-upsell .button:first-child{margin-right:10px}.modula-upsell .button.button-primary{background-color:#52ad3a;border-color:#378c21;box-shadow:0 1px 0 #378c21;text-shadow:0 -1px 1px #378c21,1px 0 1px #378c21,0 1px 1px #378c21,-1px 0 1px #378c21}.modula-upsell .action-link,.modula-upsell .action-link:hover{background:#51ad31;border-color:#51ad31;color:#fff;font-weight:700}#modula-uploader-container{position:relative;padding-left:10px;padding-right:10px}#modula-uploader-container.modula-resizer-enabled{margin-bottom:20px}.modula-upload-actions{padding:15px 20px;background-color:#f8fcfd;border-bottom:1px solid #ecf6f9;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box}.modula-upload-actions .buttons{flex-shrink:0;width:275px;display:flex}.modula-sources-dropdown{position:relative;border-top:1px solid rgba(255,255,255,0);border-right:1px solid rgba(255,255,255,0);border-left:1px solid rgba(255,255,255,0)}.modula-sources-dropdown:hover{border-color:#ddd;background:#f5f5f5}.modula-sources-dropdown>span{width:28px;height:32px;text-align:center;line-height:28px;cursor:pointer;display:inline-block;font-size:25px;font-weight:700}.modula-sources-dropdown .modula-sources-dropdown-content{position:absolute;right:-1px;bottom:0;transform:translateY(100%);display:none;padding:15px;background-color:#f5f5f5;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;border:1px solid #ddd}.modula-sources-dropdown:hover .modula-sources-dropdown-content{display:block}.modula-sources-dropdown:hover .modula-sources-dropdown-content:before{content:"";height:1px;width:28px;background-color:#f5f5f5;position:absolute;top:-1px;right:0}.segrip.ui-resizable-se{width:30px;height:30px;background:url(../images/resize-se.svg) no-repeat;background-size:contain;display:none;z-index:100;opacity:1}.modula-resizer-enabled .segrip.ui-resizable-se{display:block}.modula-upload-actions #modula-uploader-browser{border-bottom-right-radius:0;border-top-right-radius:0}.modula-upload-actions #modula-wp-gallery{border-bottom-left-radius:0;border-top-left-radius:0}.wp-core-ui .modula-upload-actions>a{margin:0 5px}#modula-dropzone-container{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;transition:opacity 250ms}#modula-dropzone-container .modula-uploader-window-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}#poststuff #modula-dropzone-container .modula-uploader-window-content h1{margin:-.5em 0 0;position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:20px;line-height:28px;font-weight:400;color:#fff;padding:0}.modula-uploader-inline-content{position:relative;min-height:300px;width:100%}.modula-resizer-enabled .modula-uploader-inline-content{min-height:initial}.modula-uploader-inline-content h2{text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#poststuff .modula-upload-message{font-size:43px;line-height:1;font-weight:400;margin:0;display:none;color:#ebebeb}#poststuff .modula-upload-message .dashicons,#poststuff .modula-upload-message .dashicons-before:before{font-size:43px;width:43px;height:43px}.modula-uploader-inline p{font-size:12px;margin:.5em 0}#poststuff .modula-uploader-inline .modula-upload-instructions{font-size:14px;color:#444;font-weight:400;padding:0}.modula-uploader-footer .max-upload-size{float:left}.modula-uploader-footer .modula-upload-numbers{float:right;opacity:0}.modula-uploader-footer:after{display:block;content:"";clear:both}.upload-progress .modula-upload-numbers{margin:0;line-height:1.4em}.modula-progress-bar{width:100%;max-width:400px;position:relative;height:2px;margin:8px 0 0;border-radius:10px;background:#e5e5e5}.upload-info-container{position:relative;overflow:hidden;flex-grow:1}.upload-info-container .upload-info{padding:5px 0}.upload-info-container .upload-progress{position:absolute;background-color:#f8fcfd;height:100%;display:flex;top:0;left:0;width:100%;flex-direction:column;transition:transform .5s;transform:translateY(100%)}.modula-upload-actions.show-progress .upload-info-container .upload-progress{transform:translateY(0)}.modula-progress-bar .modula-progress-bar-inner{height:2px;min-width:20px;width:0;background:#0085ba;-webkit-transition:width .3s;-moz-transition:width .3s;-ms-transition:width .3s;-o-transition:width .3s;transition:width .3s;border-radius:5px}.modula-uploader-footer.show-progress .modula-progress-bar,.modula-uploader-footer.show-progress .modula-upload-numbers{opacity:1}.modula-uploader-inline-content .modula-single-image,.modula-uploader-inline-content .modula-single-image-placeholder{cursor:move;display:inline-block;padding:0 10px 20px 0;box-sizing:border-box;width:16.66%}.modula-uploader-inline-content .modula-single-image-placeholder:after{width:100%;height:100%;display:inline-block;content:"";position:relative;border:3px dashed #444;padding-top:calc(100% - 6px);box-sizing:border-box}.modula-uploader-inline-content .modula-single-image .modula-single-image-content{position:relative;border:1px solid #d6d6d6;box-sizing:border-box;background-position:center;background-size:cover}.modula-uploader-inline-content .modula-single-image .modula-single-image-content img{display:block;width:100%}#poststuff .modula-uploader-inline-content>.modula-upload-message:only-child{display:block}.modula-uploader-inline-content .modula-single-image .actions{position:absolute;z-index:99;font-size:0;width:100%;height:100%;top:0;left:0;background:rgba(0,0,0,.4);padding:5px;box-sizing:border-box;display:none}.modula-uploader-inline-content .modula-single-image:hover .actions{display:block}.modula-uploader-inline-content .modula-single-image .actions a{width:20px;height:20px;border-radius:100%;border:1px solid #000;background-color:rgba(255,255,255,.8);color:#000;display:block;text-decoration:none;text-align:center;line-height:20px;margin-bottom:5px}.modula-uploader-inline-content .modula-single-image .actions a:hover{background-color:#000;color:#fff}.modula-uploader-inline-content .modula-single-image .actions a span{font-size:16px;width:20px;height:20px;line-height:20px}.modula-uploader-inline-content .modula-single-image .actions a.modula-delete-image{color:#a00a00}.modula-uploader-inline-content .modula-single-image .actions a.modula-delete-image:hover{background-color:#a00a00;color:#fff}.modula-uploader-inline-content:after{content:"";display:block;clear:both}.media-modal .modula-edit-popup.edit-attachment-frame .edit-media-header button.right{border-right:1px solid #ddd}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting input[type=text],.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting textarea{display:block;width:100%;min-width:100%;margin:0}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting div.description{clear:both;float:left;margin:5px 0 0 0;text-align:left;font-size:13px;font-style:italic;color:#666}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings{margin:0;padding:0;border:none}.media-modal .attachment-info .actions a{display:inline-block}.inline-input{display:inline}.ui-draggable.ui-resizable>.segrip{width:10px;height:10px;background:red;position:absolute;bottom:0;right:0}.ui-draggable.ui-resizable .modula-single-image-content img{display:none}.ui-draggable.ui-resizable .modula-single-image-content{width:100%;height:100%}.ui-draggable.ui-resizable.modula-single-image{padding:0}.packery-drop-placeholder{outline:3px dashed #444;outline-offset:-6px;-webkit-transition:-webkit-transform .2s;transition:transform .2s}.ui-resizable-helper{border:3px dashed #444;box-sizing:border-box}#poststuff #modula-preview-gallery h2.hndle,#poststuff #modula-settings h2.hndle{padding-left:20px}#poststuff #modula-preview-gallery .inside{margin-top:0;padding:0}.modula-edit-popup .attachment-details .setting span.description>span{display:inline-block;float:none;width:auto;min-width:unset;line-height:16px;min-height:16px;margin-top:8px;padding:0;vertical-align:middle;margin-right:0}.modula-edit-popup .attachment-details .setting span.description{text-align:left;vertical-align:middle}.modula-media-modal .attachments-browser .media-toolbar .media-toolbar-secondary{width:100%}.modula-error-container{display:block}.modula-error-container.hide{display:none}.modula-error-container .modula-error{padding:12px;margin-bottom:12px;background:#fff;border-left:4px solid #dc3232;box-shadow:0 0 4px 0 rgba(0,0,0,.1);font-weight:600;margin-top:5px;position:relative;background-color:#dc3232;color:#fff}.modula-error-container .modula-error a{color:#fff}.modula-error-container .modula-error .upload-dismiss-errors{position:absolute;top:50%;right:-5px;padding:10px;transition:none;display:block;text-decoration:none;margin-top:-18px}.modula-error-container .modula-error .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#fff}a.modula-tab-link{text-decoration:none}.modula-tab-link span.dashicons{width:16px;height:16px;line-height:16px;margin-right:3px;vertical-align:text-bottom;font-size:16px;text-decoration:none}#modula-grid{height:100%;position:absolute;overflow:hidden;top:0;left:0;width:100%}#modula-grid .modula-grid-item{background-color:#fafafa;float:left}#modula-grid .modula-grid-item:nth-child(12n){margin-right:0!important}#modula-grid:after{content:"";display:block;clear:both}.modula-tooltip{position:relative;display:inline-block}.modula-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.modula-tooltip .modula-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100% ,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.modula-tooltip .modula-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.modula-tooltip:hover .modula-tooltip-content{display:block}.modula-helper-guidelines-container{padding:15px 20px;background-color:#f8fcfd;display:flex;align-items:center;border-top:1px solid #ecf6f9}.modula-helper-guidelines-container .onoffswitch{margin-top:0}.modula-helper-guidelines-wrapper .modula-helper-guidelines-label{margin-left:5px}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image .modula-single-image-content{background:#eee!important;position:relative;overflow:hidden}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content:before{content:"";display:block;padding-top:100%}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content.landscape img{max-height:100%}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content.portrait img{max-width:100%}.modula-toggle{position:relative;position:relative;user-select:none;display:inline-block}.modula-toggle__items{box-sizing:border-box;display:inline-block;position:relative}.modula-toggle__items>*{box-sizing:inherit}.modula-toggle__input[type=checkbox]{border-radius:2px;border:2px solid #6c7781;margin-right:12px;transition:none;height:100%;left:0;top:0;margin:0;padding:0;opacity:0;position:absolute;width:100%;z-index:1}.modula-toggle__track{background-color:#fff;border:2px solid #6c7781;border-radius:9px;display:inline-block;height:18px;width:36px;vertical-align:top;transition:background .2s ease}.modula-toggle__thumb{background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;display:block;height:10px;width:10px;position:absolute;left:4px;top:4px;transition:transform .2s ease}.modula-toggle__off{position:absolute;right:6px;top:6px;color:#6c7781;fill:currentColor}.modula-toggle__on{position:absolute;top:6px;left:8px;border:1px solid #fff;outline:1px solid transparent;outline-offset:-1px;display:none}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__track{background-color:#11a0d2;border:9px solid transparent}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__off{display:none}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__on{display:inline-block}.modula-copy-shortcode{display:flex;align-items:center;flex-wrap:wrap}.modula-copy-shortcode input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1}.modula-copy-shortcode span{width:100%}.wp-core-ui .modula-copy-shortcode a.button-primary{height:30px;border-top-left-radius:0;border-bottom-left-radius:0}
1
+ #modula-settings .inside{padding:0;margin:0}.modula-settings-container{display:flex}.modula-settings-container .modula-tabs{background-color:#f8f8f8}.modula-settings-container .modula-tabs .modula-tab{margin:0 10px 0 0;padding:15px 0;color:#9c9c9c;cursor:pointer;position:relative;width:165px;position:relative}.modula-settings-container .modula-tabs .modula-tab sup{margin-left:5px;padding:2px 5px;border-radius:5px;color:#fff;font-size:8px;background:#9c9c9c;display:inline-block;line-height:1;position:relative;top:-2px}.modula-settings-container .modula-tabs .modula-tab.active-tab sup,.modula-settings-container .modula-tabs .modula-tab:hover sup{background-color:#57a7c9}.modula-settings-container .modula-tabs .modula-tab.modula-responsive.active-tab sup,.modula-settings-container .modula-tabs .modula-tab.modula-responsive:hover sup{background:#dc3232}.modula-settings-container .modula-tabs .modula-tab>i{margin-right:10px;margin-left:15px}.modula-settings-container .modula-tabs .modula-tab:after{position:absolute;content:"";width:1px;height:100%;background-color:transparent;top:0;right:-1px}.modula-settings-container .modula-tabs .modula-tab.active-tab:first-child{border-top:0 none}.modula-settings-container .modula-tabs .modula-tab:hover{color:#333}.modula-settings-container .modula-tabs .modula-tab.active-tab{margin:0;padding:15px 10px 15px 0;background-color:#fff;border-bottom:1px solid #ddd;border-top:1px solid #ddd;color:#333}.modula-settings-container .modula-tabs .modula-tab.active-tab:before{content:"";position:absolute;left:0;top:0;width:3px;height:100%;background-color:#57a7c9}.modula-settings-container .modula-tabs .modula-tab.active-tab:after{background-color:#fff}tr label.th-label{color:#23282d;font-weight:600;margin-bottom:10px}.postbox .modula-settings-container table.form-table{margin:0}.postbox .modula-settings-container .form-table-wrapper{padding:0 0 0 20px;box-sizing:border-box}.modula-settings-container .modula-tabs-content{padding:10px 20px;border-left:1px solid #eee;flex-grow:1}.modula-tabs-content>div:not(.active-tab){display:none}.modula-settings-container .modula-tabs-content .tab-content-header{width:100%;padding-bottom:12px;margin-bottom:10px;border-bottom:1px solid #eee;padding-left:20px;padding-right:0;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions{display:flex;align-items:center}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions>span{margin:0 10px;font-style:italic}.modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-actions a.button>span{height:auto;line-height:26px;margin-right:10px}#poststuff .modula-settings-container .modula-tabs-content .tab-content-header .tab-content-header-title>h2{font-weight:700;padding:0;display:inline-block}#poststuff .modula-settings-container .modula-tabs-content .tab-content-header .tab-header-description p{margin:0}.modula-settings-container .form-table td p.description{font-size:13px}.modula-settings-container .slider-container{position:relative;height:2px;padding:10px 0;width:25em;box-sizing:border-box;margin-bottom:10px;display:flex;display:flex;justify-content:space-between;align-items:center}.modula-settings-container .slider-container input[type=text]{border:none;text-align:center;padding:2px;margin:0 20px 0 0;font-size:12px;color:#333;border-radius:10px;background-color:#fff;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.16);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.16);box-shadow:inset 0 1px 1px rgba(0,0,0,.16);width:40px;height:22px;cursor:default}.modula-settings-container .slider-container .ui-slider{position:relative;text-align:left;height:2px;border-radius:3px;border:none;display:block;width:100%;background:#d6d6d6;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.modula-settings-container .slider-container .ui-slider .ui-slider-handle{position:absolute;z-index:2;top:-10px;cursor:default;-ms-touch-action:none;touch-action:none;width:18px;height:18px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;background-color:#fff;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,.1);box-shadow:0 1px 1px rgba(0,0,0,.1);border:solid 1px #d7d7d7;transform:translateX(-50%)}.modula-settings-container .slider-container .ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0;background:#57a7c9;top:0;bottom:0}.modula-effects-preview{margin-top:20px}.modula-effects-preview .modula-item{width:400px;height:300px;overflow:hidden;position:relative}.modula-effects-preview .modula-item img{position:absolute;min-height:100%;min-width:100%}.modula-effects-preview .modula-item .figc{display:flex;align-items:center;justify-content:center;color:#fff;font-size:11px;text-align:center;position:absolute;left:0;width:100%;height:100%;padding:0}.modula-effects-preview .modula-item .figc h2{font-size:21px!important;color:#fff}.modula-effects-preview .modula-item .figc p{color:#fff;font-size:15px;font-style:normal}.modula .modula-items .modula-item h2{margin:0}.modula .modula-items .modula-item p{margin:0;padding:0}.modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}.modula .modula-item .jtg-social a{text-decoration:none;color:#fff;display:inline-block;margin:0 10px 0 0;width:20px;padding:6px 4px;border:0;opacity:0;transition:opacity .3s}.modula .modula-item .jtg-social svg{width:20px;height:16px}.modula .modula-item:hover .jtg-social a{opacity:1}.modula .modula-items .jtg-social{opacity:0;transition:opacity .1s;right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s}.modula .modula-items .jtg-social{opacity:1}.modula .modula-items .jtg-social a:last-of-type{margin-right:0}.modula .modula-item.effect-pufrobo p.description{margin-bottom:2em}.modula .modula-item.effect-pufrobo .figc{text-align:right}.modula .modula-item.effect-pufrobo h2,.modula .modula-item.effect-pufrobo p{position:absolute;right:30px;left:30px;padding:10px 0}.modula .modula-item:hover img{opacity:.8}.modula .modula-item{background-color:#000}.modula .modula-item.effect-pufrobo p{bottom:20%;line-height:1.5;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);letter-spacing:1px}.modula .modula-item.effect-pufrobo h2{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.modula .modula-item.effect-pufrobo:hover h2{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modula .modula-item.effect-pufrobo h2::after{position:absolute;top:80%;left:0;width:100%;height:4px;background:#fff;content:'';-webkit-transform:translate3d(0,40px,0);transform:translate3d(0,40px,0)}.modula .modula-item.effect-pufrobo h2::after,.modula .modula-item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}.modula .modula-item.effect-pufrobo:hover h2::after,.modula .modula-item.effect-pufrobo:hover p{margin-top:10px;margin-bottom:5px;opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modula-upsell{background:#f1f1f1;border:0;padding:15px;margin-top:30px}.form-table-wrapper .modula-upsell{border:1px solid #ddd;text-align:center}#poststuff .modula-upsell h2{margin:0 0 20px 0;font-size:16px;font-weight:700;background:#fff;left:-15px;top:-15px;padding:8px 12px;position:relative;width:calc(100% + 6px);border-bottom:1px solid #ddd}.modula-upsell p{margin:0}.modula-upsell p.modula-upsell-description{font-size:13px;line-height:1.5;color:#333;opacity:.8;margin-top:0;margin-bottom:10px;padding:0 10px}.modula-upsell .button{height:31px;line-height:31px;font-weight:700}.modula-upsell .button:first-child{margin-right:10px}.modula-upsell .action-link,.modula-upsell .action-link:hover{background:#51ad31;border-color:#51ad31;color:#fff;font-weight:700}#modula-uploader-container{position:relative;padding-left:10px;padding-right:10px}#modula-uploader-container.modula-resizer-enabled{margin-bottom:20px}.modula-upload-actions{padding:15px 20px;background-color:#f8fcfd;border-bottom:1px solid #ecf6f9;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box}.modula-upload-actions .buttons{flex-shrink:0;width:275px;display:flex}.modula-sources-dropdown{position:relative;border-top:1px solid rgba(255,255,255,0);border-right:1px solid rgba(255,255,255,0);border-left:1px solid rgba(255,255,255,0)}.modula-sources-dropdown:hover{border-color:#ddd;background:#f5f5f5}.modula-sources-dropdown>span{width:28px;height:32px;text-align:center;line-height:28px;cursor:pointer;display:inline-block;font-size:25px;font-weight:700}.modula-sources-dropdown .modula-sources-dropdown-content{position:absolute;right:-1px;bottom:0;transform:translateY(100%);display:none;padding:15px;background-color:#f5f5f5;box-shadow:0 1px 1px rgba(0,0,0,.04);box-sizing:border-box;border:1px solid #ddd}.modula-sources-dropdown:hover .modula-sources-dropdown-content{display:block}.modula-sources-dropdown:hover .modula-sources-dropdown-content:before{content:"";height:1px;width:28px;background-color:#f5f5f5;position:absolute;top:-1px;right:0}.segrip.ui-resizable-se{width:30px;height:30px;background:url(../images/resize-se.svg) no-repeat;background-size:contain;display:none;z-index:100;opacity:1}.modula-resizer-enabled .segrip.ui-resizable-se{display:block}.modula-upload-actions #modula-uploader-browser{border-bottom-right-radius:0;border-top-right-radius:0}.modula-upload-actions #modula-wp-gallery{border-bottom-left-radius:0;border-top-left-radius:0}.wp-core-ui .modula-upload-actions>a{margin:0 5px}#modula-dropzone-container{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,86,132,.9);z-index:250000;display:none;text-align:center;opacity:0;transition:opacity 250ms}#modula-dropzone-container .modula-uploader-window-content{position:absolute;top:10px;left:10px;right:10px;bottom:10px;border:1px dashed #fff}#poststuff #modula-dropzone-container .modula-uploader-window-content h1{margin:-.5em 0 0;position:absolute;top:50%;left:0;right:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);font-size:20px;line-height:28px;font-weight:400;color:#fff;padding:0}.modula-uploader-inline-content{position:relative;min-height:300px;width:100%}.modula-resizer-enabled .modula-uploader-inline-content{min-height:initial}.modula-uploader-inline-content h2{text-align:center;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}#poststuff .modula-upload-message{font-size:43px;line-height:1;font-weight:400;margin:0;display:none;color:#ebebeb}#poststuff .modula-upload-message .dashicons,#poststuff .modula-upload-message .dashicons-before:before{font-size:43px;width:43px;height:43px}.modula-uploader-inline p{font-size:12px;margin:.5em 0}#poststuff .modula-uploader-inline .modula-upload-instructions{font-size:14px;color:#444;font-weight:400;padding:0}.modula-uploader-footer .max-upload-size{float:left}.modula-uploader-footer .modula-upload-numbers{float:right;opacity:0}.modula-uploader-footer:after{display:block;content:"";clear:both}.upload-progress .modula-upload-numbers{margin:0;line-height:1.4em}.modula-progress-bar{width:100%;max-width:400px;position:relative;height:2px;margin:8px 0 0;border-radius:10px;background:#e5e5e5}.upload-info-container{position:relative;overflow:hidden;flex-grow:1}.upload-info-container .upload-info{padding:5px 0}.upload-info-container .upload-progress{position:absolute;background-color:#f8fcfd;height:100%;display:flex;top:0;left:0;width:100%;flex-direction:column;transition:transform .5s;transform:translateY(100%)}.modula-upload-actions.show-progress .upload-info-container .upload-progress{transform:translateY(0)}.modula-progress-bar .modula-progress-bar-inner{height:2px;min-width:20px;width:0;background:#0085ba;-webkit-transition:width .3s;-moz-transition:width .3s;-ms-transition:width .3s;-o-transition:width .3s;transition:width .3s;border-radius:5px}.modula-uploader-footer.show-progress .modula-progress-bar,.modula-uploader-footer.show-progress .modula-upload-numbers{opacity:1}.modula-uploader-inline-content .modula-single-image,.modula-uploader-inline-content .modula-single-image-placeholder{cursor:move;display:inline-block;padding:0 10px 20px 0;box-sizing:border-box;width:16.66%}.modula-uploader-inline-content .modula-single-image-placeholder:after{width:100%;height:100%;display:inline-block;content:"";position:relative;border:3px dashed #444;padding-top:calc(100% - 6px);box-sizing:border-box}.modula-uploader-inline-content .modula-single-image .modula-single-image-content{position:relative;border:1px solid #d6d6d6;box-sizing:border-box;background-position:center;background-size:cover}.modula-uploader-inline-content .modula-single-image .modula-single-image-content img{display:block;width:100%}#poststuff .modula-uploader-inline-content>.modula-upload-message:only-child{display:block}.modula-uploader-inline-content .modula-single-image .actions{position:absolute;z-index:99;font-size:0;width:100%;height:100%;top:0;left:0;background:rgba(0,0,0,.4);padding:5px;box-sizing:border-box;display:none}.modula-uploader-inline-content .modula-single-image:hover .actions{display:block}.modula-uploader-inline-content .modula-single-image .actions a{width:20px;height:20px;border-radius:100%;border:1px solid #000;background-color:rgba(255,255,255,.8);color:#000;display:block;text-decoration:none;text-align:center;line-height:20px;margin-bottom:5px}.modula-uploader-inline-content .modula-single-image .actions a:hover{background-color:#000;color:#fff}.modula-uploader-inline-content .modula-single-image .actions a span{font-size:16px;width:20px;height:20px;line-height:20px}.modula-uploader-inline-content .modula-single-image .actions a.modula-delete-image{color:#a00a00}.modula-uploader-inline-content .modula-single-image .actions a.modula-delete-image:hover{background-color:#a00a00;color:#fff}.modula-uploader-inline-content:after{content:"";display:block;clear:both}.media-modal .modula-edit-popup.edit-attachment-frame .edit-media-header button.right{border-right:1px solid #ddd}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting input[type=text],.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting textarea{display:block;width:100%;min-width:100%;margin:0}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings .setting div.description{clear:both;float:left;margin:5px 0 0 0;text-align:left;font-size:13px;font-style:italic;color:#666}.media-modal .modula-edit-popup .attachment-details .attachment-info .settings{margin:0;padding:0;border:none}.media-modal .attachment-info .actions a{display:inline-block}.inline-input{display:inline}.ui-draggable.ui-resizable>.segrip{width:10px;height:10px;background:red;position:absolute;bottom:0;right:0}.ui-draggable.ui-resizable .modula-single-image-content img{display:none}.ui-draggable.ui-resizable .modula-single-image-content{width:100%;height:100%}.ui-draggable.ui-resizable.modula-single-image{padding:0}.packery-drop-placeholder{outline:3px dashed #444;outline-offset:-6px;-webkit-transition:-webkit-transform .2s;transition:transform .2s}.ui-resizable-helper{border:3px dashed #444;box-sizing:border-box}#poststuff #modula-preview-gallery h2.hndle,#poststuff #modula-settings h2.hndle{padding-left:20px}#poststuff #modula-preview-gallery .inside{margin-top:0;padding:0}.modula-edit-popup .attachment-details .setting span.description>span{display:inline-block;float:none;width:auto;min-width:unset;line-height:16px;min-height:16px;margin-top:8px;padding:0;vertical-align:middle;margin-right:0}.modula-edit-popup .attachment-details .setting span.description{text-align:left;vertical-align:middle}.modula-media-modal .attachments-browser .media-toolbar .media-toolbar-secondary{width:100%}.modula-error-container{display:block}.modula-error-container.hide{display:none}.modula-error-container .modula-error{padding:12px;margin-bottom:12px;background:#fff;border-left:4px solid #dc3232;box-shadow:0 0 4px 0 rgba(0,0,0,.1);font-weight:600;margin-top:5px;position:relative;background-color:#dc3232;color:#fff}.modula-error-container .modula-error a{color:#fff}.modula-error-container .modula-error .upload-dismiss-errors{position:absolute;top:50%;right:-5px;padding:10px;transition:none;display:block;text-decoration:none;margin-top:-18px}.modula-error-container .modula-error .upload-dismiss-errors:before{content:"\f153";display:block;font:400 16px/1 dashicons;color:#fff}a.modula-tab-link{text-decoration:none}.modula-tab-link span.dashicons{width:16px;height:16px;line-height:16px;margin-right:3px;vertical-align:text-bottom;font-size:16px;text-decoration:none}#modula-grid{height:100%;position:absolute;overflow:hidden;top:0;left:0;width:100%}#modula-grid .modula-grid-item{background-color:#fafafa;float:left}#modula-grid .modula-grid-item:nth-child(12n){margin-right:0!important}#modula-grid:after{content:"";display:block;clear:both}.modula-tooltip{position:relative;display:inline-block}.modula-tooltip>span{cursor:pointer;color:#0073aa;text-decoration:underline;margin-left:5px}.modula-tooltip .modula-tooltip-content{display:none;position:absolute;top:50%;right:-10px;transform:translate(100% ,-50%);width:300px;background:#000;color:#fff;padding:10px;box-sizing:border-box;z-index:99}.modula-tooltip .modula-tooltip-content:before{content:'';width:0;height:0;border-style:solid;border-width:8px 8px 8px 0;border-color:transparent #000 transparent transparent;display:block;position:absolute;top:50%;left:-8px;transform:translateY(-50%)}.modula-tooltip:hover .modula-tooltip-content{display:block}.modula-helper-guidelines-container{padding:15px 20px;background-color:#f8fcfd;display:flex;align-items:center;border-top:1px solid #ecf6f9}.modula-helper-guidelines-container .onoffswitch{margin-top:0}.modula-helper-guidelines-wrapper .modula-helper-guidelines-label{margin-left:5px}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image .modula-single-image-content{background:#eee!important;position:relative;overflow:hidden}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content:before{content:"";display:block;padding-top:100%}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content img{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content.landscape img{max-height:100%}.modula-creative-gallery.modula-uploader-inline-content .modula-single-image-content.portrait img{max-width:100%}.modula-toggle{position:relative;position:relative;user-select:none;display:inline-block}.modula-toggle__items{box-sizing:border-box;display:inline-block;position:relative}.modula-toggle__items>*{box-sizing:inherit}.modula-toggle__input[type=checkbox]{border-radius:2px;border:2px solid #6c7781;margin-right:12px;transition:none;height:100%;left:0;top:0;margin:0;padding:0;opacity:0;position:absolute;width:100%;z-index:1}.modula-toggle__track{background-color:#fff;border:2px solid #6c7781;border-radius:9px;display:inline-block;height:18px;width:36px;vertical-align:top;transition:background .2s ease}.modula-toggle__thumb{background-color:#6c7781;border:5px solid #6c7781;border-radius:50%;display:block;height:10px;width:10px;position:absolute;left:4px;top:4px;transition:transform .2s ease}.modula-toggle__off{position:absolute;right:6px;top:6px;color:#6c7781;fill:currentColor}.modula-toggle__on{position:absolute;top:6px;left:8px;border:1px solid #fff;outline:1px solid transparent;outline-offset:-1px;display:none}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__track{background-color:#11a0d2;border:9px solid transparent}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__thumb{background-color:#fff;border-width:0;transform:translateX(18px)}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__off{display:none}.modula-toggle__input[type=checkbox]:checked+.modula-toggle__items .modula-toggle__on{display:inline-block}p.description.alert{color:red}tr.troubleshoot-subfield.hide{display:none}.modula-copy-shortcode{display:flex;align-items:center;flex-wrap:wrap}.modula-copy-shortcode input{margin:0;border-top-right-radius:0;border-bottom-right-radius:0;flex-grow:1}.modula-copy-shortcode span{width:100%}.wp-core-ui .modula-copy-shortcode a.button-primary{height:30px;border-top-left-radius:0;border-bottom-left-radius:0}@keyframes carousel{0%{transform:translateX(0);opacity:1!important}50%{transform:translateX(0);opacity:1!important}51%{transform:translateX(-100%);opacity:1!important}99%{transform:translateX(-100%);opacity:1!important}100%{transform:translateX(-200%);opacity:1!important}}.modula-upsells-carousel-wrapper{position:relative;display:flex;overflow:hidden}.modula-upsells-carousel{flex-shrink:0;position:relative;display:block;width:100%}.modula-upsells-carousel .modula-upsell-item{position:relative;width:100%;flex-shrink:0;margin-top:0;left:-15px}.modula-upsells-carousel .modula-upsell-item{text-align:center}.modula-upsells-carousel .modula-upsell-item ul.modula-upsells-list{padding-left:40px}.modula-upsells-carousel .modula-upsell-item ul li{position:relative;list-style-type:none!important;text-align:left}#modula-albums-upsell .modula-upsells-carousel .modula-upsell-item ul li{display:inline-block;margin:0 15px 15px 35px}.modula-upsells-carousel .modula-upsell-item ul li:before{font-family:Dashicons;content:"\f147";position:absolute;left:-30px;font-size:14px;color:green;background-color:#fff;padding:0 3px;border-radius:50%;border:1px solid #ddd;top:-1px}#modula-albums-upsell>button.handlediv,#modula-albums-upsell>h2.hndle.ui-sortable-handle,#modula-sorting-upsell>button.handlediv,#modula-sorting-upsell>h2.hndle.ui-sortable-handle{display:none}#modula-albums-upsell>.inside,#modula-sorting-upsell>.inside{padding:0;margin:0 auto}#modula_troubleshooting_option .modula-select label{margin-right:10px}#modula_troubleshooting_option .modula-select label:last-child{margin-right:0}#modula-albums-upsell h2{margin:0!important}
assets/js/jquery-modula.js CHANGED
@@ -451,9 +451,10 @@ jQuery(document).on( 'vc-full-width-row-single vc-full-width-row', function( eve
451
452
});
453
454
- new ResizeSensor( instance.$element, function() {
455
instance.onResize(instance);
456
- });
457
458
// Create social links
459
this.setupSocial();
@@ -481,6 +482,9 @@ jQuery(document).on( 'vc-full-width-row-single vc-full-width-row', function( eve
481
if (this.options.enableLinkedin){
482
setupLinkedIN(this.$items, this);
483
}
484
}
485
486
Plugin.prototype.destroy = function () {
@@ -534,6 +538,19 @@ jQuery(document).on( 'vc-full-width-row-single vc-full-width-row', function( eve
534
});
535
}
536
537
var setupPinterest = function ($tiles, plugin) {
538
$tiles.find(".modula-icon-pinterest").click(function (e) {
539
e.preventDefault();
@@ -617,4 +634,15 @@ jQuery( document ).ready( function($){
617
$( '#' + modulaID ).modulaGallery( modulaSettings );
618
619
});
620
});
451
452
});
453
454
+ // Gives error on front
455
+ /* new ResizeSensor( instance.$element, function() {
456
instance.onResize(instance);
457
+ });*/
458
459
// Create social links
460
this.setupSocial();
482
if (this.options.enableLinkedin){
483
setupLinkedIN(this.$items, this);
484
}
485
+ if (this.options.enableWhatsapp){
486
+ setupWhatsapp(this.$items, this);
487
+ }
488
}
489
490
Plugin.prototype.destroy = function () {
538
});
539
}
540
541
+ var setupWhatsapp = function ($tiles, plugin) {
542
+ $tiles.find(".modula-icon-whatsapp").click(function (e) {
543
+ e.preventDefault();
544
+ var $caption = $(this).parents(".tile:first").find(".caption");
545
+ var text = plugin.options.whatsappText || document.title;
546
+ if (!plugin.options.whatsappText && $caption.length == 1 && $caption.text().length > 0)
547
+ text = $.trim($caption.text());
548
+ var w = window.open("https://api.whatsapp.com/send?text=" + encodeURI((window.location.href.split("#")[0])) +'&preview_url=true', "ftgw", "location=1,status=1,scrollbars=1,width=600,height=400");
549
+ w.moveTo((screen.width / 2) - (300), (screen.height / 2) - (200));
550
+ return false;
551
+ });
552
+ }
553
+
554
var setupPinterest = function ($tiles, plugin) {
555
$tiles.find(".modula-icon-pinterest").click(function (e) {
556
e.preventDefault();
634
$( '#' + modulaID ).modulaGallery( modulaSettings );
635
636
});
637
+ });
638
+
639
+ jQuery('.modula-item').on('click', function(e){
640
+ window.location.hash = "#";
641
+ window.addEventListener('popstate', onBackDown, false);
642
+ window.addEventListener('backbutton', onBackDown, false);
643
+ function onBackDown() {
644
+ this.event.preventDefault();
645
+ jQuery('.lb-close').click();
646
+ this.window.location.hash = "";
647
+ }
648
});
assets/js/jquery-modula.min.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";!function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.ResizeSensor=t()}("undefined"!=typeof window?window:this,function(){if("undefined"==typeof window)return null;var e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)};function t(e,t){var i=Object.prototype.toString.call(e),n="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements,o=0,s=e.length;if(n)for(;o<s;o++)t(e[o]);else t(e)}function i(e){if(!e.getBoundingClientRect)return{width:e.offsetWidth,height:e.offsetHeight};var t=e.getBoundingClientRect();return{width:Math.round(t.width),height:Math.round(t.height)}}var n=function(o,s){function r(){var e,t,i=[];this.add=function(e){i.push(e)},this.call=function(){for(e=0,t=i.length;e<t;e++)i[e].call()},this.remove=function(n){var o=[];for(e=0,t=i.length;e<t;e++)i[e]!==n&&o.push(i[e]);i=o},this.length=function(){return i.length}}t(o,function(t){!function(t,n){if(t)if(t.resizedAttached)t.resizedAttached.add(n);else{t.resizedAttached=new r,t.resizedAttached.add(n),t.resizeSensor=document.createElement("div"),t.resizeSensor.dir="ltr",t.resizeSensor.className="resize-sensor";var o="position: absolute; left: -10px; top: -10px; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",s="position: absolute; left: 0; top: 0; transition: 0s;";t.resizeSensor.style.cssText=o,t.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+o+'"><div style="'+s+'"></div></div><div class="resize-sensor-shrink" style="'+o+'"><div style="'+s+' width: 200%; height: 200%"></div></div>',t.appendChild(t.resizeSensor);var d=window.getComputedStyle(t).getPropertyPriority("position");"absolute"!==d&&"relative"!==d&&"fixed"!==d&&(t.style.position="relative");var c,l,a=t.resizeSensor.childNodes[0],h=a.childNodes[0],f=t.resizeSensor.childNodes[1],u=i(t),v=u.width,p=u.height,z=function(){var e=0===t.offsetWidth&&0===t.offsetHeight;if(e){var i=t.style.display;t.style.display="block"}h.style.width="100000px",h.style.height="100000px",a.scrollLeft=1e5,a.scrollTop=1e5,f.scrollLeft=1e5,f.scrollTop=1e5,e&&(t.style.display=i)};t.resizeSensor.resetSensor=z;var y=function(){l=0,c&&(v=void 0,p=void 0,t.resizedAttached&&t.resizedAttached.call())},w=function(){var n=i(t),o=n.width,s=n.height;(c=o!=v||s!=p)&&!l&&(l=e(y)),z()},g=function(e,t,i){e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i)};g(a,"scroll",w),g(f,"scroll",w),e(z)}}(t,s)}),this.detach=function(e){n.detach(o,e)},this.reset=function(){o.resizeSensor.resetSensor()}};return n.reset=function(e,i){t(e,function(e){e.resizeSensor.resetSensor()})},n.detach=function(e,i){t(e,function(e){e&&(e.resizedAttached&&"function"==typeof i&&(e.resizedAttached.remove(i),e.resizedAttached.length())||e.resizeSensor&&(e.contains(e.resizeSensor)&&e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached))})},n});
2
- function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),function(d,h,c,t){var o="modulaGallery",e={resizer:"/",margin:10,keepArea:!0,type:"creative-gallery",columns:12,gutter:10,enableTwitter:!1,enableFacebook:!1,enableGplus:!1,enablePinterest:!1,enableLinkedin:!1,lazyLoad:0};function n(t,i){this.element=t,this.$element=d(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=d.extend({},e,i),this._defaults=e,this._name=o,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isPackeryActive=!1,this.init()}n.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},n.prototype.createCustomGallery=function(){var a,t=this.$element.width(),r=this,l=this.options.columns,i=c.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),a=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l),this.$items.not(".jtg-hidden").each(function(t,i){var e,s,o,n,h={};e=d(i).data("width"),s=d(i).data("height"),12<e&&(e=12),"1"==r.options.enableResponsive&&(o=e,n=s,1==l?s=(e=1)*n/o:((e=Math.round(l*o/12))<1&&(e=1),(s=Math.round(e*n/o))<1&&(s=1))),h.width=a*e+r.options.gutter*(e-1),h.height=Math.round(a)*s+r.options.gutter*(s-1),d(i).data("size",h).addClass("tiled").addClass(h.width>h.height?"tile-h":"tile-v").data("position"),d(i).css(d(i).data("size")),d(i).find(".figc").css({width:d(i).data("size").width,height:d(i).data("size").height})}),this.isPackeryActive&&this.$itemsCnt.packery("destroy"),this.$itemsCnt.packery({itemSelector:".modula-item",gutter:parseInt(r.options.gutter),columnWidth:a,resize:!1}),this.isPackeryActive=!0},n.prototype.createGrid=function(){var s=this;this.options.width&&this.$itemsCnt.width(this.options.width),this.options.height&&this.$itemsCnt.height(this.options.height),this.$itemsCnt.data("area",this.$itemsCnt.width()*this.$itemsCnt.height()),this.lastWidth=this.$itemsCnt.width();for(var t=0;t<this.$items.not(".jtg-hidden").length;t++)this.tiles.push(s.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=s.tiles[t];d(i).data("size",e).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position")}),this.$items.each(function(t,i){d(i).css(d(i).data("size")),d(i).find(".figc").css({width:d(i).data("size").width,height:d(i).data("size").height})}),this.completed=!0},n.prototype.getSlot=function(){if(0==this.tiles.length)return e={top:0,left:0,width:this.$itemsCnt.width(),height:this.$itemsCnt.height(),area:this.$itemsCnt.width()*this.$itemsCnt.height(),position:0};for(var t=0,i=0;i<this.tiles.length;i++){(e=this.tiles[i]).area>this.tiles[t].area&&(t=i)}var e={},s=this.tiles[t];if(s.width>s.height){var o=s.width/2*this.options.randomFactor;s.prevWidth=s.width,s.width=Math.floor(s.width/2+o*(Math.random()-.5)),e={top:s.top,left:s.left+s.width+this.options.margin,width:s.prevWidth-s.width-this.options.margin,height:s.height}}else{o=s.height/2*this.options.randomFactor;s.prevHeight=s.height,s.height=Math.floor(s.height/2+o*(Math.random()-.5)),e={left:s.left,top:s.top+s.height+this.options.margin,width:s.width,height:s.prevHeight-s.height-this.options.margin}}return e.area=e.width*e.height,e.position=1e3*e.top+e.left,s.position=1e3*s.top+s.left,this.tiles[t]=s,this.tiles[t].area=s.width*s.height,e},n.prototype.reset=function(){var e=this;e.tiles=[],"custom-grid"===e.options.type?(e.createCustomGallery(),e.$itemsCnt.packery()):"creative-gallery"==this.options.type&&e.createGrid(),e.$itemsCnt.find(".pic").each(function(t,i){e.placeImage(t)}),e.lastWidth=e.$itemsCnt.width()},n.prototype.onResize=function(i){i.lastWidth!=i.$itemsCnt.width()&&(clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){if(i.options.keepArea){var t=i.$itemsCnt.data("area");i.$itemsCnt.height(t/i.$itemsCnt.width())}i.reset()},100))},n.prototype.placeImage=function(t){var i=this.$items.eq(t),e=i.find(".pic"),s=i.data("size"),o=e.data("size");if(e.parent()!=i&&(s={width:e.parent().width(),height:e.parent().height()}),void 0!==s&&void 0!==o){var n=s.width/s.height,h=o.width/o.height,a=e.data("valign")?e.data("valign"):"middle",r=e.data("halign")?e.data("halign"):"center",l={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(h<n)switch(l.width=s.width,l.left=0,a){case"top":l.top=0;break;case"middle":l.top=0-(s.width*(1/h)-s.height)/2;break;case"bottom":l.bottom=0}else switch(l.height=s.height,l.top=0,r){case"left":l.left=0;break;case"center":l.left=0-(s.height*h-s.width)/2;break;case"right":l.right=0}e.css(l)}},n.prototype.loadImage=function(t){var i=this,e=i.$items.eq(t).find(".pic"),s=new Image;s.onerror=function(){console.log("error loading image ["+t+"] : "+this.src),t+1<i.$items.length&&i.loadImage(t+1)},s.onload=function(){e.data("size",{width:this.width,height:this.height}),i.placeImage(t),i.$items.eq(t).addClass("tg-loaded"),t+1<i.$items.length&&i.loadImage(t+1)};var o=e.data("src");s.src=o,e.attr("src",o)},n.prototype.init=function(){var o=this;d(c).trigger("modula_api_before_init",[o]),this.$itemsCnt.css({position:"relative",zIndex:1,"min-height":"10px"}),this.$items.addClass("tile"),this.$items.find(".pic").removeAttr("src"),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type&&this.createGrid(),"1"!=o.options.lazyLoad&&this.loadImage(0),d(h).resize(function(){o.onResize(o)}),d(h).on("modula-update",function(){o.onResize(o)}),d(c).on("lazyloaded",function(t){var i,e,s=d(t.target);"modula"==s.data("source")&&(s.data("size",{width:s.width(),height:s.height()}),(i=s.parents(".modula-item")).addClass("tg-loaded"),e=o.$items.index(i),o.placeImage(e))}),new ResizeSensor(o.$element,function(){o.onResize(o)}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),d(c).trigger("modula_api_after_init",[o])},n.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&s(this.$items,this),this.options.enablePinterest&&a(this.$items,this),this.options.enableLinkedin&&r(this.$items,this)},n.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,s){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".caption"),e=s.options.twitterText||c.title;return!s.options.twitterText&&1==i.length&&0<i.text().length&&(e=d.trim(i.text())),h.open("https://twitter.com/intent/tweet?url="+encodeURI(location.href.split("#")[0])+"&text="+encodeURI(e),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},s=function(t,o){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".pic"),e=d(this).parents(".tile:first").find(".caption");o.options.facebookText||c.title;!o.options.facebookText&&1==e.length&&0<e.text().length&&d.trim(e.text());i.attr("src");var s="//www.facebook.com/sharer.php?u="+location.href;return h.open(s,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},a=function(t,n){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".pic"),e=d(this).parents(".tile:first").find(".caption"),s=n.options.facebookText||c.title;!n.options.facebookText&&1==e.length&&0<e.text().length&&(s=d.trim(e.text()));var o="http://pinterest.com/pin/create/button/?url="+encodeURI(location.href)+"&description="+encodeURI(s);1==i.length&&(o+="&media="+function(t){var i=c.createElement("img");return i.src=t,t=i.src,i.src=null,t}(i.attr("src")));return h.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();var i="//linkedin.com/shareArticle?mini=true&url="+ +encodeURI(location.href);return h.open(i,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};d.fn[o]=function(i){var e,s=arguments;return i===t||"object"==typeof i?this.each(function(){d.data(this,"plugin_"+o)||d.data(this,"plugin_"+o,new n(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=d.data(this,"plugin_"+o);t instanceof n&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(s,1))),"destroy"===i&&d.data(this,"plugin_"+o,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(e){var t=e(".modula-gallery");e.each(t,function(){var t=e(this).attr("id"),i=e(this).data("config");e("#"+t).modulaGallery(i)})});
1
+ function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,i){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),function(d,l,c,t){var s="modulaGallery",e={resizer:"/",margin:10,keepArea:!0,type:"creative-gallery",columns:12,gutter:10,enableTwitter:!1,enableFacebook:!1,enableGplus:!1,enablePinterest:!1,enableLinkedin:!1,lazyLoad:0};function n(t,i){this.element=t,this.$element=d(t),this.$itemsCnt=this.$element.find(".modula-items"),this.$items=this.$itemsCnt.find(".modula-item"),this.options=d.extend({},e,i),this._defaults=e,this._name=s,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isPackeryActive=!1,this.init()}n.prototype.trunc=function(t){return Math.trunc?Math.trunc(t):(t=+t,isFinite(t)?t-t%1||(t<0?-0:0===t?t:0):t)},n.prototype.createCustomGallery=function(){var h,t=this.$element.width(),r=this,l=this.options.columns,i=c.documentElement.clientWidth;"1"==this.options.enableResponsive&&(i<=568?l=this.options.mobileColumns:i<=768&&(l=this.options.tabletColumns)),h=0<this.options.gutter?(t-this.options.gutter*(l-1))/l:Math.floor(t/l),this.$items.not(".jtg-hidden").each(function(t,i){var e,o,s,n,a={};e=d(i).data("width"),o=d(i).data("height"),12<e&&(e=12),"1"==r.options.enableResponsive&&(s=e,n=o,1==l?o=(e=1)*n/s:((e=Math.round(l*s/12))<1&&(e=1),(o=Math.round(e*n/s))<1&&(o=1))),a.width=h*e+r.options.gutter*(e-1),a.height=Math.round(h)*o+r.options.gutter*(o-1),d(i).data("size",a).addClass("tiled").addClass(a.width>a.height?"tile-h":"tile-v").data("position"),d(i).css(d(i).data("size")),d(i).find(".figc").css({width:d(i).data("size").width,height:d(i).data("size").height})}),this.isPackeryActive&&this.$itemsCnt.packery("destroy"),this.$itemsCnt.packery({itemSelector:".modula-item",gutter:parseInt(r.options.gutter),columnWidth:h,resize:!1}),this.isPackeryActive=!0},n.prototype.createGrid=function(){var o=this;this.options.width&&this.$itemsCnt.width(this.options.width),this.options.height&&this.$itemsCnt.height(this.options.height),this.$itemsCnt.data("area",this.$itemsCnt.width()*this.$itemsCnt.height()),this.lastWidth=this.$itemsCnt.width();for(var t=0;t<this.$items.not(".jtg-hidden").length;t++)this.tiles.push(o.getSlot());this.tiles.sort(function(t,i){return t.position-i.position}),this.$items.not(".jtg-hidden").each(function(t,i){var e=o.tiles[t];d(i).data("size",e).addClass("tiled").addClass(e.width>e.height?"tile-h":"tile-v").data("position")}),this.$items.each(function(t,i){d(i).css(d(i).data("size")),d(i).find(".figc").css({width:d(i).data("size").width,height:d(i).data("size").height})}),this.completed=!0},n.prototype.getSlot=function(){if(0==this.tiles.length)return e={top:0,left:0,width:this.$itemsCnt.width(),height:this.$itemsCnt.height(),area:this.$itemsCnt.width()*this.$itemsCnt.height(),position:0};for(var t=0,i=0;i<this.tiles.length;i++){(e=this.tiles[i]).area>this.tiles[t].area&&(t=i)}var e={},o=this.tiles[t];if(o.width>o.height){var s=o.width/2*this.options.randomFactor;o.prevWidth=o.width,o.width=Math.floor(o.width/2+s*(Math.random()-.5)),e={top:o.top,left:o.left+o.width+this.options.margin,width:o.prevWidth-o.width-this.options.margin,height:o.height}}else{s=o.height/2*this.options.randomFactor;o.prevHeight=o.height,o.height=Math.floor(o.height/2+s*(Math.random()-.5)),e={left:o.left,top:o.top+o.height+this.options.margin,width:o.width,height:o.prevHeight-o.height-this.options.margin}}return e.area=e.width*e.height,e.position=1e3*e.top+e.left,o.position=1e3*o.top+o.left,this.tiles[t]=o,this.tiles[t].area=o.width*o.height,e},n.prototype.reset=function(){var e=this;e.tiles=[],"custom-grid"===e.options.type?(e.createCustomGallery(),e.$itemsCnt.packery()):"creative-gallery"==this.options.type&&e.createGrid(),e.$itemsCnt.find(".pic").each(function(t,i){e.placeImage(t)}),e.lastWidth=e.$itemsCnt.width()},n.prototype.onResize=function(i){i.lastWidth!=i.$itemsCnt.width()&&(clearTimeout(i.resizeTO),i.resizeTO=setTimeout(function(){if(i.options.keepArea){var t=i.$itemsCnt.data("area");i.$itemsCnt.height(t/i.$itemsCnt.width())}i.reset()},100))},n.prototype.placeImage=function(t){var i=this.$items.eq(t),e=i.find(".pic"),o=i.data("size"),s=e.data("size");if(e.parent()!=i&&(o={width:e.parent().width(),height:e.parent().height()}),void 0!==o&&void 0!==s){var n=o.width/o.height,a=s.width/s.height,h=e.data("valign")?e.data("valign"):"middle",r=e.data("halign")?e.data("halign"):"center",l={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(a<n)switch(l.width=o.width,l.left=0,h){case"top":l.top=0;break;case"middle":l.top=0-(o.width*(1/a)-o.height)/2;break;case"bottom":l.bottom=0}else switch(l.height=o.height,l.top=0,r){case"left":l.left=0;break;case"center":l.left=0-(o.height*a-o.width)/2;break;case"right":l.right=0}e.css(l)}},n.prototype.loadImage=function(t){var i=this,e=i.$items.eq(t).find(".pic"),o=new Image;o.onerror=function(){console.log("error loading image ["+t+"] : "+this.src),t+1<i.$items.length&&i.loadImage(t+1)},o.onload=function(){e.data("size",{width:this.width,height:this.height}),i.placeImage(t),i.$items.eq(t).addClass("tg-loaded"),t+1<i.$items.length&&i.loadImage(t+1)};var s=e.data("src");o.src=s,e.attr("src",s)},n.prototype.init=function(){var s=this;d(c).trigger("modula_api_before_init",[s]),this.$itemsCnt.css({position:"relative",zIndex:1,"min-height":"10px"}),this.$items.addClass("tile"),this.$items.find(".pic").removeAttr("src"),"custom-grid"===this.options.type?this.createCustomGallery():"creative-gallery"==this.options.type&&this.createGrid(),"1"!=s.options.lazyLoad&&this.loadImage(0),d(l).resize(function(){s.onResize(s)}),d(l).on("modula-update",function(){s.onResize(s)}),d(c).on("lazyloaded",function(t){var i,e,o=d(t.target);"modula"==o.data("source")&&(o.data("size",{width:o.width(),height:o.height()}),(i=o.parents(".modula-item")).addClass("tg-loaded"),e=s.$items.index(i),s.placeImage(e))}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),d(c).trigger("modula_api_after_init",[s])},n.prototype.setupSocial=function(){this.options.enableTwitter&&i(this.$items,this),this.options.enableFacebook&&o(this.$items,this),this.options.enablePinterest&&h(this.$items,this),this.options.enableLinkedin&&r(this.$items,this),this.options.enableWhatsapp&&a(this.$items,this)},n.prototype.destroy=function(){this.isPackeryActive&&(this.$itemsCnt.packery("destroy"),this.isPackeryActive=!1)};var i=function(t,o){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".caption"),e=o.options.twitterText||c.title;return!o.options.twitterText&&1==i.length&&0<i.text().length&&(e=d.trim(i.text())),l.open("https://twitter.com/intent/tweet?url="+encodeURI(location.href.split("#")[0])+"&text="+encodeURI(e),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},o=function(t,s){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".pic"),e=d(this).parents(".tile:first").find(".caption");s.options.facebookText||c.title;!s.options.facebookText&&1==e.length&&0<e.text().length&&d.trim(e.text());i.attr("src");var o="//www.facebook.com/sharer.php?u="+location.href;return l.open(o,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},a=function(t,e){t.find(".modula-icon-whatsapp").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".caption");e.options.whatsappText||c.title;return!e.options.whatsappText&&1==i.length&&0<i.text().length&&d.trim(i.text()),l.open("https://api.whatsapp.com/send?text="+encodeURI(l.location.href.split("#")[0])+"&preview_url=true","ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},h=function(t,r){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var i=d(this).parents(".tile:first").find(".pic"),e=d(this).parents(".tile:first").find(".caption"),o=r.options.facebookText||c.title;!r.options.facebookText&&1==e.length&&0<e.text().length&&(o=d.trim(e.text()));var s,n,a="http://pinterest.com/pin/create/button/?url="+encodeURI(location.href)+"&description="+encodeURI(o);if(1==i.length){var h=i.attr("src");a+="&media="+(s=h,(n=c.createElement("img")).src=s,s=n.src,n.src=null,s)}return l.open(a,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,i){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();var i="//linkedin.com/shareArticle?mini=true&url="+ +encodeURI(location.href);return l.open(i,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};d.fn[s]=function(i){var e,o=arguments;return i===t||"object"==typeof i?this.each(function(){d.data(this,"plugin_"+s)||d.data(this,"plugin_"+s,new n(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=d.data(this,"plugin_"+s);t instanceof n&&"function"==typeof t[i]&&(e=t[i].apply(t,Array.prototype.slice.call(o,1))),"destroy"===i&&d.data(this,"plugin_"+s,null)}),e!==t?e:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(e){var t=e(".modula-gallery");e.each(t,function(){var t=e(this).attr("id"),i=e(this).data("config");e("#"+t).modulaGallery(i)})}),jQuery(".modula-item").on("click",function(t){function i(){this.event.preventDefault(),jQuery(".lb-close").click(),this.window.location.hash=""}window.location.hash="#",window.addEventListener("popstate",i,!1),window.addEventListener("backbutton",i,!1)});
assets/js/modula-troubleshoot-conditions.js ADDED
@@ -0,0 +1,19 @@
1
+ jQuery(document).ready(function($){
2
+
3
+ var master_toggle = jQuery("input#modula_troubleshooting_option-enqueue_files");
4
+ var checked = master_toggle.is(':checked');
5
+ mts_master_toggle(checked);
6
+
7
+ master_toggle.on('change',function(){
8
+ checked = master_toggle.is(':checked');
9
+ mts_master_toggle(checked);
10
+ });
11
+ });
12
+
13
+ function mts_master_toggle(checked){
14
+ if(checked){
15
+ jQuery('tr.troubleshoot-subfield').show();
16
+ } else {
17
+ jQuery('tr.troubleshoot-subfield').hide();
18
+ }
19
+ }
assets/js/wp-modula-conditions.js CHANGED
@@ -8,7 +8,7 @@ var modulaGalleryConditions = Backbone.Model.extend({
8
var tabs = jQuery('.modula-tabs .modula-tab');
9
this.set( 'rows', rows );
10
this.set( 'tabs', tabs );
11
-
12
this.initEvents();
13
this.initValues();
14
@@ -19,15 +19,18 @@ var modulaGalleryConditions = Backbone.Model.extend({
19
this.listenTo( wp.Modula.Settings, 'change:type', this.changedType );
20
this.listenTo( wp.Modula.Settings, 'change:effect', this.changedEffect );
21
this.listenTo( wp.Modula.Settings, 'change:lightbox', this.changedLightbox );
22
- this.listenTo( wp.Modula.Settings, 'change:disableSocial', this.disableSocial);
23
},
24
25
initValues: function(){
26
27
this.changedType( false, wp.Modula.Settings.get( 'type' ) );
28
this.changedEffect( false, wp.Modula.Settings.get( 'effect' ) );
29
this.changedLightbox( false, wp.Modula.Settings.get( 'lightbox' ) );
30
- this.disableSocial (false, wp.Modula.Settings.get('disableSocial'));
31
},
32
33
changedType: function( settings, value ){
@@ -54,6 +57,11 @@ var modulaGalleryConditions = Backbone.Model.extend({
54
55
},
56
57
changedLightbox: function( settings, value ){
58
var rows = this.get( 'rows' ),
59
tabs = this.get( 'tabs' );
@@ -82,12 +90,12 @@ var modulaGalleryConditions = Backbone.Model.extend({
82
var rows = this.get( 'rows' );
83
84
if ( 1 == value ) {
85
- rows.filter( '[data-container="enableTwitter"],[data-container="enableFacebook"],[data-container="enableLinkedin"],[data-container="enablePinterest"],[data-container="socialIconColor"]' ).prop('checked',0).hide();
86
87
}else {
88
- rows.filter( '[data-container="enableTwitter"],[data-container="enableFacebook"],[data-container="enableLinkedin"],[data-container="enablePinterest"],[data-container="socialIconColor"]').prop('checked',1).show();
89
90
}
91
}
92
93
- });
8
var tabs = jQuery('.modula-tabs .modula-tab');
9
this.set( 'rows', rows );
10
this.set( 'tabs', tabs );
11
+
12
this.initEvents();
13
this.initValues();
14
19
this.listenTo( wp.Modula.Settings, 'change:type', this.changedType );
20
this.listenTo( wp.Modula.Settings, 'change:effect', this.changedEffect );
21
this.listenTo( wp.Modula.Settings, 'change:lightbox', this.changedLightbox );
22
+ this.listenTo( wp.Modula.Settings, 'change:disableSocial', this.disableSocial );
23
+ this.listenTo( wp.Modula.Settings, 'change:cursor', this.changedCursor );
24
+
25
},
26
27
initValues: function(){
28
29
this.changedType( false, wp.Modula.Settings.get( 'type' ) );
30
this.changedEffect( false, wp.Modula.Settings.get( 'effect' ) );
31
+ this.changedCursor( false, wp.Modula.Settings.get( 'cursor' ) );
32
this.changedLightbox( false, wp.Modula.Settings.get( 'lightbox' ) );
33
+ this.disableSocial (false, wp.Modula.Settings.get('disableSocial') );
34
},
35
36
changedType: function( settings, value ){
57
58
},
59
60
+ changedCursor: function( settings, value ) {
61
+ var cursorBox = jQuery( '.modula-effects-preview > div' );
62
+ cursorBox.css( 'cursor', value);
63
+ },
64
+
65
changedLightbox: function( settings, value ){
66
var rows = this.get( 'rows' ),
67
tabs = this.get( 'tabs' );
90
var rows = this.get( 'rows' );
91
92
if ( 1 == value ) {
93
+ rows.filter( '[data-container="enableTwitter"],[data-container="enableWhatsapp"],[data-container="enableFacebook"],[data-container="enableLinkedin"],[data-container="enablePinterest"],[data-container="socialIconColor"], [data-container="socialIconSize"], [data-container="socialIconPadding"]' ).prop('checked',0).hide();
94
95
}else {
96
+ rows.filter( '[data-container="enableTwitter"],[data-container="enableWhatsapp"],[data-container="enableFacebook"],[data-container="enableLinkedin"],[data-container="enablePinterest"],[data-container="socialIconColor"],[data-container="socialIconSize"], [data-container="socialIconPadding"]').prop('checked',1).show();
97
98
}
99
}
100
101
+ })
assets/js/wp-modula-upload.js CHANGED
@@ -418,8 +418,9 @@ wp.Modula = 'undefined' === typeof( wp.Modula ) ? {} : wp.Modula;
418
419
generateSingleImage: function( attachment ){
420
var data = { halign: 'center', valign: 'middle', link: '', target: '' }
421
- captionSource = modula.Settings.get( 'wp_field_caption' ),
422
- titleSource = modula.Settings.get( 'wp_field_title' );
423
424
data['full'] = attachment['sizes']['full']['url'];
425
if ( "undefined" != typeof attachment['sizes']['large'] ) {
@@ -431,17 +432,24 @@ wp.Modula = 'undefined' === typeof( wp.Modula ) ? {} : wp.Modula;
431
data['alt'] = attachment['alt'];
432
data['orientation'] = attachment['orientation'];
433
434
// Check from where to populate image title
435
- if ( 'none' == titleSource ) {
436
data['title'] = attachment['title'];
437
}else if ( 'title' == titleSource ) {
438
data['title'] = attachment['title'];
439
}else if ( 'description' == titleSource ) {
440
data['title'] = attachment['description'];
441
- }
442
443
// Check from where to populate image caption
444
- if ( 'none' == captionSource ) {
445
data['description'] = attachment['title'];
446
}else if ( 'title' == captionSource ) {
447
data['description'] = attachment['title'];
@@ -449,7 +457,7 @@ wp.Modula = 'undefined' === typeof( wp.Modula ) ? {} : wp.Modula;
449
data['description'] = attachment['caption'];
450
}else if ( 'description' == captionSource ) {
451
data['description'] = attachment['description'];
452
- }
453
454
new modula.items['model']( data );
455
}
418
419
generateSingleImage: function( attachment ){
420
var data = { halign: 'center', valign: 'middle', link: '', target: '' }
421
+ // No need for these variables
422
+ /*captionSource = modula.Settings.get( 'wp_field_caption' ),
423
+ titleSource = modula.Settings.get( 'wp_field_title' );*/
424
425
data['full'] = attachment['sizes']['full']['url'];
426
if ( "undefined" != typeof attachment['sizes']['large'] ) {
432
data['alt'] = attachment['alt'];
433
data['orientation'] = attachment['orientation'];
434
435
+ // Removed the settings to select title and caption
436
+ // So we should make the default
437
+ data['title'] = attachment['title'];
438
+ data['description'] = attachment['caption'];
439
+
440
// Check from where to populate image title
441
+ // Will comment these lines, in the future maybe we revert to settings
442
+ /*if ( 'none' == titleSource ) {
443
data['title'] = attachment['title'];
444
}else if ( 'title' == titleSource ) {
445
data['title'] = attachment['title'];
446
}else if ( 'description' == titleSource ) {
447
data['title'] = attachment['description'];
448
+ }*/
449
450
// Check from where to populate image caption
451
+ // Will comment these lines, in the future maybe we revert to settings
452
+ /*if ( 'none' == captionSource ) {
453
data['description'] = attachment['title'];
454
}else if ( 'title' == captionSource ) {
455
data['description'] = attachment['title'];
457
data['description'] = attachment['caption'];
458
}else if ( 'description' == captionSource ) {
459
data['description'] = attachment['description'];
460
+ }*/
461
462
new modula.items['model']( data );
463
}
changelog.txt CHANGED
@@ -1,3 +1,19 @@
1
= 2.2.3 - 06.01.2020 =
2
Fixed Autoptimize HTML code optimization bug
3
Fix warning for no uploaded image
1
+ = 2.2.4 - 05/02/2020 =
2
+ Added 'What's new' page
3
+ Added Uninstall options to remove data entries from DB
4
+ Added troubleshooting options to enqueue CSS and JS files everywhere
5
+ Added support for WebP files
6
+ Added WhatsApp as social icon
7
+ Added numbers to hover effects
8
+ Added cursor controls
9
+ Added social icons size and gutter
10
+ Fix max-width issue with Twenty Twenty theme
11
+ Fix menu entry colouring bug
12
+ Fix modula-item background
13
+ Fixed copy shortcode button design bug
14
+ Re-worded "Update" button
15
+ Removed settings for default title and caption
16
+
17
= 2.2.3 - 06.01.2020 =
18
Fixed Autoptimize HTML code optimization bug
19
Fix warning for no uploaded image
includes/admin/class-modula-admin.php CHANGED
@@ -23,8 +23,6 @@ class Modula_Admin {
23
add_action( 'wp_ajax_modula_save_images', array( $this, 'save_images' ) );
24
add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
25
26
-
27
-
28
}
29
30
public function register_submenus() {
@@ -254,14 +252,13 @@ class Modula_Admin {
254
255
public function admin_custom_css(){
256
?>
257
-
258
<style type="text/css">
259
- li#menu-posts-modula-gallery .wp-submenu li:last-child a {color: #52ad3a;}
260
</style>
261
262
<?php
263
}
264
-
265
}
266
267
new Modula_Admin();
23
add_action( 'wp_ajax_modula_save_images', array( $this, 'save_images' ) );
24
add_action( 'wp_ajax_modula_save_image', array( $this, 'save_image' ) );
25
26
}
27
28
public function register_submenus() {
252
253
public function admin_custom_css(){
254
?>
255
<style type="text/css">
256
+ a#modula-uninstall-link {color: #FF0000 !important;font-weight:bold;}
257
+ li#menu-posts-modula-gallery .wp-submenu li a[href$="modula-addons"] {color: #52ad3a;}
258
</style>
259
260
<?php
261
}
262
}
263
264
new Modula_Admin();
includes/admin/class-modula-cpt-fields-helper.php CHANGED
@@ -107,7 +107,7 @@ class Modula_CPT_Fields_Helper {
107
),
108
'slideshow' => array(
109
'label' => esc_html__('Slideshow', 'modula-best-grid-gallery'),
110
- 'title' => esc_html__( 'Lightbox Slideshow Settings', 'modula-best-grid-gallery' ),
111
'description' => esc_html__( 'Here you can modify the settings for lightbox slideshow like : autoplay / autoplay time / pause on hover', 'modula-best-grid-gallery' ),
112
"icon" => "dashicons dashicons-images-alt2",
113
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
@@ -115,7 +115,7 @@ class Modula_CPT_Fields_Helper {
115
),
116
'password_protect' => array(
117
'label' => esc_html__('Pass Protect', 'modula-best-grid-gallery'),
118
- 'title' => esc_html__('Pass Protect', 'modula-best-grid-gallery'),
119
//'description' => $password_protect_description,
120
"icon" => "dashicons dashicons-shield",
121
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
@@ -123,7 +123,7 @@ class Modula_CPT_Fields_Helper {
123
),
124
'watermark' => array(
125
'label' => esc_html__('Watermark', 'modula-best-grid-gallery'),
126
- 'title' => esc_html__('Watermark', 'modula-best-grid-gallery'),
127
//'description' => $watermark_description,
128
"icon" => "dashicons dashicons-id-alt",
129
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
@@ -155,6 +155,12 @@ class Modula_CPT_Fields_Helper {
155
'creative-gallery' => esc_html__( 'Creative Gallery', 'modula-best-grid-gallery' ),
156
'custom-grid' => esc_html__( 'Custom Grid', 'modula-best-grid-gallery' ),
157
),
158
'priority' => 10,
159
),
160
"gutter" => array(
@@ -260,17 +266,6 @@ class Modula_CPT_Fields_Helper {
260
"description" => esc_html__( 'Hide image titles from your gallery.', 'modula-best-grid-gallery' ),
261
'priority' => 10,
262
),
263
- "wp_field_title" => array(
264
- "name" => esc_html__( 'Default Title', 'modula-best-grid-gallery' ),
265
- "type" => "select",
266
- "description" => __( 'If you leave the title blank Modula will get the title from WordPress image by default.', 'modula-best-grid-gallery' ),
267
- "values" => array(
268
- 'none' => esc_html__( 'No default', 'modula-best-grid-gallery' ),
269
- 'title' => esc_html__( 'WP Image title', 'modula-best-grid-gallery' ),
270
- 'description' => esc_html__( 'WP Image description', 'modula-best-grid-gallery' ),
271
- ),
272
- 'priority' => 20,
273
- ),
274
"titleColor" => array(
275
"name" => esc_html__( 'Title Color', 'modula-best-grid-gallery' ),
276
"type" => "color",
@@ -294,18 +289,6 @@ class Modula_CPT_Fields_Helper {
294
"description" => esc_html__( 'Hide image captions from your gallery.', 'modula-best-grid-gallery' ),
295
'priority' => 50,
296
),
297
- "wp_field_caption" => array(
298
- "name" => esc_html__( 'Default Caption', 'modula-best-grid-gallery' ),
299
- "type" => "select",
300
- "description" => __( 'If you leave the caption blank Modula will get the title from WordPress image by default.', 'modula-best-grid-gallery' ),
301
- "values" => array(
302
- "none" => esc_html__( 'No default', 'modula-best-grid-gallery' ),
303
- "title" => esc_html__( 'WP Image title', 'modula-best-grid-gallery' ),
304
- "caption" => esc_html__( 'WP Image caption', 'modula-best-grid-gallery' ),
305
- "description" => esc_html__( 'WP Image description', 'modula-best-grid-gallery' ),
306
- ),
307
- 'priority' => 60,
308
- ),
309
"captionColor" => array(
310
"name" => esc_html__( 'Caption Color', 'modula-best-grid-gallery' ),
311
"type" => "color",
@@ -350,28 +333,35 @@ class Modula_CPT_Fields_Helper {
350
'priority' => 10,
351
),
352
"enableTwitter" => array(
353
- "name" => esc_html__( 'Add Twitter Icon', 'modula-best-grid-gallery' ),
354
"type" => "toggle",
355
"default" => 1,
356
"description" => "",
357
'priority' => 10,
358
),
359
"enableFacebook" => array(
360
- "name" => esc_html__( 'Add Facebook Icon', 'modula-best-grid-gallery' ),
361
"type" => "toggle",
362
"default" => 1,
363
"description" => "",
364
'priority' => 20,
365
),
366
"enableLinkedin" => array(
367
- "name" => esc_html__( 'Add LinkedIn Icon', 'modula-best-grid-gallery' ),
368
"type" => "toggle",
369
"default" => 1,
370
"description" => "",
371
'priority' => 30,
372
),
373
"enablePinterest" => array(
374
- "name" => esc_html__( 'Add Pinterest Icon', 'modula-best-grid-gallery' ),
375
"type" => "toggle",
376
"default" => 1,
377
'priority' => 40,
@@ -383,6 +373,24 @@ class Modula_CPT_Fields_Helper {
383
"default" => "#ffffff",
384
'priority' => 50,
385
),
386
),
387
'image-loaded-effects' => array(
388
"loadedScale" => array(
@@ -401,14 +409,37 @@ class Modula_CPT_Fields_Helper {
401
"description" => esc_html__( 'Select your preferred hover effect', 'modula-best-grid-gallery' ),
402
"type" => "hover-effect",
403
'default' => 'pufrobo',
404
- 'priority' => 10,
405
- ),
406
),
407
'style' => array(
408
"borderSize" => array(
409
"name" => esc_html__( 'Border Size', 'modula-best-grid-gallery' ),
410
"type" => "ui-slider",
411
- "description" => esc_html__( 'Set the border size of images in your gallrey.', 'modula-best-grid-gallery' ),
412
"min" => 0,
413
"max" => 10,
414
"default" => 0,
@@ -515,8 +546,10 @@ class Modula_CPT_Fields_Helper {
515
} else {
516
return array();
517
}
518
519
- }
520
521
public static function get_defaults() {
522
return apply_filters('modula_lite_default_settings', array(
@@ -532,8 +565,6 @@ class Modula_CPT_Fields_Helper {
532
'shuffle' => 0,
533
'titleColor' => '',
534
'captionColor' => '#ffffff',
535
- 'wp_field_caption' => 'none',
536
- 'wp_field_title' => 'none',
537
'hide_title' => 0,
538
'hide_description' => 0,
539
'captionFontSize' => '14',
@@ -544,10 +575,14 @@ class Modula_CPT_Fields_Helper {
544
'enableFacebook' => 1,
545
'enableLinkedin' => 1,
546
'enablePinterest' => 1,
547
- 'enableTwitter' => 1,
548
'filterClick' => 0,
549
- 'socialIconColor' => '#ffffff',
550
'loadedScale' => '100',
551
'effect' => 'pufrobo',
552
'borderColor' => '#ffffff',
553
'borderRadius' => '0',
107
),
108
'slideshow' => array(
109
'label' => esc_html__('Slideshow', 'modula-best-grid-gallery'),
110
+ 'title' => esc_html__( 'Lightbox slideshow settings', 'modula-best-grid-gallery' ),
111
'description' => esc_html__( 'Here you can modify the settings for lightbox slideshow like : autoplay / autoplay time / pause on hover', 'modula-best-grid-gallery' ),
112
"icon" => "dashicons dashicons-images-alt2",
113
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
115
),
116
'password_protect' => array(
117
'label' => esc_html__('Pass Protect', 'modula-best-grid-gallery'),
118
+ 'title' => esc_html__('Password protect your galleries', 'modula-best-grid-gallery'),
119
//'description' => $password_protect_description,
120
"icon" => "dashicons dashicons-shield",
121
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
123
),
124
'watermark' => array(
125
'label' => esc_html__('Watermark', 'modula-best-grid-gallery'),
126
+ 'title' => esc_html__('Watermark settings to protect your galleries', 'modula-best-grid-gallery'),
127
//'description' => $watermark_description,
128
"icon" => "dashicons dashicons-id-alt",
129
'badge' => esc_html__('PRO', 'modula-best-grid-gallery'),
155
'creative-gallery' => esc_html__( 'Creative Gallery', 'modula-best-grid-gallery' ),
156
'custom-grid' => esc_html__( 'Custom Grid', 'modula-best-grid-gallery' ),
157
),
158
+ "disabled" => array(
159
+ 'title' => esc_html__( 'Gallery types with PRO license', 'modula-best-grid-gallery' ),
160
+ 'values' => array(
161
+ "slider" => esc_html__( 'Slider', 'modula-best-grid-gallery' ),
162
+ ),
163
+ ),
164
'priority' => 10,
165
),
166
"gutter" => array(
266
"description" => esc_html__( 'Hide image titles from your gallery.', 'modula-best-grid-gallery' ),
267
'priority' => 10,
268
),
269
"titleColor" => array(
270
"name" => esc_html__( 'Title Color', 'modula-best-grid-gallery' ),
271
"type" => "color",
289
"description" => esc_html__( 'Hide image captions from your gallery.', 'modula-best-grid-gallery' ),
290
'priority' => 50,
291
),
292
"captionColor" => array(
293
"name" => esc_html__( 'Caption Color', 'modula-best-grid-gallery' ),
294
"type" => "color",
333
'priority' => 10,
334
),
335
"enableTwitter" => array(
336
+ "name" => esc_html__( 'Show Twitter Icon', 'modula-best-grid-gallery' ),
337
"type" => "toggle",
338
"default" => 1,
339
"description" => "",
340
'priority' => 10,
341
),
342
"enableFacebook" => array(
343
+ "name" => esc_html__( 'Show Facebook Icon', 'modula-best-grid-gallery' ),
344
+ "type" => "toggle",
345
+ "default" => 1,
346
+ "description" => "",
347
+ 'priority' => 20,
348
+ ),
349
+ "enableWhatsapp" => array(
350
+ "name" => esc_html__( 'Show Whatsapp Icon', 'modula-best-grid-gallery' ),
351
"type" => "toggle",
352
"default" => 1,
353
"description" => "",
354
'priority' => 20,
355
),
356
"enableLinkedin" => array(
357
+ "name" => esc_html__( 'Show LinkedIn Icon', 'modula-best-grid-gallery' ),
358
"type" => "toggle",
359
"default" => 1,
360
"description" => "",
361
'priority' => 30,
362
),
363
"enablePinterest" => array(
364
+ "name" => esc_html__( 'Show Pinterest Icon', 'modula-best-grid-gallery' ),
365
"type" => "toggle",
366
"default" => 1,
367
'priority' => 40,
373
"default" => "#ffffff",
374
'priority' => 50,
375
),
376
+ "socialIconSize" => array(
377
+ "name" => esc_html__( 'Size of social sharing icons', 'modula-best-grid-gallery' ),
378
+ "type" => "ui-slider",
379
+ "min" => 10,
380
+ "max" => 20,
381
+ "description" => esc_html__( '16 will be the default value. '),
382
+ "default" => 16,
383
+ 'priority' => 50,
384
+ ),
385
+ "socialIconPadding" => array(
386
+ "name" => esc_html__( 'Gutter', 'modula-best-grid-gallery' ),
387
+ "type" => "ui-slider",
388
+ "min" => 0,
389
+ "max" => 20,
390
+ "description" => esc_html__( 'Space Between social sharing icons'),
391
+ "default" => 10,
392
+ 'priority' => 50,
393
+ ),
394
),
395
'image-loaded-effects' => array(
396
"loadedScale" => array(
409
"description" => esc_html__( 'Select your preferred hover effect', 'modula-best-grid-gallery' ),
410
"type" => "hover-effect",
411
'default' => 'pufrobo',
412
+ 'priority' => 15,
413
+ ),
414
+
415
+ "cursor" => array(
416
+ "name" => esc_html__( 'Curson Icon', 'modula-best-grid-gallery'),
417
+ "description" => esc_html__( 'Select your favourite cursor', 'modula-best-grid-gallery'),
418
+ "type" => "select",
419
+ "default" => "zoom-in",
420
+ "priority" => 12,
421
+ 'values' => array(
422
+ 'pointer' => esc_html__( 'Pointer', 'modula-best-grid-gallery'),
423
+ 'zoom-in' => esc_html__( 'Magnifying Glass', 'modula-best-grid-gallery'),
424
+ ),
425
+ "disabled" => array(
426
+ 'title' => esc_html__( 'Cursors with PRO license', 'modula-best-grid-gallery' ),
427
+ 'values' => array(
428
+ 'wait' => esc_html__( 'Loading', 'modula-best-grid-gallery'),
429
+ 'cell' => esc_html__( 'Cell', 'modula-best-grid-gallery'),
430
+ 'crosshair' => esc_html__( 'Crosshair', 'modula-best-grid-gallery'),
431
+ 'nesw-resize' => esc_html__( 'Resize 1', 'modula-best-grid-gallery'),
432
+ 'nwse-resize' => esc_html__( 'Resize 2', 'modula-best-grid-gallery'),
433
+ 'custom' => esc_html__( 'Custom', 'modula-best-grid-gallery'),
434
+ ),
435
+ ),
436
+ ),
437
),
438
'style' => array(
439
"borderSize" => array(
440
"name" => esc_html__( 'Border Size', 'modula-best-grid-gallery' ),
441
"type" => "ui-slider",
442
+ "description" => esc_html__( 'Set the border size of images in your gallery.', 'modula-best-grid-gallery' ),
443
"min" => 0,
444
"max" => 10,
445
"default" => 0,
546
} else {
547
return array();
548
}
549
+
550
+ }
551
+
552
553
554
public static function get_defaults() {
555
return apply_filters('modula_lite_default_settings', array(
565
'shuffle' => 0,
566
'titleColor' => '',
567
'captionColor' => '#ffffff',
568
'hide_title' => 0,
569
'hide_description' => 0,
570
'captionFontSize' => '14',
575
'enableFacebook' => 1,
576
'enableLinkedin' => 1,
577
'enablePinterest' => 1,
578
+ 'enableTwitter' => 1,
579
+ 'enableWhatsapp' => 0,
580
'filterClick' => 0,
581
+ 'socialIconColor' => '#ffffff',
582
+ 'socialIconSize' => 16,
583
+ 'socialIconPadding' => 10,
584
'loadedScale' => '100',
585
+ 'cursor' => 'magnifying-glass',
586
'effect' => 'pufrobo',
587
'borderColor' => '#ffffff',
588
'borderRadius' => '0',
includes/admin/class-modula-cpt.php CHANGED
@@ -71,6 +71,11 @@ class Modula_CPT {
71
'callback' => 'output_gallery_images',
72
'context' => 'normal',
73
),
74
'modula-settings' => array(
75
'title' => esc_html__( 'Settings', 'modula-best-grid-gallery' ),
76
'callback' => 'output_gallery_settings',
@@ -90,8 +95,12 @@ class Modula_CPT {
90
/* Fire our meta box setup function on the post editor screen. */
91
add_action( 'load-post.php', array( $this, 'meta_boxes_setup' ) );
92
add_action( 'load-post-new.php', array( $this, 'meta_boxes_setup' ) );
93
94
- /* */
95
add_filter( 'views_edit-modula-gallery', array( $this, 'add_extensions_tab' ), 10, 1 );
96
97
// Post Table Columns
@@ -157,6 +166,35 @@ class Modula_CPT {
157
$this->builder->render( 'gallery' );
158
}
159
160
public function output_gallery_settings() {
161
$this->builder->render( 'settings' );
162
}
@@ -216,6 +254,7 @@ class Modula_CPT {
216
// Values for selects
217
$lightbox_values = apply_filters( 'modula_lightbox_values', array( 'no-link', 'direct', 'lightbox2', 'attachment-page' ) );
218
$effect_values = apply_filters( 'modula_effect_values', array( 'none', 'pufrobo' ) );
219
220
switch ( $field_id ) {
221
case 'description':
@@ -231,6 +270,8 @@ class Modula_CPT {
231
case 'borderSize':
232
case 'borderRadius':
233
case 'shadowSize':
234
$modula_settings[ $field_id ] = absint( $_POST['modula-settings'][ $field_id ] );
235
break;
236
case 'lightbox' :
@@ -242,6 +283,7 @@ class Modula_CPT {
242
break;
243
case 'disableSocial':
244
case 'enableTwitter' :
245
case 'enableFacebook' :
246
case 'enableGplus' :
247
case 'enablePinterest' :
@@ -256,10 +298,10 @@ class Modula_CPT {
256
case 'socialIconColor':
257
case 'borderColor':
258
case 'shadowColor':
259
- $modula_settings[ $field_id ] = sanitize_hex_color( $_POST['modula-settings'][ $field_id ] );
260
break;
261
case 'lightbox_background_color':
262
- $modula_settings[ $field_id ] = sanitize_hex_color( $_POST['modula-settings'][ $field_id ] );
263
break;
264
case 'lightbox_popup_opacity' :
265
$modula_settings[ $field_id ] = $_POST['modula-settings'][ $field_id ];
@@ -395,9 +437,10 @@ class Modula_CPT {
395
}
396
397
if ( 'limit' == $column) {
398
- $images_count = (is_array(get_post_meta( $post_id, 'modula-images', true ))) ? count(get_post_meta( $post_id, 'modula-images', true )) : 0;
399
400
- $padlock = '<svg id="padlock" style="margin:7px 12px 0 0; width:12px;position:relative;top:2px" viewBox="0 0 217.81886 310.38968" xmlns="http://www.w3.org/2000/svg">
401
<g transform="translate(-1550.3 -1495.4)">
402
<path d="m1659.3 1495.5c-0.9683 0.01-1.9372 0.021-2.9063 0.062-44.496 0.284-84.418 39.853-84.531 84.469-0.5035 10.517 0.1466 21.042 0.031 31.563h-21.438c0.5678 46.226-1.1556 92.56 0.9062 138.72 4.4359 29.724 31.126 56.603 62.25 55.156 34.078-0.066 68.262 1.0541 102.28-0.6876 31.934-5.5024 54.359-38.293 51.938-70.031 0.3669-41.041-0.035-82.083 0.125-123.12-7.1142-0.1818-14.23 0.139-21.344-0.094 0.5401-24.99 1.715-52.307-12.531-73.969-15.406-25.706-44.767-42.255-74.781-42.062zm0.4062 35.688c25.281 0.3463 50.259 21.283 49.531 47.625 0.5019 10.922 0.8363 21.85 1.0626 32.781-34.011-0.02-68.021 0.053-102.03-0.063 0.1057-17.098-4.4827-35.793 4.875-51.187 8.4966-16.311 25.48-28.793 44.125-29.125 0.8153-0.032 1.622-0.043 2.4375-0.031z" fill="#fff" opacity=".98"/>
403
<path d="m1657.1 1501.5c-44.13 1.1108-79.312 37.031-79.312 81.438v34.625h-21.344v117.75h0.031c-0.031 0.8505-0.031 1.7033-0.031 2.5625 0 34.197 25.051 61.719 56.187 61.719h93.094c31.136 0 56.219-27.522 56.219-61.719 0-0.859-0.032-1.7123-0.063-2.5625h0.063v-117.75h-21.313v-34.625c0-45.111-36.295-81.438-81.406-81.438-0.7049 0-1.4245-0.018-2.125 0zm-0.375 23.75c0.5355-0.013 1.0865 0 1.625 0 25.79-0.6025 51.139 18.477 56.406 43.812 0.8967 16.166 1.4017 32.319 1.6876 48.5h-114.31c-0.027-7.7372-0.063-15.456-0.2187-23.188-6.5279-33.085 21.075-68.332 54.812-69.125zm2.375 135.38c1.2168 0 2.4472 0.095 3.6875 0.2812 13.23 1.9847 22.36 14.301 20.375 27.531-0.9138 6.092-4.0565 11.334-8.4375 15l8.4688 53.094h-48l8.4374-53.094c-6.2414-5.2417-9.7038-13.536-8.4062-22.188 1.7986-11.99 12.112-20.593 23.875-20.625z" opacity=".98"/> </g></svg> ';
@@ -420,5 +463,352 @@ class Modula_CPT {
420
die( '1' );
421
422
}
423
424
- }
71
'callback' => 'output_gallery_images',
72
'context' => 'normal',
73
),
74
+ 'modula-albums-upsell' => array(
75
+ 'title' => esc_html__('Albums Upsell', 'modula-best-grid-gallery'),
76
+ 'callback' => 'output_upsell_albums',
77
+ 'context' => 'normal',
78
+ ),
79
'modula-settings' => array(
80
'title' => esc_html__( 'Settings', 'modula-best-grid-gallery' ),
81
'callback' => 'output_gallery_settings',
95
/* Fire our meta box setup function on the post editor screen. */
96
add_action( 'load-post.php', array( $this, 'meta_boxes_setup' ) );
97
add_action( 'load-post-new.php', array( $this, 'meta_boxes_setup' ) );
98
+
99
+ add_action( 'admin_menu', array($this, 'replace_submit_meta_box') );
100
101
+
102
+
103
+
104
add_filter( 'views_edit-modula-gallery', array( $this, 'add_extensions_tab' ), 10, 1 );
105
106
// Post Table Columns
166
$this->builder->render( 'gallery' );
167
}
168
169
+ public function output_upsell_albums() {
170
+ ?>
171
+ <div class="modula-upsells-carousel-wrapper">
172
+ <div class="modula-upsells-carousel">
173
+ <div class="modula-upsell modula-upsell-item">
174
+ <h2><?php esc_html_e( 'Modula Albums' , 'modula-best-grid-gallery' ) ?></h2>
175
+ <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>
176
+ <ul class="modula-upsells-list">
177
+ <li>Redirect to a gallery or a custom URL with the standalone functionality</li>
178
+ <li>Arrange your albums using columns or the custom grid</li>
179
+ <li>Hover effects</li>
180
+ <li>Fully compatible with all the other Modula extensions </li>
181
+ <li>Premium support</li>
182
+ </ul>
183
+ <p>
184
+ <a target="_blank"
185
+ href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=albums-metabox&amp;utm_campaign=litevspro#lite-vs-pro"
186
+ class="button"><?php esc_html_e( 'See LITE vs PRO Differences' , 'modula-best-grid-gallery' ) ?></a>
187
+ <a target="_blank"
188
+ style="margin-top:10px;"
189
+ href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=albums-metabox&amp;utm_campaign=upsell"
190
+ class="button-primary button"><?php esc_html_e( 'Get Modula Pro!' , 'modula-best-grid-gallery' ) ?></a>
191
+ </p>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ <?php
196
+ }
197
+
198
public function output_gallery_settings() {
199
$this->builder->render( 'settings' );
200
}
254
// Values for selects
255
$lightbox_values = apply_filters( 'modula_lightbox_values', array( 'no-link', 'direct', 'lightbox2', 'attachment-page' ) );
256
$effect_values = apply_filters( 'modula_effect_values', array( 'none', 'pufrobo' ) );
257
+ $cursor_value = apply_filters( 'modula_cursor_values', array( 'pointer', 'zoom-in') );
258
259
switch ( $field_id ) {
260
case 'description':
270
case 'borderSize':
271
case 'borderRadius':
272
case 'shadowSize':
273
+ case 'socialIconSize':
274
+ case 'socialIconPadding':
275
$modula_settings[ $field_id ] = absint( $_POST['modula-settings'][ $field_id ] );
276
break;
277
case 'lightbox' :
283
break;
284
case 'disableSocial':
285
case 'enableTwitter' :
286
+ case 'enableWhatsapp':
287
case 'enableFacebook' :
288
case 'enableGplus' :
289
case 'enablePinterest' :
298
case 'socialIconColor':
299
case 'borderColor':
300
case 'shadowColor':
301
+ $modula_settings[ $field_id ] = Modula_Helper::sanitize_rgba_colour( $_POST['modula-settings'][ $field_id ] );
302
break;
303
case 'lightbox_background_color':
304
+ $modula_settings[ $field_id ] = Modula_Helper::sanitize_rgba_colour( $_POST['modula-settings'][ $field_id ] );
305
break;
306
case 'lightbox_popup_opacity' :
307
$modula_settings[ $field_id ] = $_POST['modula-settings'][ $field_id ];
437
}
438
439
if ( 'limit' == $column) {
440
+ $images = get_post_meta( $post_id, 'modula-images', true );
441
+ $images_count = is_array( $images ) ? count( $images ) : 0;
442
443
+ $padlock = '<svg id="padlock" style="margin:7px 12px 0 0; width:12px;position:relative;top:2px" viewBox="0 0 217.81886 310.38968" xmlns="http://www.w3.org/2000/svg">
444
<g transform="translate(-1550.3 -1495.4)">
445
<path d="m1659.3 1495.5c-0.9683 0.01-1.9372 0.021-2.9063 0.062-44.496 0.284-84.418 39.853-84.531 84.469-0.5035 10.517 0.1466 21.042 0.031 31.563h-21.438c0.5678 46.226-1.1556 92.56 0.9062 138.72 4.4359 29.724 31.126 56.603 62.25 55.156 34.078-0.066 68.262 1.0541 102.28-0.6876 31.934-5.5024 54.359-38.293 51.938-70.031 0.3669-41.041-0.035-82.083 0.125-123.12-7.1142-0.1818-14.23 0.139-21.344-0.094 0.5401-24.99 1.715-52.307-12.531-73.969-15.406-25.706-44.767-42.255-74.781-42.062zm0.4062 35.688c25.281 0.3463 50.259 21.283 49.531 47.625 0.5019 10.922 0.8363 21.85 1.0626 32.781-34.011-0.02-68.021 0.053-102.03-0.063 0.1057-17.098-4.4827-35.793 4.875-51.187 8.4966-16.311 25.48-28.793 44.125-29.125 0.8153-0.032 1.622-0.043 2.4375-0.031z" fill="#fff" opacity=".98"/>
446
<path d="m1657.1 1501.5c-44.13 1.1108-79.312 37.031-79.312 81.438v34.625h-21.344v117.75h0.031c-0.031 0.8505-0.031 1.7033-0.031 2.5625 0 34.197 25.051 61.719 56.187 61.719h93.094c31.136 0 56.219-27.522 56.219-61.719 0-0.859-0.032-1.7123-0.063-2.5625h0.063v-117.75h-21.313v-34.625c0-45.111-36.295-81.438-81.406-81.438-0.7049 0-1.4245-0.018-2.125 0zm-0.375 23.75c0.5355-0.013 1.0865 0 1.625 0 25.79-0.6025 51.139 18.477 56.406 43.812 0.8967 16.166 1.4017 32.319 1.6876 48.5h-114.31c-0.027-7.7372-0.063-15.456-0.2187-23.188-6.5279-33.085 21.075-68.332 54.812-69.125zm2.375 135.38c1.2168 0 2.4472 0.095 3.6875 0.2812 13.23 1.9847 22.36 14.301 20.375 27.531-0.9138 6.092-4.0565 11.334-8.4375 15l8.4688 53.094h-48l8.4374-53.094c-6.2414-5.2417-9.7038-13.536-8.4062-22.188 1.7986-11.99 12.112-20.593 23.875-20.625z" opacity=".98"/> </g></svg> ';
463
die( '1' );
464
465
}
466
+
467
+
468
+ public function replace_submit_meta_box() {
469
+ global $post;
470
+ $post_type = 'modula-gallery';
471
+ remove_meta_box( 'submitdiv', $post_type, 'side' );
472
+ add_meta_box( 'submitdiv', __( 'Publish' ), array($this, 'post_submit_meta_box'), $post_type, 'side', 'high' );
473
+
474
+ }
475
+
476
+ public function post_submit_meta_box() {
477
+ global $action, $post;
478
+ $post_type = $post->post_type; // get current post_type
479
+ $post_type_object = get_post_type_object($post_type);
480
+ $can_publish = current_user_can($post_type_object->cap->publish_posts);
481
+ ?>
482
+ <div class="submitbox" id="submitpost">
483
+
484
+ <div id="minor-publishing">
485
+
486
+ <?php // Hidden submit button early on so that the browser chooses the right button when form is submitted with Return key ?>
487
+ <div style="display:none;">
488
+ <?php submit_button( __( 'Save' ), '', 'save' ); ?>
489
+ </div>
490
+
491
+ <div id="minor-publishing-actions">
492
+ <div id="save-action">
493
+ <?php
494
+ if ( 'publish' != $post->post_status && 'future' != $post->post_status && 'pending' != $post->post_status ) {
495
+ $private_style = '';
496
+ if ( 'private' == $post->post_status ) {
497
+ $private_style = 'style="display:none"';
498
+ }
499
+ ?>
500
+ <input <?php echo $private_style; ?> type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save Draft' ); ?>" class="button" />
501
+ <span class="spinner"></span>
502
+ <?php } elseif ( 'pending' == $post->post_status && $can_publish ) { ?>
503
+ <input type="submit" name="save" id="save-post" value="<?php esc_attr_e( 'Save as Pending' ); ?>" class="button" />
504
+ <span class="spinner"></span>
505
+ <?php } ?>
506
+ </div>
507
+ <?php if ( is_post_type_viewable( $post_type_object ) ) : ?>
508
+ <div id="preview-action">
509
+ <?php
510
+ $preview_link = esc_url( get_preview_post_link( $post ) );
511
+ if ( 'publish' == $post->post_status ) {
512
+ $preview_button_text = __( 'Preview Changes' );
513
+ } else {
514
+ $preview_button_text = __( 'Preview' );
515
+ }
516
+
517
+ $preview_button = sprintf(
518
+ '%1$s<span class="screen-reader-text"> %2$s</span>',
519
+ $preview_button_text,
520
+ /* translators: Accessibility text. */
521
+ __( '(opens in a new tab)' )
522
+ );
523
+ ?>
524
+ <a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview-<?php echo (int) $post->ID; ?>" id="post-preview"><?php echo $preview_button; ?></a>
525
+ <input type="hidden" name="wp-preview" id="wp-preview" value="" />
526
+ </div>
527
+ <?php endif; // public post type ?>
528
+ <?php
529
+ /**
530
+ * Fires before the post time/date setting in the Publish meta box.
531
+ *
532
+ * @since 4.4.0
533
+ *
534
+ * @param WP_Post $post WP_Post object for the current post.
535
+ */
536
+ do_action( 'post_submitbox_minor_actions', $post );
537
+ ?>
538
+ <div class="clear"></div>
539
+ </div><!-- #minor-publishing-actions -->
540
+
541
+ <div id="misc-publishing-actions">
542
+
543
+ <div class="misc-pub-section misc-pub-post-status">
544
+ <?php _e( 'Status:' ); ?> <span id="post-status-display">
545
+ <?php
546
+
547
+ switch ( $post->post_status ) {
548
+ case 'private':
549
+ _e( 'Privately Published' );
550
+ break;
551
+ case 'publish':
552
+ _e( 'Published' );
553
+ break;
554
+ case 'future':
555
+ _e( 'Scheduled' );
556
+ break;
557
+ case 'pending':
558
+ _e( 'Pending Review' );
559
+ break;
560
+ case 'draft':
561
+ case 'auto-draft':
562
+ _e( 'Draft' );
563
+ break;
564
+ }
565
+ ?>
566
+ </span>
567
+ <?php
568
+ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_publish ) {
569
+ $private_style = '';
570
+ if ( 'private' == $post->post_status ) {
571
+ $private_style = 'style="display:none"';
572
+ }
573
+ ?>
574
+ <a href="#post_status" <?php echo $private_style; ?> class="edit-post-status hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit status' ); ?></span></a>
575
+
576
+ <div id="post-status-select" class="hide-if-js">
577
+ <input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ( 'auto-draft' == $post->post_status ) ? 'draft' : $post->post_status ); ?>" />
578
+ <label for="post_status" class="screen-reader-text"><?php _e( 'Set status' ); ?></label>
579
+ <select name="post_status" id="post_status">
580
+ <?php if ( 'publish' == $post->post_status ) : ?>
581
+ <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e( 'Published' ); ?></option>
582
+ <?php elseif ( 'private' == $post->post_status ) : ?>
583
+ <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e( 'Privately Published' ); ?></option>
584
+ <?php elseif ( 'future' == $post->post_status ) : ?>
585
+ <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e( 'Scheduled' ); ?></option>
586
+ <?php endif; ?>
587
+ <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e( 'Pending Review' ); ?></option>
588
+ <?php if ( 'auto-draft' == $post->post_status ) : ?>
589
+ <option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
590
+ <?php else : ?>
591
+ <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e( 'Draft' ); ?></option>
592
+ <?php endif; ?>
593
+ </select>
594
+ <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e( 'OK' ); ?></a>
595
+ <a href="#post_status" class="cancel-post-status hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
596
+ </div>
597
+
598
+ <?php } ?>
599
+ </div><!-- .misc-pub-section -->
600
+
601
+ <div class="misc-pub-section misc-pub-visibility" id="visibility">
602
+ <?php _e( 'Visibility:' ); ?> <span id="post-visibility-display">
603
+ <?php
604
+
605
+ if ( 'private' == $post->post_status ) {
606
+ $post->post_password = '';
607
+ $visibility = 'private';
608
+ $visibility_trans = __( 'Private' );
609
+ } elseif ( ! empty( $post->post_password ) ) {
610
+ $visibility = 'password';
611
+ $visibility_trans = __( 'Password protected' );
612
+ } elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
613
+ $visibility = 'public';
614
+ $visibility_trans = __( 'Public, Sticky' );
615
+ } else {
616
+ $visibility = 'public';
617
+ $visibility_trans = __( 'Public' );
618
+ }
619
+
620
+ echo esc_html( $visibility_trans );
621
+ ?>
622
+ </span>
623
+ <?php if ( $can_publish ) { ?>
624
+ <a href="#visibility" class="edit-visibility hide-if-no-js" role="button"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit visibility' ); ?></span></a>
625
+
626
+ <div id="post-visibility-select" class="hide-if-js">
627
+ <input type="hidden" name="hidden_post_password" id="hidden-post-password" value="<?php echo esc_attr( $post->post_password ); ?>" />
628
+ <?php if ( $post_type == 'post' ) : ?>
629
+ <input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> />
630
+ <?php endif; ?>
631
+ <input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
632
+ <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e( 'Public' ); ?></label><br />
633
+ <?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
634
+ <span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
635
+ <?php endif; ?>
636
+ <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e( 'Password protected' ); ?></label><br />
637
+ <span id="password-span"><label for="post_password"><?php _e( 'Password:' ); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr( $post->post_password ); ?>" maxlength="255" /><br /></span>
638
+ <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e( 'Private' ); ?></label><br />
639
+
640
+ <p>
641
+ <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e( 'OK' ); ?></a>
642
+ <a href="#visibility" class="cancel-post-visibility hide-if-no-js button-cancel"><?php _e( 'Cancel' ); ?></a>
643
+ </p>
644
+ </div>
645
+ <?php } ?>
646
+
647
+ </div><!-- .misc-pub-section -->
648
+
649
+ <?php
650
+ /* translators: Publish box date string. 1: Date, 2: Time. See https://secure.php.net/date */
651
+ $date_string = __( '%1$s at %2$s' );
652
+ /* translators: Publish box date format, see https://secure.php.net/date */
653
+ $date_format = _x( 'M j, Y', 'publish box date format' );
654
+ /* translators: Publish box time format, see https://secure.php.net/date */
655
+ $time_format = _x( 'H:i', 'publish box time format' );
656
+
657
+ if ( 0 != $post->ID ) {
658
+ if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
659
+ /* translators: Post date information. %s: Date on which the post is currently scheduled to be published. */
660
+ $stamp = __( 'Scheduled for: %s' );
661
+ } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published
662
+ /* translators: Post date information. %s: Date on which the post was published. */
663
+ $stamp = __( 'Published on: %s' );
664
+ } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
665
+ $stamp = __( 'Publish <b>immediately</b>' );
666
+ } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified
667
+ /* translators: Post date information. %s: Date on which the post is to be published. */
668
+ $stamp = __( 'Schedule for: %s' );
669
+ } else { // draft, 1 or more saves, date specified
670
+ /* translators: Post date information. %s: Date on which the post is to be published. */
671
+ $stamp = __( 'Publish on: %s' );
672
+ }
673
+ $date = sprintf(
674
+ $date_string,
675
+ date_i18n( $date_format, strtotime( $post->post_date ) ),
676
+ date_i18n( $time_format, strtotime( $post->post_date ) )
677
+ );
678
+ } else { // draft (no saves, and thus no date specified)
679
+ $stamp = __( 'Publish <b>immediately</b>' );
680
+ $date = sprintf(
681
+ $date_string,
682
+ date_i18n( $date_format, strtotime( current_time( 'mysql' ) ) ),
683
+ date_i18n( $time_format, strtotime( current_time( 'mysql' ) ) )
684
+ );
685
+ }
686
+
687
+ if ( ! empty( $args['args']['revisions_count'] ) ) :
688
+ ?>
689
+ <div class="misc-pub-section misc-pub-revisions">
690
+ <?php
691
+ /* translators: Post revisions heading. %s: The number of available revisions. */
692
+ printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
693
+ ?>
694
+ <a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
695
+ </div>
696
+ <?php
697
+ endif;
698
+
699
+ if ( $can_publish ) : // Contributors don't get to choose the date of publish
700
+ ?>
701
+ <div class="misc-pub-section curtime misc-pub-curtime">
702
+ <span id="timestamp">
703
+ <?php printf( $stamp, '<b>' . $date . '</b>' ); ?>
704
+ </span>
705
+ <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" role="button">
706
+ <span aria-hidden="true"><?php _e( 'Edit' ); ?></span>
707
+ <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span>
708
+ </a>
709
+ <fieldset id="timestampdiv" class="hide-if-js">
710
+ <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
711
+ <?php touch_time( ( $action === 'edit' ), 1 ); ?>
712
+ </fieldset>
713
+ </div><?php // /misc-pub-section ?>
714
+ <?php endif; ?>
715
+
716
+ <?php if ( 'draft' === $post->post_status && get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ) : ?>
717
+ <div class="notice notice-info notice-alt inline">
718
+ <p>
719
+ <?php
720
+ echo sprintf(
721
+ /* translators: %s: URL to the Customizer. */
722
+ __( 'This draft comes from your <a href="%s">unpublished customization changes</a>. You can edit, but there&#8217;s no need to publish now. It will be published automatically with those changes.' ),
723
+ esc_url(
724
+ add_query_arg(
725
+ 'changeset_uuid',
726
+ rawurlencode( get_post_meta( $post->ID, '_customize_changeset_uuid', true ) ),
727
+ admin_url( 'customize.php' )
728
+ )
729
+ )
730
+ );
731
+ ?>
732
+ </p>
733
+ </div>
734
+ <?php endif; ?>
735
+
736
+ <?php
737
+ /**
738
+ * Fires after the post time/date setting in the Publish meta box.
739
+ *
740
+ * @since 2.9.0
741
+ * @since 4.4.0 Added the `$post` parameter.
742
+ *
743
+ * @param WP_Post $post WP_Post object for the current post.
744
+ */
745
+ do_action( 'post_submitbox_misc_actions', $post );
746
+ ?>
747
+ </div>
748
+ <div class="clear"></div>
749
+ </div>
750
+
751
+ <div id="major-publishing-actions">
752
+ <?php
753
+ /**
754
+ * Fires at the beginning of the publishing actions section of the Publish meta box.
755
+ *
756
+ * @since 2.7.0
757
+ * @since 4.9.0 Added the `$post` parameter.
758
+ *
759
+ * @param WP_Post|null $post WP_Post object for the current post on Edit Post screen,
760
+ * null on Edit Link screen.
761
+ */
762
+ do_action( 'post_submitbox_start', $post );
763
+ ?>
764
+ <div id="delete-action">
765
+ <?php
766
+ if ( current_user_can( 'delete_post', $post->ID ) ) {
767
+ if ( ! EMPTY_TRASH_DAYS ) {
768
+ $delete_text = __( 'Delete Permanently' );
769
+ } else {
770
+ $delete_text = __( 'Move to Trash' );
771
+ }
772
+ ?>
773
+ <a class="submitdelete deletion" href="<?php echo get_delete_post_link( $post->ID ); ?>"><?php echo $delete_text; ?></a>
774
+ <?php
775
+ }
776
+ ?>
777
+ </div>
778
+
779
+ <div id="publishing-action">
780
+ <span class="spinner"></span>
781
+ <?php
782
+ if ( ! in_array( $post->post_status, array( 'publish', 'future', 'private' ) ) || 0 == $post->ID ) {
783
+ if ( $can_publish ) :
784
+ if ( ! empty( $post->post_date_gmt ) && time() < strtotime( $post->post_date_gmt . ' +0000' ) ) :
785
+ ?>
786
+ <input name="original_publish" type="hidden" id="original_publish" value="<?php echo esc_attr_x( 'Schedule', 'post action/button label' ); ?>" />
787
+ <?php submit_button( _x( 'Schedule', 'post action/button label' ), 'primary large', 'publish', false ); ?>
788
+ <?php else : ?>
789
+ <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e('Update ') . 'modula-gallery';; ?>" />
790
+ <?php submit_button( __( 'Save Gallery', 'modula-best-grid-gallery' ), 'primary large', 'publish', false ); ?>
791
+ <?php
792
+ endif;
793
+ else :
794
+ ?>
795
+ <input name="original_publish" type="hidden" id="original_publish" value="<?php esc_attr_e( 'Submit for Review' ); ?>" />
796
+ <?php submit_button( __( 'Submit for Review' ), 'primary large', 'publish', false ); ?>
797
+ <?php
798
+ endif;
799
+ } else {
800
+ ?>
801
+
802
+ <input name="save" type="submit" class="button button-primary button-large" id="publish" value="<?php esc_attr_e( 'Update Gallery', 'modula-best-grid-gallery' ). 'modula-gallery'; ?>" />
803
+ <?php
804
+ }
805
+ ?>
806
+ </div>
807
+ <div class="clear"></div>
808
+ </div>
809
+ </div> <?php
810
+ }
811
+ }
812
+
813
+
814
includes/admin/class-modula-field-builder.php CHANGED
@@ -315,7 +315,12 @@ class Modula_Field_Builder {
315
break;
316
case 'color' :
317
$html .= '<div class="modula-colorpickers">';
318
- $html .= '<input id="' . esc_attr( $field['id'] ) . '" class="modula-color" data-setting="' . esc_attr( $field['id'] ) . '" name="modula-settings[' . esc_attr( $field['id'] ) . ']" value="' . esc_attr( $value ) . '">';
319
$html .= '</div>';
320
break;
321
case "toggle":
@@ -337,7 +342,7 @@ class Modula_Field_Builder {
337
case "hover-effect":
338
$hovers = apply_filters( 'modula_available_hover_effects', array(
339
'none' => esc_html__( 'None', 'modula-best-grid-gallery' ),
340
- 'pufrobo' => esc_html__( 'Pufrobo', 'modula-best-grid-gallery' ),
341
) );
342
$pro_hovers = apply_filters( 'modula_pro_hover_effects', array(
343
'fluid-up' => esc_html__( 'Fluid Up', 'modula-best-grid-gallery' ),
315
break;
316
case 'color' :
317
$html .= '<div class="modula-colorpickers">';
318
+ if ( isset( $field['alpha'] ) && $field['alpha'] ) {
319
+ $html .= '<input id="' . esc_attr( $field['id'] ) . '" class="modula-color" data-alpha="true" data-setting="' . esc_attr( $field['id'] ) . '" name="modula-settings[' . esc_attr( $field['id'] ) . ']" value="' . esc_attr( $value ) . '">';
320
+ }else{
321
+ $html .= '<input id="' . esc_attr( $field['id'] ) . '" class="modula-color" data-setting="' . esc_attr( $field['id'] ) . '" name="modula-settings[' . esc_attr( $field['id'] ) . ']" value="' . esc_attr( $value ) . '">';
322
+ }
323
+
324
$html .= '</div>';
325
break;
326
case "toggle":
342
case "hover-effect":
343
$hovers = apply_filters( 'modula_available_hover_effects', array(
344
'none' => esc_html__( 'None', 'modula-best-grid-gallery' ),
345
+ 'pufrobo' => esc_html__( '1. Pufrobo', 'modula-best-grid-gallery' ),
346
) );
347
$pro_hovers = apply_filters( 'modula_pro_hover_effects', array(
348
'fluid-up' => esc_html__( 'Fluid Up', 'modula-best-grid-gallery' ),
includes/admin/class-modula-upsells.php CHANGED
@@ -63,8 +63,8 @@ class Modula_Upsells {
63
64
public function hovereffects_tab_upsell( $tab_content ) {
65
66
- $upsell_title = esc_html__( 'Need a new hover effect?', 'modula-best-grid-gallery' );
67
- $upsell_description = esc_html__( 'Upgrade to Modula Pro today to unlock 11 more hover effects...', 'modula-best-grid-gallery' );
68
69
$tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'hovereffects' );
70
@@ -152,42 +152,49 @@ class Modula_Upsells {
152
public function meta_boxes_setup() {
153
154
/* Add meta boxes on the 'add_meta_boxes' hook. */
155
- add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
156
157
}
158
159
public function add_meta_boxes() {
160
-
161
add_meta_box(
162
'modula-sorting-upsell', // Unique ID
163
- esc_html__('Sorting', 'modula-best-grid-gallery'), // Title
164
array( $this, 'output_sorting_upsell' ), // Callback function
165
'modula-gallery', // Admin page (or post type)
166
'side', // Context
167
'default' // Priority
168
);
169
-
170
}
171
172
public function output_sorting_upsell(){
173
?>
174
- <div class="modula-upsell" style="margin-top:0;padding: 10px;">
175
- <h2><?php esc_html_e( 'Looking for gallery sorting?', 'modula-best-grid-gallery' ) ?></h2>
176
- <p class="modula-upsell-description"><?php esc_html_e( 'Upgrade to Modula Pro today to get access to 7 sorting options.', 'modula-best-grid-gallery' ) ?></p>
177
- <ul style="list-style: circle;padding-left: 20px;">
178
- <li>Date created - newest first</li>
179
- <li>Date created - oldest first</li>
180
- <li>Date modified - most recent first</li>
181
- <li>Date modified - most recent last</li>
182
- <li>Title alphabetically</li>
183
- <li>Title reverse</li>
184
- <li>Random</li>
185
- </ul>
186
- <p>
187
- <a target="_blank" href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=sorting-metabox&amp;utm_campaign=litevspro#lite-vs-pro" class="button"><?php esc_html_e( 'See LITE vs PRO Differences', 'modula-best-grid-gallery' ) ?></a>
188
- <a target="_blank" style="margin-top:10px;" href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=sorting-metabox&amp;utm_campaign=upsell" class="button-primary button"><?php esc_html_e( 'Get Modula Pro!', 'modula-best-grid-gallery' ) ?></a>
189
- </p>
190
- </div>
191
<?php
192
}
193
63
64
public function hovereffects_tab_upsell( $tab_content ) {
65
66
+ $upsell_title = esc_html__( 'Need new hover effects and cursors ?', 'modula-best-grid-gallery' );
67
+ $upsell_description = esc_html__( 'Upgrade to Modula Pro today to unlock 41 more hover effects and custom cursors...', 'modula-best-grid-gallery' );
68
69
$tab_content .= $this->generate_upsell_box( $upsell_title, $upsell_description, 'hovereffects' );
70
152
public function meta_boxes_setup() {
153
154
/* Add meta boxes on the 'add_meta_boxes' hook. */
155
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ),10 );
156
157
}
158
159
public function add_meta_boxes() {
160
add_meta_box(
161
'modula-sorting-upsell', // Unique ID
162
+ esc_html__('Sorting Upsells', 'modula-best-grid-gallery'), // Title
163
array( $this, 'output_sorting_upsell' ), // Callback function
164
'modula-gallery', // Admin page (or post type)
165
'side', // Context
166
'default' // Priority
167
);
168
}
169
170
public function output_sorting_upsell(){
171
?>
172
+ <div class="modula-upsells-carousel-wrapper">
173
+ <div class="modula-upsells-carousel">
174
+ <div class="modula-upsell modula-upsell-item">
175
+ <h2><?php esc_html_e( 'Looking for gallery sorting?' , 'modula-best-grid-gallery' ) ?></h2>
176
+ <p class="modula-upsell-description"><?php esc_html_e( 'Upgrade to Modula Pro today to get access to 7 sorting options.' , 'modula-best-grid-gallery' ) ?></p>
177
+ <ul class="modula-upsells-list">
178
+ <li>Date created - newest first</li>
179
+ <li>Date created - oldest first</li>
180
+ <li>Date modified - most recent first</li>
181
+ <li>Date modified - most recent last</li>
182
+ <li>Title alphabetically</li>
183
+ <li>Title reverse</li>
184
+ <li>Random</li>
185
+ </ul>
186
+ <p>
187
+ <a target="_blank"
188
+ href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=sorting-metabox&amp;utm_campaign=litevspro#lite-vs-pro"
189
+ class="button"><?php esc_html_e( 'See LITE vs PRO Differences' , 'modula-best-grid-gallery' ) ?></a>
190
+ <a target="_blank"
191
+ style="margin-top:10px;"
192
+ href="https://wp-modula.com/pricing/?utm_source=modula-lite&amp;utm_medium=sorting-metabox&amp;utm_campaign=upsell"
193
+ class="button-primary button"><?php esc_html_e( 'Get Modula Pro!' , 'modula-best-grid-gallery' ) ?></a>
194
+ </p>
195
+ </div>
196
+ </div>
197
+ </div>
198
<?php
199
}
200
includes/admin/tabs/about.php ADDED
@@ -0,0 +1,52 @@
1
+ <?php
2
+ $issues = array(
3
+ 'feature' => array(
4
+ esc_html__( 'Added Uninstall options to remove data entries from DB', 'modula-best-grid-gallery' ),
5
+ esc_html__( 'Added troubleshooting options to enqueue CSS and JS files everywhere', 'modula-best-grid-gallery' ),
6
+ esc_html__( 'Added support for WebP files', 'modula-best-grid-gallery' ),
7
+ esc_html__( 'Added WhatsApp as social icon', 'modula-best-grid-gallery' ),
8
+ esc_html__( 'Added numbers to hover effects', 'modula-best-grid-gallery' ),
9
+ esc_html__( 'Added cursor controls', 'modula-best-grid-gallery' ),
10
+ esc_html__( 'Added social icons size and gutter', 'modula-best-grid-gallery' )
11
+ ),
12
+ 'fix' => array(
13
+ esc_html__( 'Fix max-width issue with Twenty Twenty theme', 'modula-best-grid-gallery' ),
14
+ esc_html__( 'Fix menu entry colouring bug', 'modula-best-grid-gallery' ),
15
+ esc_html__( 'Fix modula-item background', 'modula-best-grid-gallery' ),
16
+ esc_html__( 'Re-worded "Update" button', 'modula-best-grid-gallery' ),
17
+ esc_html__( 'Fixed copy shortcode button design bug', 'modula-best-grid-gallery' )
18
+ ),
19
+ 'removal' => array(
20
+ esc_html__( 'Removed settings for default title and caption', 'modula-best-grid-gallery' )
21
+ )
22
+ );
23
+ ?>
24
+ <div class="row modula-about-row">
25
+ <div class="about__container">
26
+ <div class="about__header modula-about-header">
27
+ <div class="about__header-title modula-about-heading">
28
+ <h1><?php esc_html_e( 'Modula', 'modula-best-grid-gallery' ) ?><span><?php echo MODULA_LITE_VERSION; ?></span></h1>
29
+ </div>
30
+ <div class="about__header-badge"></div>
31
+ <div class="about__header-text">
32
+ <p><?php esc_html_e('Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.','modula-best-grid-gallery'); ?></p>
33
+ </div>
34
+ </div>
35
+ <div class="modula-about-content">
36
+ <?php if (!empty($issues)) { ?>
37
+
38
+ <h2><?php printf(esc_html__('Version %s addressed %s bug and implemented %s features.', 'modula-best-grid-gallery'), MODULA_LITE_VERSION, count($issues['fix']), count($issues['feature'])); ?></h2>
39
+ <ul class="modula-about-list">
40
+ <?php
41
+ foreach ($issues as $key => $iss) {
42
+ foreach ($iss as $is) {
43
+ echo "<li class='$key'>$is</li>";
44
+ }
45
+ }
46
+ ?>
47
+ </ul>
48
+
49
+ <?php } ?>
50
+ </div>
51
+ </div>
52
+ </div>
includes/admin/tabs/troubleshooting-options.php ADDED
@@ -0,0 +1,131 @@
1
+ <?php
2
+ $defaults = apply_filters('modula_troubleshooting_defaults', array(
3
+ 'enqueue_files' => false,
4
+ 'pass_protect' => false,
5
+ 'download_protect' => false,
6
+ 'deeplink' => false,
7
+ 'gridtypes' => array(),
8
+ 'lightboxes' => array(),
9
+ ));
10
+ $troubleshooting_options = get_option( 'modula_troubleshooting_option', array() );
11
+ $troubleshooting_options = wp_parse_args( $troubleshooting_options, $defaults );
12
+
13
+ $troubleshooting_fields = array(
14
+ 'enqueue_files' => array(
15
+ 'label' => __('Enqueue Modula assets', 'modula-best-grid-gallery'),
16
+ 'description' => __('Enqueue CSS & JS files on all pages', 'modula-best-grid-gallery'),
17
+ 'type' => 'toggle',
18
+ 'default' => 0,
19
+ 'priority' => 10,
20
+ ),
21
+ 'gridtypes' => array(
22
+ 'label' => __('Grid Types', 'modula-best-grid-gallery'),
23
+ 'description' => __('Select which grid type you are using to enqueue scripts and styles', 'modula-best-grid-gallery'),
24
+ 'type' => 'select',
25
+ 'values' => array( 'custom-grid' => __('Custom Grid', 'modula-best-grid-gallery') ),
26
+ 'priority' => 20,
27
+
28
+ ),
29
+ 'lightboxes' => array(
30
+ 'label' => __('Lightboxes', 'modula-best-grid-gallery'),
31
+ 'description' => __('Select which lightboxes you are using to enqueue scripts and styles', 'modula-best-grid-gallery'),
32
+ 'type' => 'select',
33
+ 'values' => array( 'lightbox2' => __('Lightbox2', 'modula-best-grid-gallery') ),
34
+ 'priority' => 30,
35
+ ),
36
+ 'lazy_load' => array(
37
+ 'label' => __('Lazy Load', 'modula-best-grid-gallery'),
38
+ 'description' => __('Check this if you\'re using Lazyload with your galleries', 'modula-best-grid-gallery'),
39
+ 'type' => 'toggle',
40
+ 'priority' => 40,
41
+ )
42
+ );
43
+
44
+ $troubleshooting_fields = apply_filters( 'modula_troubleshooting_fields', $troubleshooting_fields );
45
+ $class = 'troubleshoot-subfield';
46
+ if ( ! $troubleshooting_options['enqueue_files'] ) {
47
+ $class .= ' hide';
48
+ }
49
+
50
+ ?>
51
+ <div class="row">
52
+ <h1 class="wp-clearfix"><?php echo esc_html__('Select Modula\'s CSS files and/or JS files to be enqueued on all pages.', 'modula-best-grid-gallery'); ?></h1>
53
+ <p><?php echo esc_html__('If you have problems with displaying or running Modula Galleries you might want to enqueue Modula CSS and JS in all pages.', 'modula-best-grid-gallery'); ?></p>
54
+ <form id="modula_troubleshooting_option" method="post">
55
+ <table class="form-table">
56
+ <tbody>
57
+ <?php
58
+ foreach ($troubleshooting_fields as $key => $ts_field) {
59
+ ?>
60
+ <tr valign="top" class="<?php echo 'enqueue_files' != $key ? $class : '' ?>">
61
+ <th scope="row" valign="top">
62
+ <?php
63
+ echo esc_html( $ts_field['label'] );
64
+
65
+ if ( isset( $ts_field['description'] ) ) {
66
+ echo '<div class="tab-header-tooltip-container modula-tooltip"><span>[?]</span><div class="tab-header-description modula-tooltip-content">';
67
+ echo wp_kses_post( $ts_field['description'] );
68
+ echo '</div></div>';
69
+ }
70
+
71
+ ?>
72
+ </th>
73
+ <td>
74
+ <div class="wrap modula">
75
+ <div class="">
76
+ <?php if ('select' == $ts_field['type']) { ?>
77
+ <div class="modula-select">
78
+ <?php
79
+ foreach ($ts_field['values'] as $value => $label ) {
80
+ echo '<label>';
81
+ echo '<input type="checkbox" ' . checked( true, in_array( $value, $troubleshooting_options[ $key ] ), false ) . ' name="modula_troubleshooting_option[' . esc_attr( $key ) .'][]" value="' . esc_attr( $value ) . '">';
82
+ echo '<span>' . esc_html( $label ) . '</span>';
83
+ echo '</label>';
84
+ }
85
+ ?>
86
+ </div>
87
+ <?php } ?>
88
+
89
+ <?php if ('toggle' == $ts_field['type']) { ?>
90
+ <div class="modula-toggle">
91
+ <input class="modula-toggle__input" type="checkbox"
92
+ data-setting="modula_troubleshooting_option[<?php echo $key; ?>]"
93
+ id="modula_troubleshooting_option-<?php echo $key; ?>"
94
+ name="modula_troubleshooting_option[<?php echo $key; ?>]"
95
+ value="1" <?php checked(1, $troubleshooting_options[ $key ], true ) ?>>
96
+ <div class="modula-toggle__items">
97
+ <span class="modula-toggle__track"></span>
98
+ <span class="modula-toggle__thumb"></span>
99
+ <svg class="modula-toggle__off" width="6" height="6" aria-hidden="true"
100
+ role="img"
101
+ focusable="false"
102
+ viewBox="0 0 6 6">
103
+ <path d="M3 1.5c.8 0 1.5.7 1.5 1.5S3.8 4.5 3 4.5 1.5 3.8 1.5 3 2.2 1.5 3 1.5M3 0C1.3 0 0 1.3 0 3s1.3 3 3 3 3-1.3 3-3-1.3-3-3-3z"></path>
104
+ </svg>
105
+ <svg class="modula-toggle__on" width="2" height="6" aria-hidden="true"
106
+ role="img"
107
+ focusable="false"
108
+ viewBox="0 0 2 6">
109
+ <path d="M0 0h2v6H0z"></path>
110
+ </svg>
111
+ </div>
112
+ </div>
113
+ <?php } ?>
114
+ </div>
115
+ </div>
116
+ </td>
117
+ </tr>
118
+ <?php
119
+ }
120
+ ?>
121
+ <tr valign="top">
122
+ <td>
123
+ <div>
124
+ <?php submit_button(__('Save', 'modula-best-grid-gallery'), 'primary', 'modula-troubleshooting-submit', false); ?>
125
+ </div>
126
+ </td>
127
+ </tr>
128
+ </tbody>
129
+ </table>
130
+ </form>
131
+ </div>
includes/class-modula-upgrades.php CHANGED
@@ -54,7 +54,15 @@ class Modula_Upgrades {
54
public function check_on_activate() {
55
56
// Check if is a new 2.0.0 install or an old install
57
- $version = get_option( 'modula_version', array() );
58
if ( empty( $version ) ) {
59
if ( ! $this->check_upgrade_complete( 'modula_v2' ) && $this->check_old_db() ) {
60
$version['upgraded_from'] = '1.3.1';
@@ -70,6 +78,7 @@ class Modula_Upgrades {
70
71
update_option( 'modula_version', $version );
72
73
}
74
75
/**
@@ -306,8 +315,10 @@ class Modula_Upgrades {
306
'lightbox' => 'lightbox2',
307
'shuffle' => 0,
308
'captionColor' => '#ffffff',
309
- 'wp_field_caption' => 'none',
310
- 'wp_field_title' => 'none',
311
'hide_title' => 0,
312
'hide_description' => 0,
313
'captionFontSize' => '14',
@@ -315,9 +326,12 @@ class Modula_Upgrades {
315
'enableFacebook' => 1,
316
'enableGplus' => 1,
317
'enablePinterest' => 1,
318
- 'enableTwitter' => 1,
319
'filterClick' => 0,
320
- 'socialIconColor' => '#ffffff',
321
'loadedScale' => '100',
322
'effect' => 'pufrobo',
323
'borderColor' => '#ffffff',
54
public function check_on_activate() {
55
56
// Check if is a new 2.0.0 install or an old install
57
+ $version = get_option( 'modula_version', array() );
58
+
59
+ // Check to see if we redirect or not to About page
60
+ $modula_update = Modula_Update::get_instance();
61
+ $check = false;
62
+ if(!empty($version) && $version['current_version'] !== MODULA_LITE_VERSION ){
63
+ $check = true;
64
+ }
65
+
66
if ( empty( $version ) ) {
67
if ( ! $this->check_upgrade_complete( 'modula_v2' ) && $this->check_old_db() ) {
68
$version['upgraded_from'] = '1.3.1';
78
79
update_option( 'modula_version', $version );
80
81
+ $modula_update->modula_on_activation($check);
82
}
83
84
/**
315
'lightbox' => 'lightbox2',
316
'shuffle' => 0,
317
'captionColor' => '#ffffff',
318
+ // Will comment these lines, maybe in the future we revert to them.
319
+ // For now the settings are disabled
320
+ //'wp_field_caption' => 'none',
321
+ //'wp_field_title' => 'none',
322
'hide_title' => 0,
323
'hide_description' => 0,
324
'captionFontSize' => '14',
326
'enableFacebook' => 1,
327
'enableGplus' => 1,
328
'enablePinterest' => 1,
329
+ 'enableTwitter' => 1,
330
+ 'enableWhatsapp' => 1,
331
'filterClick' => 0,
332
+ 'socialIconColor' => '#ffffff',
333
+ 'socialIconSize' => 16,
334
+ 'socialIconPadding' => 20,
335
'loadedScale' => '100',
336
'effect' => 'pufrobo',
337
'borderColor' => '#ffffff',
includes/class-modula.php CHANGED
@@ -35,6 +35,7 @@ class Modula {
35
require_once MODULA_PATH . 'includes/helper/class-modula-helper.php';
36
require_once MODULA_PATH . 'includes/admin/class-modula-image.php';
37
require_once MODULA_PATH . 'includes/public/modula-helper-functions.php';
38
39
require_once MODULA_PATH . 'includes/admin/class-modula-cpt.php';
40
require_once MODULA_PATH . 'includes/admin/class-modula-upsells.php';
@@ -56,6 +57,8 @@ class Modula {
56
require_once MODULA_PATH . 'includes/admin/class-modula-importer-exporter.php';
57
require_once MODULA_PATH . 'includes/class-modula-upgrades.php';
58
require_once MODULA_PATH . 'includes/libraries/class-modula-review.php';
59
60
}
61
@@ -83,6 +86,10 @@ class Modula {
83
add_filter('mce_external_plugins', array($this, 'register_editor_plugin'));
84
add_action('wp_ajax_modula_shortcode_editor', array($this, 'modula_shortcode_editor'));
85
86
new Modula_CPT();
87
88
}
@@ -119,6 +126,7 @@ class Modula {
119
return;
120
}
121
122
// Set the post_id
123
$post_id = isset( $post->ID ) ? $post->ID : (int) $id;
124
@@ -251,5 +259,46 @@ class Modula {
251
wp_die();
252
253
}
254
255
}
35
require_once MODULA_PATH . 'includes/helper/class-modula-helper.php';
36
require_once MODULA_PATH . 'includes/admin/class-modula-image.php';
37
require_once MODULA_PATH . 'includes/public/modula-helper-functions.php';
38
+ require_once MODULA_PATH . 'includes/troubleshoot/class-modula-troubleshooting.php';
39
40
require_once MODULA_PATH . 'includes/admin/class-modula-cpt.php';
41
require_once MODULA_PATH . 'includes/admin/class-modula-upsells.php';
57
require_once MODULA_PATH . 'includes/admin/class-modula-importer-exporter.php';
58
require_once MODULA_PATH . 'includes/class-modula-upgrades.php';
59
require_once MODULA_PATH . 'includes/libraries/class-modula-review.php';
60
+ require_once MODULA_PATH . 'includes/uninstall/class-modula-uninstall.php';
61
+ require_once MODULA_PATH . 'includes/update/class-modula-update.php';
62
63
}
64
86
add_filter('mce_external_plugins', array($this, 'register_editor_plugin'));
87
add_action('wp_ajax_modula_shortcode_editor', array($this, 'modula_shortcode_editor'));
88
89
+ // Allow other mime types to be uploaded
90
+ add_filter('upload_mimes', array($this,'modula_upload_mime_types'));
91
+ add_filter('file_is_displayable_image', array($this,'modula_webp_display'), 10, 2);
92
+
93
new Modula_CPT();
94
95
}
126
return;
127
}
128
129
+
130
// Set the post_id
131
$post_id = isset( $post->ID ) ? $post->ID : (int) $id;
132
259
wp_die();
260
261
}
262
+
263
+ /**
264
+ * @param $mimes
265
+ *
266
+ * @return mixed
267
+ *
268
+ * @since 2.2.4
269
+ * Allow WebP image type to be uploaded
270
+ */
271
+ public function modula_upload_mime_types($mimes){
272
+
273
+ $mimes['webp'] = 'image/webp';
274
+
275
+ return $mimes;
276
+ }
277
+
278
+ /**
279
+ * @param $result
280
+ * @param $path
281
+ *
282
+ * @return bool
283
+ *
284
+ * @since 2.2.4
285
+ * Enable thumbnail/preview for WebP image types.
286
+ */
287
+ function modula_webp_display($result, $path) {
288
+ if ($result === false) {
289
+ $displayable_image_types = array( IMAGETYPE_WEBP );
290
+ $info = @getimagesize( $path );
291
+
292
+ if (empty($info)) {
293
+ $result = false;
294
+ } elseif (!in_array($info[2], $displayable_image_types)) {
295
+ $result = false;
296
+ } else {
297
+ $result = true;
298
+ }
299
+ }
300
+
301
+ return $result;
302
+ }
303
304
}
includes/helper/class-modula-helper.php CHANGED
@@ -46,6 +46,9 @@ class Modula_Helper {
46
case 'twitter':
47
return