Version Description
Download this release
Release Info
Developer | machothemes |
Plugin | Gallery – Photo Gallery – Image Gallery |
Version | 2.0.9 |
Comparing to | |
See all releases |
Code changes from version 2.0.8 to 2.0.9
- Modula.php +4 -2
- README.txt +1 -1
- assets/css/addons.css +18 -2
- assets/css/addons.min.css +1 -1
- assets/css/modula.css +19 -19
- assets/css/modula.min.css +1 -1
- assets/js/jquery-modula.js +2 -0
- assets/js/jquery-modula.min.js +1 -1
- assets/js/modula-addon.js +3 -2
- changelog.txt +7 -1
- includes/admin/class-modula-addons.php +25 -19
- includes/admin/class-modula-admin.php +18 -53
- includes/admin/class-modula-cpt.php +1 -1
- includes/class-modula.php +11 -5
- includes/public/class-modula-shortcode.php +7 -7
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.0.
|
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,9 +43,11 @@
|
|
43 |
*
|
44 |
* @since 2.0.2
|
45 |
*/
|
46 |
-
define( 'MODULA_LITE_VERSION', '2.0.
|
47 |
define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
|
48 |
define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
|
|
|
|
|
49 |
|
50 |
/**
|
51 |
* 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.0.9
|
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.0.9' );
|
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.
|
README.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: best gallery plugin, image gallery, photo gallery, responsive gallery, wor
|
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 2.0.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
4 |
Requires at least: 4.6
|
5 |
Tested up to: 5.2
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 2.0.9
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
assets/css/addons.css
CHANGED
@@ -4,13 +4,29 @@
|
|
4 |
flex-wrap: wrap;
|
5 |
}
|
6 |
.modula-addon {
|
7 |
-
|
8 |
-
margin:
|
9 |
background-color: #fff;
|
10 |
border: 1px solid #ddd;
|
11 |
box-sizing: border-box;
|
12 |
}
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
.modula-addon .modula-addon-box {
|
15 |
display: flex;
|
16 |
padding: 20px 20px 10px;
|
4 |
flex-wrap: wrap;
|
5 |
}
|
6 |
.modula-addon {
|
7 |
+
width: 100%;
|
8 |
+
margin-bottom: 1rem;
|
9 |
background-color: #fff;
|
10 |
border: 1px solid #ddd;
|
11 |
box-sizing: border-box;
|
12 |
}
|
13 |
|
14 |
+
@media screen and (min-width: 1100px) {
|
15 |
+
.modula-addons-container {
|
16 |
+
margin-right: -20px;
|
17 |
+
}
|
18 |
+
.modula-addon {
|
19 |
+
width: calc( 50% - 20px );
|
20 |
+
margin-right: 20px;
|
21 |
+
}
|
22 |
+
}
|
23 |
+
|
24 |
+
@media screen and (min-width: 1400px) {
|
25 |
+
.modula-addon {
|
26 |
+
width: calc( 33% - 20px );
|
27 |
+
}
|
28 |
+
}
|
29 |
+
|
30 |
.modula-addon .modula-addon-box {
|
31 |
display: flex;
|
32 |
padding: 20px 20px 10px;
|
assets/css/addons.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.modula-addons-container{display:flex;justify-content:space-between;flex-wrap:wrap}.modula-addon{width:
|
1 |
+
.modula-addons-container{display:flex;justify-content:space-between;flex-wrap:wrap}.modula-addon{width:100%;margin-bottom:1rem;background-color:#fff;border:1px solid #ddd;box-sizing:border-box}@media screen and (min-width:1100px){.modula-addons-container{margin-right:-20px}.modula-addon{width:calc(50% - 20px);margin-right:20px}}@media screen and (min-width:1400px){.modula-addon{width:calc(33% - 20px)}}.modula-addon .modula-addon-box{display:flex;padding:20px 20px 10px;text-align:left}.modula-addon .modula-addon-box .modula-addon-content{padding-left:20px}.modula-addon .modula-addon-box img{display:block;max-width:128px;max-height:128px}.modula-addon .modula-addon-box h3{margin-top:0;text-align:left}.modula-addon .modula-addon-actions{padding:12px 20px;background-color:#fafafa;border-top:1px solid #ddd;overflow:hidden;text-align:center}.modula-partners{display:flex;flex-wrap:wrap}.modula-partners .modula-partner-box{background:#fff;border:1px solid #e5e5e5;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:15px 15px 0;margin:15px 3% 15px 0;position:relative;text-align:center;width:33%}.modula-partner-box img{width:125px;height:125px;margin:0 auto 15px;display:block;border:none}.modula-partner-box__name{margin-bottom:10px;padding:0 26px;font-weight:600}.modula-partner-box__description{font-size:.875em;margin-bottom:15px;font-style:italic}.modula-partner-box__action-bar{-webkit-box-shadow:inset 0 1px 0 rgba(0,0,0,.1);box-shadow:inset 0 1px 0 rgba(0,0,0,.1);white-space:nowrap;text-overflow:ellipsis;text-align:left;margin-left:-15px;margin-right:-15px}.modula-partner-box__action-button{display:block;padding:9px 10px 10px;background:#f6f6f6;border-top:1px solid rgba(0,0,0,.1);text-align:center}.about-wrap{margin:0}.about-wrap h2{margin-top:25px}
|
assets/css/modula.css
CHANGED
@@ -295,7 +295,7 @@ Modula Filters
|
|
295 |
height: 16px;
|
296 |
}
|
297 |
|
298 |
-
.modula .items .item
|
299 |
margin:0;
|
300 |
}
|
301 |
.modula .items .item p {
|
@@ -355,7 +355,7 @@ Modula Filters
|
|
355 |
text-align: right;
|
356 |
}
|
357 |
|
358 |
-
.modula .item.effect-pufrobo
|
359 |
.modula .item.effect-pufrobo p {
|
360 |
position: absolute;
|
361 |
right: 30px;
|
@@ -375,7 +375,7 @@ Modula Filters
|
|
375 |
letter-spacing: 1px;
|
376 |
}
|
377 |
|
378 |
-
.modula .item.effect-pufrobo
|
379 |
/*top: 30px;*/
|
380 |
top: 10%;
|
381 |
-webkit-transition: -webkit-transform 0.35s;
|
@@ -384,12 +384,12 @@ Modula Filters
|
|
384 |
transform: translate3d(0,20px,0);
|
385 |
}
|
386 |
|
387 |
-
.modula .item.effect-pufrobo:hover
|
388 |
-webkit-transform: translate3d(0,0,0);
|
389 |
transform: translate3d(0,0,0);
|
390 |
}
|
391 |
|
392 |
-
.modula .item.effect-pufrobo
|
393 |
position: absolute;
|
394 |
top: 80%;
|
395 |
left: 0;
|
@@ -401,14 +401,14 @@ Modula Filters
|
|
401 |
transform: translate3d(0,40px,0);
|
402 |
}
|
403 |
|
404 |
-
.modula .item.effect-pufrobo
|
405 |
.modula .item.effect-pufrobo p {
|
406 |
opacity: 0;
|
407 |
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
408 |
transition: opacity 0.35s, transform 0.35s;
|
409 |
}
|
410 |
|
411 |
-
.modula .item.effect-pufrobo:hover
|
412 |
.modula .item.effect-pufrobo:hover p {
|
413 |
margin-top: 10px;
|
414 |
margin-bottom: 5px;
|
@@ -417,22 +417,22 @@ Modula Filters
|
|
417 |
transform: translate3d(0,0,0);
|
418 |
}
|
419 |
|
420 |
-
.modula .items .item.effect-pufrobo .figc.no-title.no-description
|
421 |
display: none;
|
422 |
}
|
423 |
|
424 |
/* TwnetyNintheen fix */
|
425 |
-
.modula .items .item.effect-fluid-up .figc
|
426 |
-
.modula .items .item.effect-hide .figc
|
427 |
-
.modula .items .item.effect-quiet .figc
|
428 |
-
.modula .items .item.effect-reflex .figc
|
429 |
-
.modula .items .item.effect-curtain .figc
|
430 |
-
.modula .items .item.effect-lens .figc
|
431 |
-
.modula .items .item.effect-appear .figc
|
432 |
-
.modula .items .item.effect-crafty .figc
|
433 |
-
.modula .items .item.effect-seemo .figc
|
434 |
-
.modula .items .item.effect-comodo .figc
|
435 |
-
.modula .items .item.effect-pufrobo .figc
|
436 |
display: none;
|
437 |
}
|
438 |
|
295 |
height: 16px;
|
296 |
}
|
297 |
|
298 |
+
.modula .items .item .jtg-title {
|
299 |
margin:0;
|
300 |
}
|
301 |
.modula .items .item p {
|
355 |
text-align: right;
|
356 |
}
|
357 |
|
358 |
+
.modula .item.effect-pufrobo .jtg-title,
|
359 |
.modula .item.effect-pufrobo p {
|
360 |
position: absolute;
|
361 |
right: 30px;
|
375 |
letter-spacing: 1px;
|
376 |
}
|
377 |
|
378 |
+
.modula .item.effect-pufrobo .jtg-title {
|
379 |
/*top: 30px;*/
|
380 |
top: 10%;
|
381 |
-webkit-transition: -webkit-transform 0.35s;
|
384 |
transform: translate3d(0,20px,0);
|
385 |
}
|
386 |
|
387 |
+
.modula .item.effect-pufrobo:hover .jtg-title {
|
388 |
-webkit-transform: translate3d(0,0,0);
|
389 |
transform: translate3d(0,0,0);
|
390 |
}
|
391 |
|
392 |
+
.modula .item.effect-pufrobo .jtg-title::after {
|
393 |
position: absolute;
|
394 |
top: 80%;
|
395 |
left: 0;
|
401 |
transform: translate3d(0,40px,0);
|
402 |
}
|
403 |
|
404 |
+
.modula .item.effect-pufrobo .jtg-title::after,
|
405 |
.modula .item.effect-pufrobo p {
|
406 |
opacity: 0;
|
407 |
-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
|
408 |
transition: opacity 0.35s, transform 0.35s;
|
409 |
}
|
410 |
|
411 |
+
.modula .item.effect-pufrobo:hover .jtg-title::after,
|
412 |
.modula .item.effect-pufrobo:hover p {
|
413 |
margin-top: 10px;
|
414 |
margin-bottom: 5px;
|
417 |
transform: translate3d(0,0,0);
|
418 |
}
|
419 |
|
420 |
+
.modula .items .item.effect-pufrobo .figc.no-title.no-description .jtg-title:after {
|
421 |
display: none;
|
422 |
}
|
423 |
|
424 |
/* TwnetyNintheen fix */
|
425 |
+
.modula .items .item.effect-fluid-up .figc .jtg-title:before,
|
426 |
+
.modula .items .item.effect-hide .figc .jtg-title:before,
|
427 |
+
.modula .items .item.effect-quiet .figc .jtg-title:before,
|
428 |
+
.modula .items .item.effect-reflex .figc .jtg-title:before,
|
429 |
+
.modula .items .item.effect-curtain .figc .jtg-title:before,
|
430 |
+
.modula .items .item.effect-lens .figc .jtg-title:before,
|
431 |
+
.modula .items .item.effect-appear .figc .jtg-title:before,
|
432 |
+
.modula .items .item.effect-crafty .figc .jtg-title:before,
|
433 |
+
.modula .items .item.effect-seemo .figc .jtg-title:before,
|
434 |
+
.modula .items .item.effect-comodo .figc .jtg-title:before,
|
435 |
+
.modula .items .item.effect-pufrobo .figc .jtg-title:before {
|
436 |
display: none;
|
437 |
}
|
438 |
|
assets/css/modula.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.modula .items .item{position:absolute;overflow:hidden;transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0;box-sizing:border-box}.modula .items .item>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.modula .items .item .jtg-social{z-index:10}.modula .items .item.tg-loaded{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}.modula .items .item.tg-loaded img.pic{display:block;opacity:1}.modula .items .item img.pic{font-size:12px;position:absolute;display:none;opacity:0;max-width:999em!important;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}.modula .items .item img.pic.lazyload,.modula .items .item img.pic.lazyloaded{display:block}.modula .items .item .description{font-size:14px}.modula .items .item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}.modula .items .item .figc{color:#fff;font-size:11px;text-align:center;position:absolute;left:0;width:100%;padding:0}.modula .items .hidden .figc{display:none}.modula .items .always-visible .figc,.modula .items .hidden:hover .figc,.modula .items .visible .figc{display:block}.modula .items .item.effect-appear .figc
|
1 |
+
.modula .items .item{position:absolute;overflow:hidden;transition:transform .3s ease-out,opacity .2s linear,top .3s,left .6s;opacity:0;box-sizing:border-box}.modula .items .item>a{display:block;position:absolute;top:0;left:0;width:100%;height:100%;z-index:10}.modula .items .item .jtg-social{z-index:10}.modula .items .item.tg-loaded{transform:scale(1) translate(0,0) rotate(0)!important;opacity:1}.modula .items .item.tg-loaded img.pic{display:block;opacity:1}.modula .items .item img.pic{font-size:12px;position:absolute;display:none;opacity:0;max-width:999em!important;transition:width .3s,height .3s,transform .3s linear,opacity .2s linear}.modula .items .item img.pic.lazyload,.modula .items .item img.pic.lazyloaded{display:block}.modula .items .item .description{font-size:14px}.modula .items .item .caption .icon{font-size:14px;position:absolute;left:50%;top:50%;margin:-12px 0 0 -8px}.modula .items .item .figc{color:#fff;font-size:11px;text-align:center;position:absolute;left:0;width:100%;padding:0}.modula .items .hidden .figc{display:none}.modula .items .always-visible .figc,.modula .items .hidden:hover .figc,.modula .items .visible .figc{display:block}.modula .items .item.effect-appear .figc .jtg-title:before,.modula .items .item.effect-comodo .figc .jtg-title:before,.modula .items .item.effect-crafty .figc .jtg-title:before,.modula .items .item.effect-curtain .figc .jtg-title:before,.modula .items .item.effect-fluid-up .figc .jtg-title:before,.modula .items .item.effect-hide .figc .jtg-title:before,.modula .items .item.effect-lens .figc .jtg-title:before,.modula .items .item.effect-pufrobo .figc .jtg-title:before,.modula .items .item.effect-pufrobo .figc.no-title.no-description .jtg-title:after,.modula .items .item.effect-quiet .figc .jtg-title:before,.modula .items .item.effect-reflex .figc .jtg-title:before,.modula .items .item.effect-seemo .figc .jtg-title:before,.modula .items .visible:hover .figc{display:none}.modula .items .caption span.text{display:block;padding:10px}.modula .items .caption span.title{font-size:14px;font-weight:700}.modula .filters{margin:20px 0}.modula .filters.vertical-filters{margin-top:0}.modula .filters a{text-decoration:none;display:inline-block;color:#333;outline:0;transition:350ms ease-in}.modula .filters.menu--dfefault a{border-bottom:2px solid transparent}.modula .filters.colored a{border:0;color:#fff}.modula .filters:not(.styled-menu) a.selected,.modula .filters:not(.styled-menu) a:hover{border-bottom:1px solid}.modula.vertical-filters .items{width:80%!important;float:left}.modula.vertical-filters .filters{width:20%;float:left}.modula .filters.vertical-filters.both-vertical+.items{width:60%!important}.modula .filters.vertical-filters a{display:block;padding:0 15px}.modula .filters.vertical-filters.colored a{border-radius:5px;text-align:center;background:#fff;border:1px solid #3498db;color:#3498db}.modula .filters.vertical-filters.colored a.selected,.modula .filters.vertical-filters.colored a:hover{background:#fff;color:#8e44ad;border-color:#8e44ad}.modula .filters.horizontal-filters.colored a{display:inline-block;padding:0 30px;margin-right:2px;background:#3498db;position:relative;border:0}.modula .filters.horizontal-filters.colored a.selected,.modula .filters.horizontal-filters.colored a:hover{background:#8e44ad}.modula .filters.horizontal-filters.colored a:before{position:absolute;content:'';left:0;top:0;width:0;height:0;border:none;border-left:solid 17px #fff;border-bottom:solid 41px transparent;z-index:1;transition:.4s}.modula .filters.horizontal-filters.colored a:after{position:absolute;content:'';right:0;top:0;width:0;height:0;border:none;border-left:solid 17px transparent;border-bottom:solid 41px #fff;z-index:1;transition:.4s}.filter-by-wrapper span:after,.filter-by-wrapper.opened span:after{content:"";width:0;height:0;border-style:solid;display:inline-block}.filter-by-wrapper{text-align:center;margin-bottom:25px;text-transform:uppercase}.filter-by-wrapper span{cursor:pointer}.filter-by-wrapper span:after{margin-left:15px;border-width:15px 10px 0;border-color:#0470e3 transparent transparent}.filter-by-wrapper.opened span:after{border-width:0 10px 15px;border-color:transparent transparent #d500ff}.modula .filters.vertical-filters a{margin-bottom:0}.menu__list li.menu__item{margin:15px}@media all and (min-width:1025px){.filter-by-wrapper{display:none!important}.modula-gallery .filters{display:block!important}}@media all and (max-width:1024px){.modula .filters.vertical-filters.both-vertical+.items,.modula.vertical-filters .filters,.modula.vertical-filters .items{width:100%!important;float:none}.menu__list{padding:0}.menu__list li.menu__item{margin:0}}.modula .jtg-social a{box-shadow:none}.lightbox .lb-image{max-width:999em}.modula .jtg-social svg{width:20px;height:16px}.modula .items .item .jtg-title{margin:0}.modula .items .item p{margin:0;padding:0}.modula .figc{color:#000;text-align:center;position:absolute;left:0;width:100%;padding:2em}.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 .item:hover .jtg-social a{opacity:1}.modula .items .jtg-social{right:30px;position:absolute;bottom:20px;text-align:right;transition:all .3s;opacity:1}.modula .items .jtg-social a:last-of-type{margin-right:0}.modula .item.effect-pufrobo p.description{margin-bottom:2em}.modula .item.effect-pufrobo .figc{text-align:right}.modula .item.effect-pufrobo .jtg-title,.modula .item.effect-pufrobo p{position:absolute;right:30px;left:30px;padding:10px 0}.modula .item:hover img{opacity:.8}.modula .item{background-color:#000}.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 .item.effect-pufrobo .jtg-title{top:10%;-webkit-transition:-webkit-transform .35s;transition:transform .35s;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}.modula .item.effect-pufrobo:hover .jtg-title{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.modula .item.effect-pufrobo .jtg-title::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 .item.effect-pufrobo .jtg-title::after,.modula .item.effect-pufrobo p{opacity:0;-webkit-transition:opacity .35s,-webkit-transform .35s;transition:opacity .35s,transform .35s}.modula .item.effect-pufrobo:hover .jtg-title::after,.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)}
|
assets/js/jquery-modula.js
CHANGED
@@ -580,6 +580,8 @@ jQuery(document).on( 'vc-full-width-row-single vc-full-width-row', function( eve
|
|
580 |
var tSize = $tile.data('size');
|
581 |
var iSize = $image.data('size');
|
582 |
|
|
|
|
|
583 |
|
584 |
var tRatio = tSize.width / tSize.height;
|
585 |
var iRatio = iSize.width / iSize.height;
|
580 |
var tSize = $tile.data('size');
|
581 |
var iSize = $image.data('size');
|
582 |
|
583 |
+
if ( typeof tSize == 'undefined' ) { return; }
|
584 |
+
if ( typeof iSize == 'undefined' ) { return; }
|
585 |
|
586 |
var tRatio = tSize.width / tSize.height;
|
587 |
var iRatio = iSize.width / iSize.height;
|
assets/js/jquery-modula.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.ResizeSensor=e()}("undefined"!=typeof window?window:this,function(){if("undefined"==typeof window)return null;var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)};function n(t,e){var i=Object.prototype.toString.call(t),n="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,o=0,s=t.length;if(n)for(;o<s;o++)e(t[o]);else e(t)}function y(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}var o=function(e,i){function w(){var i,n,o=[];this.add=function(t){o.push(t)},this.call=function(){for(i=0,n=o.length;i<n;i++)o[i].call()},this.remove=function(t){var e=[];for(i=0,n=o.length;i<n;i++)o[i]!==t&&e.push(o[i]);o=e},this.length=function(){return o.length}}n(e,function(t){!function(n,t){if(n)if(n.resizedAttached)n.resizedAttached.add(t);else{n.resizedAttached=new w,n.resizedAttached.add(t),n.resizeSensor=document.createElement("div"),n.resizeSensor.dir="ltr",n.resizeSensor.className="resize-sensor";var e="position: absolute; left: -10px; top: -10px; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",i="position: absolute; left: 0; top: 0; transition: 0s;";n.resizeSensor.style.cssText=e,n.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+e+'"><div style="'+i+'"></div></div><div class="resize-sensor-shrink" style="'+e+'"><div style="'+i+' width: 200%; height: 200%"></div></div>',n.appendChild(n.resizeSensor);var o=window.getComputedStyle(n).getPropertyPriority("position");"absolute"!==o&&"relative"!==o&&"fixed"!==o&&(n.style.position="relative");var s,h,r=n.resizeSensor.childNodes[0],a=r.childNodes[0],d=n.resizeSensor.childNodes[1],l=y(n),c=l.width,u=l.height,p=function(){var t=0===n.offsetWidth&&0===n.offsetHeight;if(t){var e=n.style.display;n.style.display="block"}a.style.width="100000px",a.style.height="100000px",r.scrollLeft=1e5,r.scrollTop=1e5,d.scrollLeft=1e5,d.scrollTop=1e5,t&&(n.style.display=e)};n.resizeSensor.resetSensor=p;var f=function(){h=0,s&&(u=c=void 0,n.resizedAttached&&n.resizedAttached.call())},g=function(){var t=y(n),e=t.width,i=t.height;(s=e!=c||i!=u)&&!h&&(h=v(f)),p()},m=function(t,e,i){t.attachEvent?t.attachEvent("on"+e,i):t.addEventListener(e,i)};m(r,"scroll",g),m(d,"scroll",g),v(p)}}(t,i)}),this.detach=function(t){o.detach(e,t)},this.reset=function(){e.resizeSensor.resetSensor()}};return o.reset=function(t,e){n(t,function(t){t.resizeSensor.resetSensor()})},o.detach=function(t,e){n(t,function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))})},o}),jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,e){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),function(l,h,c,t){var o="modulaGallery",i={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 s(t,e){this.element=t,this.$element=l(t),this.$itemsCnt=this.$element.find(".items"),this.$items=this.$itemsCnt.find(".item"),this.options=l.extend({},i,e),this._defaults=i,this._name=o,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isPackeryActive=!1,this.init()}s.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)},s.prototype.createCustomGallery=function(){var r,t=this.$element.width(),a=this,d=this.options.columns,e=c.documentElement.clientWidth;"1"==this.options.enableResponsive&&(e<=568?d=this.options.mobileColumns:e<=768&&(d=this.options.tabletColumns)),r=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d),this.$items.not(".jtg-hidden").each(function(t,e){var i,n,o,s,h={};i=l(e).data("width"),n=l(e).data("height"),12<i&&(i=12),"1"==a.options.enableResponsive&&(o=i,s=n,1==d?n=(i=1)*s/o:((i=Math.round(d*o/12))<1&&(i=1),(n=Math.round(i*s/o))<1&&(n=1))),h.width=r*i+a.options.gutter*(i-1),h.height=r*n+a.options.gutter*(n-1),l(e).data("size",h).addClass("tiled").addClass(h.width>h.height?"tile-h":"tile-v").data("position"),l(e).css(l(e).data("size")),l(e).find(".figc").css({width:l(e).data("size").width,height:l(e).data("size").height})}),this.isPackeryActive&&this.$itemsCnt.packery("destroy"),this.$itemsCnt.packery({itemSelector:".item",gutter:parseInt(a.options.gutter),columnWidth:r,resize:!1}),this.isPackeryActive=!0},s.prototype.createGrid=function(){var n=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(n.getSlot());this.tiles.sort(function(t,e){return t.position-e.position}),this.$items.not(".jtg-hidden").each(function(t,e){var i=n.tiles[t];l(e).data("size",i).addClass("tiled").addClass(i.width>i.height?"tile-h":"tile-v").data("position")}),this.$items.each(function(t,e){l(e).css(l(e).data("size")),l(e).find(".figc").css({width:l(e).data("size").width,height:l(e).data("size").height})}),this.completed=!0},s.prototype.getSlot=function(){if(0==this.tiles.length)return i={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,e=0;e<this.tiles.length;e++){(i=this.tiles[e]).area>this.tiles[t].area&&(t=e)}var i={},n=this.tiles[t];if(n.width>n.height){var o=n.width/2*this.options.randomFactor;n.prevWidth=n.width,n.width=Math.floor(n.width/2+o*(Math.random()-.5)),i={top:n.top,left:n.left+n.width+this.options.margin,width:n.prevWidth-n.width-this.options.margin,height:n.height}}else{o=n.height/2*this.options.randomFactor;n.prevHeight=n.height,n.height=Math.floor(n.height/2+o*(Math.random()-.5)),i={left:n.left,top:n.top+n.height+this.options.margin,width:n.width,height:n.prevHeight-n.height-this.options.margin}}return i.area=i.width*i.height,i.position=1e3*i.top+i.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,i},s.prototype.reset=function(){var i=this;i.tiles=[],"custom-grid"===i.options.type?(i.createCustomGallery(),i.$itemsCnt.packery()):i.createGrid(),i.$itemsCnt.find(".pic").each(function(t,e){i.placeImage(t)}),i.lastWidth=i.$itemsCnt.width()},s.prototype.onResize=function(e){e.lastWidth!=e.$itemsCnt.width()&&(clearTimeout(e.resizeTO),e.resizeTO=setTimeout(function(){if(e.options.keepArea){var t=e.$itemsCnt.data("area");e.$itemsCnt.height(t/e.$itemsCnt.width())}e.reset()},100))},s.prototype.placeImage=function(t){var e=this.$items.eq(t),i=e.find(".pic"),n=e.data("size"),o=i.data("size"),s=n.width/n.height,h=o.width/o.height,r=i.data("valign")?i.data("valign"):"middle",a=i.data("halign")?i.data("halign"):"center",d={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(h<s)switch(d.width=n.width,d.left=0,r){case"top":d.top=0;break;case"middle":d.top=0-(n.width*(1/h)-n.height)/2;break;case"bottom":d.bottom=0}else switch(d.height=n.height,d.top=0,a){case"left":d.left=0;break;case"center":d.left=0-(n.height*h-n.width)/2;break;case"right":d.right=0}i.css(d)},s.prototype.loadImage=function(t){var e=this,i=e.$items.eq(t).find(".pic"),n=new Image;n.onerror=function(){console.log("error loading image ["+t+"] : "+this.src),t+1<e.$items.length&&e.loadImage(t+1)},n.onload=function(){i.data("size",{width:this.width,height:this.height}),e.placeImage(t),e.$items.eq(t).addClass("tg-loaded"),t+1<e.$items.length&&e.loadImage(t+1)};var o=i.data("src");n.src=o,i.attr("src",o)},s.prototype.init=function(){var o=this;l(c).trigger("modula_api_before_init",[o]),this.$itemsCnt.css({position:"relative",zIndex:1}),this.$items.addClass("tile"),this.$items.find(".pic").removeAttr("src"),"custom-grid"===this.options.type?this.createCustomGallery():this.createGrid(),"1"!=o.options.lazyLoad&&this.loadImage(0),l(h).resize(function(){o.onResize(o)}),l(h).on("modula-update",function(){o.onResize(o)}),l(c).on("lazyloaded",function(t){var e,i,n=l(t.target);"modula"==n.data("source")&&(n.data("size",{width:n.width(),height:n.height()}),(e=n.parents(".item")).addClass("tg-loaded"),i=o.$items.index(e),o.placeImage(i))}),new ResizeSensor(o.$element,function(){o.onResize(o)}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),l(c).trigger("modula_api_after_init",[o])},s.prototype.setupSocial=function(){this.options.enableTwitter&&e(this.$items,this),this.options.enableFacebook&&n(this.$items,this),this.options.enablePinterest&&r(this.$items,this),this.options.enableLinkedin&&a(this.$items,this)};var e=function(t,n){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".caption"),i=n.options.twitterText||c.title;return!n.options.twitterText&&1==e.length&&0<e.text().length&&(i=l.trim(e.text())),h.open("https://twitter.com/intent/tweet?url="+encodeURI(location.href.split("#")[0])+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},n=function(t,o){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".pic"),i=l(this).parents(".tile:first").find(".caption");o.options.facebookText||c.title;!o.options.facebookText&&1==i.length&&0<i.text().length&&l.trim(i.text());e.attr("src");var n="//www.facebook.com/sharer.php?u="+location.href;return h.open(n,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,s){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".pic"),i=l(this).parents(".tile:first").find(".caption"),n=s.options.facebookText||c.title;!s.options.facebookText&&1==i.length&&0<i.text().length&&(n=l.trim(i.text()));var o="http://pinterest.com/pin/create/button/?url="+encodeURI(location.href)+"&description="+encodeURI(n);1==e.length&&(o+="&media="+function(t){var e=c.createElement("img");return e.src=t,t=e.src,e.src=null,t}(e.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})},a=function(t,e){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();var e="//linkedin.com/shareArticle?mini=true&url="+ +encodeURI(location.href);return h.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};l.fn[o]=function(e){var i,n=arguments;return void 0===e||"object"==typeof e?this.each(function(){l.data(this,"plugin_"+o)||l.data(this,"plugin_"+o,new s(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=l.data(this,"plugin_"+o);t instanceof s&&"function"==typeof t[e]&&(i=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===e&&l.data(this,"plugin_"+o,null)}),void 0!==i?i:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(i){var t=i(".modula-gallery");i.each(t,function(){var t=i(this).attr("id"),e=i(this).data("config");i("#"+t).modulaGallery(e)})});
|
1 |
+
function tg_getURLParameter(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.search)||[,""])[1].replace(/\+/g,"%20"))||null}!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():t.ResizeSensor=e()}("undefined"!=typeof window?window:this,function(){if("undefined"==typeof window)return null;var v=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return window.setTimeout(t,20)};function n(t,e){var i=Object.prototype.toString.call(t),n="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&t instanceof jQuery||"undefined"!=typeof Elements&&t instanceof Elements,o=0,s=t.length;if(n)for(;o<s;o++)e(t[o]);else e(t)}function y(t){if(!t.getBoundingClientRect)return{width:t.offsetWidth,height:t.offsetHeight};var e=t.getBoundingClientRect();return{width:Math.round(e.width),height:Math.round(e.height)}}var o=function(e,i){function w(){var i,n,o=[];this.add=function(t){o.push(t)},this.call=function(){for(i=0,n=o.length;i<n;i++)o[i].call()},this.remove=function(t){var e=[];for(i=0,n=o.length;i<n;i++)o[i]!==t&&e.push(o[i]);o=e},this.length=function(){return o.length}}n(e,function(t){!function(n,t){if(n)if(n.resizedAttached)n.resizedAttached.add(t);else{n.resizedAttached=new w,n.resizedAttached.add(t),n.resizeSensor=document.createElement("div"),n.resizeSensor.dir="ltr",n.resizeSensor.className="resize-sensor";var e="position: absolute; left: -10px; top: -10px; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",i="position: absolute; left: 0; top: 0; transition: 0s;";n.resizeSensor.style.cssText=e,n.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+e+'"><div style="'+i+'"></div></div><div class="resize-sensor-shrink" style="'+e+'"><div style="'+i+' width: 200%; height: 200%"></div></div>',n.appendChild(n.resizeSensor);var o=window.getComputedStyle(n).getPropertyPriority("position");"absolute"!==o&&"relative"!==o&&"fixed"!==o&&(n.style.position="relative");var s,h,r=n.resizeSensor.childNodes[0],a=r.childNodes[0],d=n.resizeSensor.childNodes[1],l=y(n),c=l.width,u=l.height,p=function(){var t=0===n.offsetWidth&&0===n.offsetHeight;if(t){var e=n.style.display;n.style.display="block"}a.style.width="100000px",a.style.height="100000px",r.scrollLeft=1e5,r.scrollTop=1e5,d.scrollLeft=1e5,d.scrollTop=1e5,t&&(n.style.display=e)};n.resizeSensor.resetSensor=p;var f=function(){h=0,s&&(u=c=void 0,n.resizedAttached&&n.resizedAttached.call())},g=function(){var t=y(n),e=t.width,i=t.height;(s=e!=c||i!=u)&&!h&&(h=v(f)),p()},m=function(t,e,i){t.attachEvent?t.attachEvent("on"+e,i):t.addEventListener(e,i)};m(r,"scroll",g),m(d,"scroll",g),v(p)}}(t,i)}),this.detach=function(t){o.detach(e,t)},this.reset=function(){e.resizeSensor.resetSensor()}};return o.reset=function(t,e){n(t,function(t){t.resizeSensor.resetSensor()})},o.detach=function(t,e){n(t,function(t){t&&(t.resizedAttached&&"function"==typeof e&&(t.resizedAttached.remove(e),t.resizedAttached.length())||t.resizeSensor&&(t.contains(t.resizeSensor)&&t.removeChild(t.resizeSensor),delete t.resizeSensor,delete t.resizedAttached))})},o}),jQuery(document).on("vc-full-width-row-single vc-full-width-row",function(t,e){0<jQuery("body").find(".modula").length&&jQuery(window).trigger("modula-update")}),function(l,h,c,t){var o="modulaGallery",i={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 s(t,e){this.element=t,this.$element=l(t),this.$itemsCnt=this.$element.find(".items"),this.$items=this.$itemsCnt.find(".item"),this.options=l.extend({},i,e),this._defaults=i,this._name=o,this.tiles=[],this.$tilesCnt=null,this.completed=!1,this.lastWidth=0,this.resizeTO=0,this.isPackeryActive=!1,this.init()}s.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)},s.prototype.createCustomGallery=function(){var r,t=this.$element.width(),a=this,d=this.options.columns,e=c.documentElement.clientWidth;"1"==this.options.enableResponsive&&(e<=568?d=this.options.mobileColumns:e<=768&&(d=this.options.tabletColumns)),r=0<this.options.gutter?(t-this.options.gutter*(d-1))/d:Math.floor(t/d),this.$items.not(".jtg-hidden").each(function(t,e){var i,n,o,s,h={};i=l(e).data("width"),n=l(e).data("height"),12<i&&(i=12),"1"==a.options.enableResponsive&&(o=i,s=n,1==d?n=(i=1)*s/o:((i=Math.round(d*o/12))<1&&(i=1),(n=Math.round(i*s/o))<1&&(n=1))),h.width=r*i+a.options.gutter*(i-1),h.height=r*n+a.options.gutter*(n-1),l(e).data("size",h).addClass("tiled").addClass(h.width>h.height?"tile-h":"tile-v").data("position"),l(e).css(l(e).data("size")),l(e).find(".figc").css({width:l(e).data("size").width,height:l(e).data("size").height})}),this.isPackeryActive&&this.$itemsCnt.packery("destroy"),this.$itemsCnt.packery({itemSelector:".item",gutter:parseInt(a.options.gutter),columnWidth:r,resize:!1}),this.isPackeryActive=!0},s.prototype.createGrid=function(){var n=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(n.getSlot());this.tiles.sort(function(t,e){return t.position-e.position}),this.$items.not(".jtg-hidden").each(function(t,e){var i=n.tiles[t];l(e).data("size",i).addClass("tiled").addClass(i.width>i.height?"tile-h":"tile-v").data("position")}),this.$items.each(function(t,e){l(e).css(l(e).data("size")),l(e).find(".figc").css({width:l(e).data("size").width,height:l(e).data("size").height})}),this.completed=!0},s.prototype.getSlot=function(){if(0==this.tiles.length)return i={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,e=0;e<this.tiles.length;e++){(i=this.tiles[e]).area>this.tiles[t].area&&(t=e)}var i={},n=this.tiles[t];if(n.width>n.height){var o=n.width/2*this.options.randomFactor;n.prevWidth=n.width,n.width=Math.floor(n.width/2+o*(Math.random()-.5)),i={top:n.top,left:n.left+n.width+this.options.margin,width:n.prevWidth-n.width-this.options.margin,height:n.height}}else{o=n.height/2*this.options.randomFactor;n.prevHeight=n.height,n.height=Math.floor(n.height/2+o*(Math.random()-.5)),i={left:n.left,top:n.top+n.height+this.options.margin,width:n.width,height:n.prevHeight-n.height-this.options.margin}}return i.area=i.width*i.height,i.position=1e3*i.top+i.left,n.position=1e3*n.top+n.left,this.tiles[t]=n,this.tiles[t].area=n.width*n.height,i},s.prototype.reset=function(){var i=this;i.tiles=[],"custom-grid"===i.options.type?(i.createCustomGallery(),i.$itemsCnt.packery()):i.createGrid(),i.$itemsCnt.find(".pic").each(function(t,e){i.placeImage(t)}),i.lastWidth=i.$itemsCnt.width()},s.prototype.onResize=function(e){e.lastWidth!=e.$itemsCnt.width()&&(clearTimeout(e.resizeTO),e.resizeTO=setTimeout(function(){if(e.options.keepArea){var t=e.$itemsCnt.data("area");e.$itemsCnt.height(t/e.$itemsCnt.width())}e.reset()},100))},s.prototype.placeImage=function(t){var e=this.$items.eq(t),i=e.find(".pic"),n=e.data("size"),o=i.data("size");if(void 0!==n&&void 0!==o){var s=n.width/n.height,h=o.width/o.height,r=i.data("valign")?i.data("valign"):"middle",a=i.data("halign")?i.data("halign"):"center",d={top:"auto",bottom:"auto",left:"auto",right:"auto",width:"auto",height:"auto",margin:"0",maxWidth:"999em"};if(h<s)switch(d.width=n.width,d.left=0,r){case"top":d.top=0;break;case"middle":d.top=0-(n.width*(1/h)-n.height)/2;break;case"bottom":d.bottom=0}else switch(d.height=n.height,d.top=0,a){case"left":d.left=0;break;case"center":d.left=0-(n.height*h-n.width)/2;break;case"right":d.right=0}i.css(d)}},s.prototype.loadImage=function(t){var e=this,i=e.$items.eq(t).find(".pic"),n=new Image;n.onerror=function(){console.log("error loading image ["+t+"] : "+this.src),t+1<e.$items.length&&e.loadImage(t+1)},n.onload=function(){i.data("size",{width:this.width,height:this.height}),e.placeImage(t),e.$items.eq(t).addClass("tg-loaded"),t+1<e.$items.length&&e.loadImage(t+1)};var o=i.data("src");n.src=o,i.attr("src",o)},s.prototype.init=function(){var o=this;l(c).trigger("modula_api_before_init",[o]),this.$itemsCnt.css({position:"relative",zIndex:1}),this.$items.addClass("tile"),this.$items.find(".pic").removeAttr("src"),"custom-grid"===this.options.type?this.createCustomGallery():this.createGrid(),"1"!=o.options.lazyLoad&&this.loadImage(0),l(h).resize(function(){o.onResize(o)}),l(h).on("modula-update",function(){o.onResize(o)}),l(c).on("lazyloaded",function(t){var e,i,n=l(t.target);"modula"==n.data("source")&&(n.data("size",{width:n.width(),height:n.height()}),(e=n.parents(".item")).addClass("tg-loaded"),i=o.$items.index(e),o.placeImage(i))}),new ResizeSensor(o.$element,function(){o.onResize(o)}),this.setupSocial(),this.options.onComplete&&this.options.onComplete(),l(c).trigger("modula_api_after_init",[o])},s.prototype.setupSocial=function(){this.options.enableTwitter&&e(this.$items,this),this.options.enableFacebook&&n(this.$items,this),this.options.enablePinterest&&r(this.$items,this),this.options.enableLinkedin&&a(this.$items,this)};var e=function(t,n){t.find(".modula-icon-twitter").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".caption"),i=n.options.twitterText||c.title;return!n.options.twitterText&&1==e.length&&0<e.text().length&&(i=l.trim(e.text())),h.open("https://twitter.com/intent/tweet?url="+encodeURI(location.href.split("#")[0])+"&text="+encodeURI(i),"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},n=function(t,o){t.find(".modula-icon-facebook").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".pic"),i=l(this).parents(".tile:first").find(".caption");o.options.facebookText||c.title;!o.options.facebookText&&1==i.length&&0<i.text().length&&l.trim(i.text());e.attr("src");var n="//www.facebook.com/sharer.php?u="+location.href;return h.open(n,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})},r=function(t,s){t.find(".modula-icon-pinterest").click(function(t){t.preventDefault();var e=l(this).parents(".tile:first").find(".pic"),i=l(this).parents(".tile:first").find(".caption"),n=s.options.facebookText||c.title;!s.options.facebookText&&1==i.length&&0<i.text().length&&(n=l.trim(i.text()));var o="http://pinterest.com/pin/create/button/?url="+encodeURI(location.href)+"&description="+encodeURI(n);1==e.length&&(o+="&media="+function(t){var e=c.createElement("img");return e.src=t,t=e.src,e.src=null,t}(e.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})},a=function(t,e){t.find(".modula-icon-linkedin").click(function(t){t.preventDefault();var e="//linkedin.com/shareArticle?mini=true&url="+ +encodeURI(location.href);return h.open(e,"ftgw","location=1,status=1,scrollbars=1,width=600,height=400").moveTo(screen.width/2-300,screen.height/2-200),!1})};l.fn[o]=function(e){var i,n=arguments;return void 0===e||"object"==typeof e?this.each(function(){l.data(this,"plugin_"+o)||l.data(this,"plugin_"+o,new s(this,e))}):"string"==typeof e&&"_"!==e[0]&&"init"!==e?(this.each(function(){var t=l.data(this,"plugin_"+o);t instanceof s&&"function"==typeof t[e]&&(i=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===e&&l.data(this,"plugin_"+o,null)}),void 0!==i?i:this):void 0}}(jQuery,window,document),jQuery(document).ready(function(i){var t=i(".modula-gallery");i.each(t,function(){var t=i(this).attr("id"),e=i(this).data("config");i("#"+t).modulaGallery(e)})});
|
assets/js/modula-addon.js
CHANGED
@@ -2,13 +2,14 @@
|
|
2 |
"use strict";
|
3 |
|
4 |
$( document ).ready(function(){
|
5 |
-
$('#modula-
|
6 |
evt.preventDefault();
|
|
|
7 |
|
8 |
$.ajax({
|
9 |
method: "POST",
|
10 |
url: ajaxurl,
|
11 |
-
data: { action: '
|
12 |
}).done(function( msg ) {
|
13 |
location.reload();
|
14 |
});
|
2 |
"use strict";
|
3 |
|
4 |
$( document ).ready(function(){
|
5 |
+
$('#modula-reload-extensions').click(function(evt){
|
6 |
evt.preventDefault();
|
7 |
+
$( this ).addClass( 'updating-message' );
|
8 |
|
9 |
$.ajax({
|
10 |
method: "POST",
|
11 |
url: ajaxurl,
|
12 |
+
data : { action: "modula_reload_extensions", nonce: $( this ).data('nonce') },
|
13 |
}).done(function( msg ) {
|
14 |
location.reload();
|
15 |
});
|
changelog.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 2.0.8 - 24.05.2019 =
|
2 |
* Added more options to the gutter's settings
|
3 |
* Fixed galleries import/export
|
@@ -10,7 +16,7 @@
|
|
10 |
* Minor css backend improvements
|
11 |
* Added the option to dismiss feedback form
|
12 |
|
13 |
-
For more information : https://github.com/MachoThemes/modula-lite/milestone/9
|
14 |
|
15 |
= 2.0.7 - 13.03.2019 =
|
16 |
* Improved save sistem
|
1 |
+
= 2.0.9 - 27.05.2019 =
|
2 |
+
* Fixed Extension menu color css
|
3 |
+
* Fixed PHP Notice
|
4 |
+
* Fixed undefined object javascript
|
5 |
+
* Removed random id
|
6 |
+
|
7 |
= 2.0.8 - 24.05.2019 =
|
8 |
* Added more options to the gutter's settings
|
9 |
* Fixed galleries import/export
|
16 |
* Minor css backend improvements
|
17 |
* Added the option to dismiss feedback form
|
18 |
|
19 |
+
For more information : https://github.com/MachoThemes/modula-lite/milestone/9?closed=1
|
20 |
|
21 |
= 2.0.7 - 13.03.2019 =
|
22 |
* Improved save sistem
|
includes/admin/class-modula-addons.php
CHANGED
@@ -2,31 +2,37 @@
|
|
2 |
|
3 |
class Modula_Addons {
|
4 |
|
5 |
-
private $addons;
|
6 |
-
private $upgrade_url = 'https://wp-modula.com/pricing/?utm_source=modula-lite&utm_medium=video-addon&utm_campaign=upsell';
|
7 |
|
8 |
function __construct() {
|
9 |
-
|
10 |
$this->addons = $this->check_for_addons();
|
11 |
-
|
12 |
}
|
13 |
|
14 |
private function check_for_addons() {
|
15 |
|
16 |
-
$
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
return apply_filters( 'modula_addons', $addons );
|
32 |
|
@@ -46,7 +52,7 @@ class Modula_Addons {
|
|
46 |
echo '</div>';
|
47 |
echo '</div>';
|
48 |
echo '<div class="modula-addon-actions">';
|
49 |
-
echo apply_filters( "modula_addon_button_action", '<a href="' . $
|
50 |
echo '</div>';
|
51 |
echo '</div>';
|
52 |
}
|
2 |
|
3 |
class Modula_Addons {
|
4 |
|
5 |
+
private $addons = array();
|
|
|
6 |
|
7 |
function __construct() {
|
|
|
8 |
$this->addons = $this->check_for_addons();
|
|
|
9 |
}
|
10 |
|
11 |
private function check_for_addons() {
|
12 |
|
13 |
+
$data = get_transient( 'modula_all_extensions' );
|
14 |
+
if ( false !== $data ) {
|
15 |
+
return $data;
|
16 |
+
}
|
17 |
+
|
18 |
+
$addons = array();
|
19 |
+
|
20 |
+
$url = MODULA_PRO_STORE_URL . '/wp-json/mt/v1/get-all-extensions';
|
21 |
+
|
22 |
+
// Get data from the remote URL.
|
23 |
+
$response = wp_remote_get( $url );
|
24 |
+
|
25 |
+
if ( ! is_wp_error( $response ) ) {
|
26 |
+
|
27 |
+
// Decode the data that we got.
|
28 |
+
$data = json_decode( wp_remote_retrieve_body( $response ), true );
|
29 |
+
|
30 |
+
if ( ! empty( $data ) && is_array( $data ) ) {
|
31 |
+
$addons = $data;
|
32 |
+
// Store the data for a week.
|
33 |
+
set_transient( 'modula_all_extensions', $data, 7 * DAY_IN_SECONDS );
|
34 |
+
}
|
35 |
+
}
|
36 |
|
37 |
return apply_filters( 'modula_addons', $addons );
|
38 |
|
52 |
echo '</div>';
|
53 |
echo '</div>';
|
54 |
echo '<div class="modula-addon-actions">';
|
55 |
+
echo apply_filters( "modula_addon_button_action", '<a href="' . esc_url( MODULA_PRO_STORE_UPGRADE_URL . '?utm_source=modula-lite&utm_campaign=upsell&utm_medium=' . esc_attr( $addon['slug'] ) ) . '" target="_blank" class="button primary-button">' . esc_html__( 'Upgrade to PRO', 'modula-best-grid-gallery' ) . '</a>', $addon );
|
56 |
echo '</div>';
|
57 |
echo '</div>';
|
58 |
}
|
includes/admin/class-modula-admin.php
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
-
*
|
5 |
*/
|
6 |
class Modula_Admin {
|
7 |
|
8 |
private $tabs;
|
9 |
private $version = '2.0.0';
|
10 |
private $current_tab = 'general';
|
11 |
-
|
12 |
function __construct() {
|
13 |
|
14 |
// Register our submenus
|
@@ -37,7 +37,7 @@ class Modula_Admin {
|
|
37 |
if ( ! empty( $this->tabs ) ) {
|
38 |
add_submenu_page( 'edit.php?post_type=modula-gallery', esc_html__( 'Settings', 'modula-best-grid-gallery' ), esc_html__( 'Settings', 'modula-best-grid-gallery' ), 'manage_options', 'modula', array( $this, 'show_submenu' ) );
|
39 |
}
|
40 |
-
|
41 |
add_submenu_page( 'edit.php?post_type=modula-gallery', esc_html__( 'Extensions', 'modula-best-grid-gallery' ), esc_html__( 'Extensions', 'modula-best-grid-gallery' ), 'manage_options', 'modula-addons', array( $this, 'show_addons' ) );
|
42 |
|
43 |
}
|
@@ -65,10 +65,6 @@ class Modula_Admin {
|
|
65 |
'name' => esc_html__( 'Extensions', 'modula-best-grid-gallery' ),
|
66 |
'url' => admin_url( 'edit.php?post_type=modula-gallery&page=modula-addons' ),
|
67 |
),
|
68 |
-
'partners' => array(
|
69 |
-
'name' => esc_html__( 'Partners', 'modula-best-grid-gallery' ),
|
70 |
-
'url' => admin_url( 'edit.php?post_type=modula-gallery&page=modula-addons&tab=partners' ),
|
71 |
-
),
|
72 |
);
|
73 |
$tabs = apply_filters( 'modula_exntesions_tabs', $tabs );
|
74 |
$active_tab = 'extensions';
|
@@ -76,7 +72,7 @@ class Modula_Admin {
|
|
76 |
$active_tab = $_GET['tab'];
|
77 |
}
|
78 |
?>
|
79 |
-
<div class="
|
80 |
<h2 class="nav-tab-wrapper">
|
81 |
<?php
|
82 |
foreach( $tabs as $tab_id => $tab ) {
|
@@ -92,49 +88,18 @@ class Modula_Admin {
|
|
92 |
|
93 |
if ( 'extensions' == $active_tab ) {
|
94 |
$addons = new Modula_Addons();
|
95 |
-
|
96 |
-
|
97 |
-
echo '
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
'name' => esc_html__( 'ShortPixel Image Optimizer', 'modula-best-grid-gallery' ),
|
103 |
-
'description' => esc_html__( 'Increase your website’s SEO ranking, number of visitors and ultimately your sales by optimizing any image.', 'modula-best-grid-gallery' ),
|
104 |
-
'url' => 'https://shortpixel.com/otp/af/HUOYEBB31472',
|
105 |
-
'button' => esc_html__( 'Test your site for free', 'modula-best-grid-gallery' ),
|
106 |
-
'image' => 'https://ps.w.org/shortpixel-image-optimiser/assets/icon-128x128.png?rev=1038819',
|
107 |
-
),
|
108 |
-
'optimole' => array(
|
109 |
-
'name' => esc_html__( 'Optimole', 'modula-best-grid-gallery' ),
|
110 |
-
'description' => esc_html__( 'Image optimization & resizing. Image acceleration through CDN. On-the-fly image handling.', 'modula-best-grid-gallery' ),
|
111 |
-
'url' => 'https://optimole.com/',
|
112 |
-
'button' => esc_html__( 'Check it out for free', 'modula-best-grid-gallery' ),
|
113 |
-
'image' => 'https://ps.w.org/optimole-wp/assets/icon-128x128.png?rev=1975706',
|
114 |
-
),
|
115 |
-
);
|
116 |
-
|
117 |
-
echo '<div class="modula-partners">';
|
118 |
-
foreach ( $partners as $partner_id => $partner ) {
|
119 |
-
echo '<div id="' . $partner_id . '" class="col modula-partner-box">';
|
120 |
-
echo '<img src="' . esc_url( $partner['image'] ) . '">';
|
121 |
-
echo '<div class="modula-partner-box__name">' . esc_html( $partner['name'] ) . '</div>';
|
122 |
-
echo '<div class="modula-partner-box__description">' . esc_html( $partner['description'] ) . '</div>';
|
123 |
-
echo '<div class="modula-partner-box__action-bar">';
|
124 |
-
echo '<span class="modula-partner-box__action-button">';
|
125 |
-
echo '<a class="button" href="' . esc_url( $partner['url'] ) . '" target="_blank">' . esc_html( $partner['button'] ) . '</a>';
|
126 |
-
echo '</span>';
|
127 |
-
echo '</div>';
|
128 |
-
echo '</div>';
|
129 |
-
}
|
130 |
-
echo '</div>';
|
131 |
-
echo '</div>';
|
132 |
-
|
133 |
}else{
|
134 |
do_action( "modula_exntesion_{$active_tab}_tab" );
|
135 |
}
|
136 |
|
137 |
-
|
138 |
}
|
139 |
|
140 |
private function generate_url( $tab ) {
|
@@ -175,10 +140,10 @@ class Modula_Admin {
|
|
175 |
$new_image[ $attribute ] = absint( $image[ $attribute ] );
|
176 |
break;
|
177 |
case 'title':
|
178 |
-
case 'description' :
|
179 |
$new_image[ $attribute ] = wp_filter_post_kses( $image[ $attribute ] );
|
180 |
break;
|
181 |
-
case 'link' :
|
182 |
$new_image[ $attribute ] = esc_url_raw( $image[ $attribute ] );
|
183 |
break;
|
184 |
case 'target':
|
@@ -220,7 +185,7 @@ class Modula_Admin {
|
|
220 |
|
221 |
$nonce = $_POST['_wpnonce'];
|
222 |
if ( ! wp_verify_nonce( $nonce, 'modula-ajax-save' ) ) {
|
223 |
-
wp_send_json( array( 'status' => 'failed' ) );
|
224 |
}
|
225 |
|
226 |
if ( ! isset( $_POST['gallery'] ) ) {
|
@@ -253,10 +218,10 @@ class Modula_Admin {
|
|
253 |
}
|
254 |
|
255 |
public function save_image(){
|
256 |
-
|
257 |
$nonce = $_POST['_wpnonce'];
|
258 |
if ( ! wp_verify_nonce( $nonce, 'modula-ajax-save' ) ) {
|
259 |
-
wp_send_json( array( 'status' => 'failed' ) );
|
260 |
}
|
261 |
|
262 |
if ( ! isset( $_POST['gallery'] ) ) {
|
@@ -291,7 +256,7 @@ class Modula_Admin {
|
|
291 |
?>
|
292 |
|
293 |
<style type="text/css">
|
294 |
-
li#menu-posts-modula-gallery .wp-submenu li:
|
295 |
</style>
|
296 |
|
297 |
<?php
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
*
|
5 |
*/
|
6 |
class Modula_Admin {
|
7 |
|
8 |
private $tabs;
|
9 |
private $version = '2.0.0';
|
10 |
private $current_tab = 'general';
|
11 |
+
|
12 |
function __construct() {
|
13 |
|
14 |
// Register our submenus
|
37 |
if ( ! empty( $this->tabs ) ) {
|
38 |
add_submenu_page( 'edit.php?post_type=modula-gallery', esc_html__( 'Settings', 'modula-best-grid-gallery' ), esc_html__( 'Settings', 'modula-best-grid-gallery' ), 'manage_options', 'modula', array( $this, 'show_submenu' ) );
|
39 |
}
|
40 |
+
|
41 |
add_submenu_page( 'edit.php?post_type=modula-gallery', esc_html__( 'Extensions', 'modula-best-grid-gallery' ), esc_html__( 'Extensions', 'modula-best-grid-gallery' ), 'manage_options', 'modula-addons', array( $this, 'show_addons' ) );
|
42 |
|
43 |
}
|
65 |
'name' => esc_html__( 'Extensions', 'modula-best-grid-gallery' ),
|
66 |
'url' => admin_url( 'edit.php?post_type=modula-gallery&page=modula-addons' ),
|
67 |
),
|
|
|
|
|
|
|
|
|
68 |
);
|
69 |
$tabs = apply_filters( 'modula_exntesions_tabs', $tabs );
|
70 |
$active_tab = 'extensions';
|
72 |
$active_tab = $_GET['tab'];
|
73 |
}
|
74 |
?>
|
75 |
+
<div class="wrap">
|
76 |
<h2 class="nav-tab-wrapper">
|
77 |
<?php
|
78 |
foreach( $tabs as $tab_id => $tab ) {
|
88 |
|
89 |
if ( 'extensions' == $active_tab ) {
|
90 |
$addons = new Modula_Addons();
|
91 |
+
?>
|
92 |
+
<h1 style="margin-bottom: 20px; display: inline-block;"><?php esc_html_e( 'Extensions', 'modula-best-grid-gallery' ); ?></h1>
|
93 |
+
<a id="modula-reload-extensions" class="button button-primary" style="margin: 10px 0 0 30px;" data-nonce="<?php echo esc_attr( wp_create_nonce( 'modula-reload-extensions' ) ); ?>"><?php esc_html_e( 'Reload Extensions', 'modula-best-grid-gallery' ); ?></a>
|
94 |
+
<div class="modula-addons-container">
|
95 |
+
<?php $addons->render_addons(); ?>
|
96 |
+
</div>
|
97 |
+
<?php
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}else{
|
99 |
do_action( "modula_exntesion_{$active_tab}_tab" );
|
100 |
}
|
101 |
|
102 |
+
|
103 |
}
|
104 |
|
105 |
private function generate_url( $tab ) {
|
140 |
$new_image[ $attribute ] = absint( $image[ $attribute ] );
|
141 |
break;
|
142 |
case 'title':
|
143 |
+
case 'description' :
|
144 |
$new_image[ $attribute ] = wp_filter_post_kses( $image[ $attribute ] );
|
145 |
break;
|
146 |
+
case 'link' :
|
147 |
$new_image[ $attribute ] = esc_url_raw( $image[ $attribute ] );
|
148 |
break;
|
149 |
case 'target':
|
185 |
|
186 |
$nonce = $_POST['_wpnonce'];
|
187 |
if ( ! wp_verify_nonce( $nonce, 'modula-ajax-save' ) ) {
|
188 |
+
wp_send_json( array( 'status' => 'failed' ) );
|
189 |
}
|
190 |
|
191 |
if ( ! isset( $_POST['gallery'] ) ) {
|
218 |
}
|
219 |
|
220 |
public function save_image(){
|
221 |
+
|
222 |
$nonce = $_POST['_wpnonce'];
|
223 |
if ( ! wp_verify_nonce( $nonce, 'modula-ajax-save' ) ) {
|
224 |
+
wp_send_json( array( 'status' => 'failed' ) );
|
225 |
}
|
226 |
|
227 |
if ( ! isset( $_POST['gallery'] ) ) {
|
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
|
includes/admin/class-modula-cpt.php
CHANGED
@@ -188,7 +188,7 @@ class Modula_CPT {
|
|
188 |
'width' => isset( $image['width'] ) ? absint( $image['width'] ) : 1,
|
189 |
'height' => isset( $image['height'] ) ? absint( $image['height'] ) : 1,
|
190 |
);
|
191 |
-
$sizes = $this->resizer->get_image_size( $
|
192 |
if ( ! is_wp_error( $sizes ) ) {
|
193 |
$this->resizer->resize_image( $sizes['url'], $sizes['width'], $sizes['height'] );
|
194 |
}
|
188 |
'width' => isset( $image['width'] ) ? absint( $image['width'] ) : 1,
|
189 |
'height' => isset( $image['height'] ) ? absint( $image['height'] ) : 1,
|
190 |
);
|
191 |
+
$sizes = $this->resizer->get_image_size( $image['id'], $img_size, $gallery_type, $grid_sizes );
|
192 |
if ( ! is_wp_error( $sizes ) ) {
|
193 |
$this->resizer->resize_image( $sizes['url'], $sizes['width'], $sizes['height'] );
|
194 |
}
|
includes/class-modula.php
CHANGED
@@ -72,10 +72,12 @@ class Modula {
|
|
72 |
}
|
73 |
|
74 |
private function define_admin_hooks() {
|
75 |
-
|
76 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 20 );
|
77 |
add_action( 'init', array( $this, 'admin_init' ), 20 );
|
78 |
-
|
|
|
|
|
79 |
|
80 |
add_action( 'plugins_loaded', array( $this, 'set_locale' ));
|
81 |
|
@@ -199,9 +201,13 @@ class Modula {
|
|
199 |
|
200 |
}
|
201 |
|
202 |
-
public function
|
203 |
-
|
204 |
-
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
|
207 |
}
|
72 |
}
|
73 |
|
74 |
private function define_admin_hooks() {
|
75 |
+
|
76 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_scripts' ), 20 );
|
77 |
add_action( 'init', array( $this, 'admin_init' ), 20 );
|
78 |
+
|
79 |
+
// Add ajax action to reload extensions
|
80 |
+
add_action( 'wp_ajax_modula_reload_extensions', array( $this, 'reload_extensions' ), 20 );
|
81 |
|
82 |
add_action( 'plugins_loaded', array( $this, 'set_locale' ));
|
83 |
|
201 |
|
202 |
}
|
203 |
|
204 |
+
public function reload_extensions() {
|
205 |
+
// Run a security check first.
|
206 |
+
check_admin_referer( 'modula-reload-extensions', 'nonce' );
|
207 |
+
|
208 |
+
delete_transient( 'modula_all_extensions' );
|
209 |
+
|
210 |
+
die;
|
211 |
}
|
212 |
|
213 |
}
|
includes/public/class-modula-shortcode.php
CHANGED
@@ -21,12 +21,13 @@ class Modula_Shortcode {
|
|
21 |
add_filter( 'modula_shortcode_item_data', 'modula_check_hover_effect', 20, 3 );
|
22 |
add_filter( 'modula_shortcode_item_data', 'modula_check_custom_grid', 25, 3 );
|
23 |
add_filter( 'modula_shortcode_item_data', 'modula_enable_lazy_load', 30, 3 );
|
|
|
24 |
}
|
25 |
|
26 |
public function add_gallery_scripts() {
|
27 |
|
28 |
wp_register_style( 'lightbox2_stylesheet', MODULA_URL . 'assets/css/lightbox.min.css', null, MODULA_LITE_VERSION );
|
29 |
-
wp_register_style( 'modula', MODULA_URL . 'assets/css/modula.css', null, MODULA_LITE_VERSION );
|
30 |
|
31 |
// Scripts necessary for some galleries
|
32 |
/*@TODO modified from .min*/
|
@@ -35,7 +36,7 @@ class Modula_Shortcode {
|
|
35 |
wp_register_script( 'modula-lazysizes', MODULA_URL . 'assets/js/lazysizes.min.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
|
36 |
|
37 |
// @todo: minify all css & js for a better optimization.
|
38 |
-
wp_register_script( 'modula', MODULA_URL . 'assets/js/jquery-modula.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
|
39 |
|
40 |
}
|
41 |
|
@@ -52,8 +53,7 @@ class Modula_Shortcode {
|
|
52 |
}
|
53 |
|
54 |
/* Generate uniq id for this gallery */
|
55 |
-
$
|
56 |
-
$gallery_id = 'jtg-' . $atts['id'] . '-' . $rid;
|
57 |
|
58 |
// Check if is an old Modula post or new.
|
59 |
$gallery = get_post( $atts['id'] );
|
@@ -209,7 +209,7 @@ class Modula_Shortcode {
|
|
209 |
}
|
210 |
|
211 |
if ( '' != $settings['titleFontSize'] && 0 != $settings['titleFontSize'] ) {
|
212 |
-
$css .= "#{$gallery_id} .item .figc
|
213 |
}
|
214 |
|
215 |
$css .= "#{$gallery_id} .item { transform: scale(" . absint( $settings['loadedScale'] ) / 100 . "); }";
|
@@ -220,9 +220,9 @@ class Modula_Shortcode {
|
|
220 |
|
221 |
$css .= "#{$gallery_id} .items .figc p.description { color:" . sanitize_hex_color($settings['captionColor']) . ";font-size:" . absint($settings['captionFontSize']) . "px; }";
|
222 |
if ( '' != $settings['titleColor'] ) {
|
223 |
-
$css .= "#{$gallery_id} .items .figc
|
224 |
}else{
|
225 |
-
$css .= "#{$gallery_id} .items .figc
|
226 |
}
|
227 |
|
228 |
$css = apply_filters( 'modula_shortcode_css', $css, $gallery_id, $settings );
|
21 |
add_filter( 'modula_shortcode_item_data', 'modula_check_hover_effect', 20, 3 );
|
22 |
add_filter( 'modula_shortcode_item_data', 'modula_check_custom_grid', 25, 3 );
|
23 |
add_filter( 'modula_shortcode_item_data', 'modula_enable_lazy_load', 30, 3 );
|
24 |
+
|
25 |
}
|
26 |
|
27 |
public function add_gallery_scripts() {
|
28 |
|
29 |
wp_register_style( 'lightbox2_stylesheet', MODULA_URL . 'assets/css/lightbox.min.css', null, MODULA_LITE_VERSION );
|
30 |
+
wp_register_style( 'modula', MODULA_URL . 'assets/css/modula.min.css', null, MODULA_LITE_VERSION );
|
31 |
|
32 |
// Scripts necessary for some galleries
|
33 |
/*@TODO modified from .min*/
|
36 |
wp_register_script( 'modula-lazysizes', MODULA_URL . 'assets/js/lazysizes.min.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
|
37 |
|
38 |
// @todo: minify all css & js for a better optimization.
|
39 |
+
wp_register_script( 'modula', MODULA_URL . 'assets/js/jquery-modula.min.js', array( 'jquery' ), MODULA_LITE_VERSION, true );
|
40 |
|
41 |
}
|
42 |
|
53 |
}
|
54 |
|
55 |
/* Generate uniq id for this gallery */
|
56 |
+
$gallery_id = 'jtg-' . $atts['id'];
|
|
|
57 |
|
58 |
// Check if is an old Modula post or new.
|
59 |
$gallery = get_post( $atts['id'] );
|
209 |
}
|
210 |
|
211 |
if ( '' != $settings['titleFontSize'] && 0 != $settings['titleFontSize'] ) {
|
212 |
+
$css .= "#{$gallery_id} .item .figc .jtg-title { font-size: " . absint($settings['titleFontSize']) . "px; }";
|
213 |
}
|
214 |
|
215 |
$css .= "#{$gallery_id} .item { transform: scale(" . absint( $settings['loadedScale'] ) / 100 . "); }";
|
220 |
|
221 |
$css .= "#{$gallery_id} .items .figc p.description { color:" . sanitize_hex_color($settings['captionColor']) . ";font-size:" . absint($settings['captionFontSize']) . "px; }";
|
222 |
if ( '' != $settings['titleColor'] ) {
|
223 |
+
$css .= "#{$gallery_id} .items .figc .jtg-title { color:" . sanitize_hex_color($settings['titleColor']) . "; }";
|
224 |
}else{
|
225 |
+
$css .= "#{$gallery_id} .items .figc .jtg-title { color:" . sanitize_hex_color($settings['captionColor']) . "; }";
|
226 |
}
|
227 |
|
228 |
$css = apply_filters( 'modula_shortcode_css', $css, $gallery_id, $settings );
|