Version Description
October 3, 2018 = Minor point release that affects Preloaded and Search Engine Optimization add-on users only. This release fixes 2 critical bugs in Ajax Load More 3.7.
FIX - Fix for Preloaded add-on not parsing multiple Post Types (I'm sorry about that!).
FIX - Adding
.alm-reveal
div andcss_classes
to NO_SCRIPT render to keep styling and layouts consistent.
Download this release
Release Info
Developer | dcooney |
Plugin | WordPress Infinite Scroll – Ajax Load More |
Version | 3.7.1 |
Comparing to | |
See all releases |
Code changes from version 3.6.1 to 3.7.1
- .babelrc +0 -3
- README.txt +25 -2
- admin/admin.php +0 -1
- admin/dist/css/admin.css +228 -224
- admin/includes/cta/sharing.php +25 -14
- admin/includes/cta/writeable.php +3 -3
- admin/src/scss/_variables.scss +2 -0
- admin/src/scss/admin.scss +269 -238
- admin/src/scss/partials/_alm-settings-feedback.scss +14 -9
- admin/src/scss/partials/_header.scss +4 -0
- admin/views/settings.php +4 -29
- ajax-load-more.php +112 -310
- core/classes/class.alm-localize.php +62 -0
- core/classes/class.alm-noscript.php +231 -0
- core/classes/class.alm-queryargs.php +386 -0
- core/classes/class.alm-shortcode.php +107 -36
- core/classes/includes/preloaded.php +121 -71
- core/dist/js/ajax-load-more.js +68 -38
- core/dist/js/ajax-load-more.min.js +1 -1
- core/functions.php +87 -55
- core/src/js/ajax-load-more.js +86 -50
- core/src/js/helpers/queryParams.js +3 -0
- lang/ajax-load-more.pot +87 -95
.babelrc
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"presets": ["es2015"]
|
3 |
-
}
|
|
|
|
|
|
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://connekthq.com/donate/
|
|
4 |
Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.9.8
|
7 |
-
Stable tag: 3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -268,7 +268,7 @@ Ajax Load More passes the following PHP **[variables](https://connekthq.com/plug
|
|
268 |
|
269 |
### Plugin Links
|
270 |
* [Official Website](https://connekthq.com/ajax-load-more/)
|
271 |
-
* [
|
272 |
* [Premium Add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/)
|
273 |
* [Free Extensions](https://connekthq.com/plugins/ajax-load-more/extensions/)
|
274 |
* [Github](https://github.com/dcooney/wordpress-ajax-load-more/)
|
@@ -369,6 +369,29 @@ How to install Ajax Load More.
|
|
369 |
|
370 |
== Changelog ==
|
371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
= 3.6.1 - August 24, 2018 =
|
373 |
* FIX - Fix for search parameter not being passed correctly to Ajax Load More.
|
374 |
* FIX - Fixed PHP warning message being displayed with Call the Action add-on.
|
4 |
Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
|
5 |
Requires at least: 3.6
|
6 |
Tested up to: 4.9.8
|
7 |
+
Stable tag: 3.7.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
268 |
|
269 |
### Plugin Links
|
270 |
* [Official Website](https://connekthq.com/ajax-load-more/)
|
271 |
+
* [Documentation](https://connekthq.com/plugins/ajax-load-more/docs/)
|
272 |
* [Premium Add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/)
|
273 |
* [Free Extensions](https://connekthq.com/plugins/ajax-load-more/extensions/)
|
274 |
* [Github](https://github.com/dcooney/wordpress-ajax-load-more/)
|
369 |
|
370 |
== Changelog ==
|
371 |
|
372 |
+
= 3.7.1 - October 3, 2018 =
|
373 |
+
Minor point release that affects Preloaded and Search Engine Optimization add-on users only. This release fixes 2 critical bugs in Ajax Load More 3.7.
|
374 |
+
|
375 |
+
* FIX - Fix for Preloaded add-on not parsing multiple Post Types (I'm sorry about that!).
|
376 |
+
* FIX - Adding `.alm-reveal` div and `css_classes` to NO_SCRIPT render to keep styling and layouts consistent.
|
377 |
+
|
378 |
+
|
379 |
+
= 3.7 - September 19, 2018 =
|
380 |
+
* UPDATE NOTICE for Preloaded Addon Users - this ALM update moves preloaded posts into core .alm-listing container. This update was required for refactoring of core JS and HTML elements while making future enhancements easier to maintain.
|
381 |
+
* NEW - Added new `ALM_LOCALIZE` class that allows Ajax Load More variables and parameters to be written to the page and accessed as JavaScript variables. This will be expanded in the near future and used for our React and Vue examples :)
|
382 |
+
* NEW - Added <noscript /> support for SEO addon users that renders `WP_Query` results for SEO and users without JS enabled.
|
383 |
+
* UPDATE - Updated Ajax `WP_Query` to use new `ALM_QUERY_ARGS` class.
|
384 |
+
* FIX - Removed PHP warning messages caused by some Ajax Load More functions running in WP Admin.
|
385 |
+
* FIX - Fixed issue with offset and preloaded posts in Users addon, Comments addon and ACF extensions.
|
386 |
+
* FIX - Added a fix for `post__not_in` shortcode parameter not working with Sticky Posts.
|
387 |
+
* FIX - Fixed issue with fading in of Ajax elements when using SEO addon is active.
|
388 |
+
* FIX - Fixed issue search term filtering on default `search.php` template.
|
389 |
+
* UPDATE - Hiding Load More button if JavaScript is not enabled.
|
390 |
+
* UPDATE - Updated loading functionality of Preloaded and SEO addon when hitting a paged URL directly.
|
391 |
+
* UPDATE - Code refactoring of some PHP functions and Core ALM JS.
|
392 |
+
* UPDATE - Code clean up and organization.
|
393 |
+
|
394 |
+
|
395 |
= 3.6.1 - August 24, 2018 =
|
396 |
* FIX - Fix for search parameter not being passed correctly to Ajax Load More.
|
397 |
* FIX - Fixed PHP warning message being displayed with Call the Action add-on.
|
admin/admin.php
CHANGED
@@ -186,7 +186,6 @@ function alm_get_layout(){
|
|
186 |
die('Error - unable to verify nonce, please try again.');
|
187 |
|
188 |
if($type === 'default'){ // Default Layout
|
189 |
-
|
190 |
|
191 |
$content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
|
192 |
|
186 |
die('Error - unable to verify nonce, please try again.');
|
187 |
|
188 |
if($type === 'default'){ // Default Layout
|
|
|
189 |
|
190 |
$content = file_get_contents(ALM_PATH.'admin/includes/layout/'.$type.'.php');
|
191 |
|
admin/dist/css/admin.css
CHANGED
@@ -518,13 +518,18 @@ disabled look for disabled choices in the results dropdown
|
|
518 |
overflow: hidden;
|
519 |
padding: 25px 25px 12.5px;
|
520 |
background: #f7f7f7;
|
521 |
-
border-bottom: 1px solid #e1e1e1;
|
|
|
|
|
|
|
|
|
522 |
.ajax-load-more .header-wrap h1 {
|
523 |
padding: 0 0 0 58px;
|
524 |
min-height: 48px;
|
525 |
padding-top: 0;
|
526 |
background: url("../../img/alm-logo-48x48.png") no-repeat 0 0;
|
527 |
-
background: url("../../img/alm-logo-48x48.svg") no-repeat 0 0;
|
|
|
528 |
.ajax-load-more .header-wrap h1 em {
|
529 |
display: block;
|
530 |
position: relative;
|
@@ -569,34 +574,39 @@ disabled look for disabled choices in the results dropdown
|
|
569 |
.alm-settings-feedback {
|
570 |
position: fixed;
|
571 |
bottom: 20px;
|
572 |
-
right:
|
573 |
width: auto;
|
574 |
height: auto;
|
575 |
-
background: #
|
576 |
-
|
577 |
-
|
|
|
578 |
line-height: 1;
|
579 |
z-index: 9999;
|
580 |
border-radius: 2px;
|
581 |
opacity: 0;
|
582 |
visibility: hidden;
|
583 |
-
-webkit-transition: all 0.2s ease;
|
584 |
-
transition: all 0.2s ease;
|
585 |
-
-webkit-box-shadow: 0
|
586 |
-
box-shadow: 0
|
|
|
587 |
.alm-settings-feedback.--saving {
|
588 |
-
|
589 |
opacity: 1;
|
590 |
-
visibility: visible;
|
|
|
591 |
.alm-settings-feedback.--saved {
|
592 |
opacity: 1;
|
593 |
-
visibility: visible;
|
|
|
594 |
.alm-settings-feedback.--error {
|
595 |
-
|
596 |
opacity: 1;
|
597 |
-
visibility: visible;
|
|
|
598 |
.alm-settings-feedback i {
|
599 |
-
opacity: 0.
|
600 |
margin: 0 3px 0 0; }
|
601 |
|
602 |
#alm_OptionsForm {
|
@@ -866,7 +876,7 @@ body.ajax-load-more_page_ajax-load-more-pro {
|
|
866 |
display: flex;
|
867 |
-ms-flex-wrap: nowrap;
|
868 |
flex-wrap: nowrap;
|
869 |
-
font-family: Consolas,
|
870 |
border-radius: 3px; }
|
871 |
.ajax-load-more .file-location p, .ajax-load-more .file-location code {
|
872 |
padding: 12px 16px;
|
@@ -1264,7 +1274,7 @@ a.layout-hover:hover img {
|
|
1264 |
.ajax-load-more p.warning-callout strong {
|
1265 |
display: inline-block;
|
1266 |
font-weight: normal;
|
1267 |
-
font-family: Consolas,
|
1268 |
background-color: #edfbff;
|
1269 |
color: #525c5f;
|
1270 |
padding: 0 6px;
|
@@ -1634,7 +1644,8 @@ hr.indented {
|
|
1634 |
.next-page-content,
|
1635 |
.acf-options,
|
1636 |
.masonry-options,
|
1637 |
-
.progress-bar-options
|
|
|
1638 |
display: none; }
|
1639 |
|
1640 |
.ajax-load-more .row .wrap {
|
@@ -2711,7 +2722,25 @@ span.cnkt-button.installed i,
|
|
2711 |
padding: 0;
|
2712 |
margin: 0 0 20px;
|
2713 |
overflow: visible;
|
2714 |
-
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2715 |
|
2716 |
.ajax-load-more .cnkt-sidebar .cta-inner {
|
2717 |
padding: 20px;
|
@@ -3120,214 +3149,189 @@ span.cnkt-button.installed i,
|
|
3120 |
* Cache
|
3121 |
* @since 2.6.0
|
3122 |
*/
|
3123 |
-
.
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
.
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
.ajax-load-more .alm-cache-search-wrap input {
|
3136 |
-
width: 100% !important;
|
3137 |
-
margin: 0 !important;
|
3138 |
-
padding: 12px;
|
3139 |
display: block;
|
3140 |
-
|
3141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3142 |
position: absolute;
|
3143 |
-
right:
|
3144 |
-
top:
|
|
|
|
|
|
|
|
|
|
|
3145 |
color: #ccc;
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
.alm-dir-listing.theme-repeaters {
|
3155 |
-
padding: 15px;
|
3156 |
-
margin: 0; }
|
3157 |
-
.alm-dir-listing.theme-repeaters ul {
|
3158 |
-
border: none;
|
3159 |
-
padding: 0;
|
3160 |
-
margin: 0; }
|
3161 |
-
.alm-dir-listing.theme-repeaters p.theme-title {
|
3162 |
-
font-weight: 600;
|
3163 |
-
margin: 0 0 15px;
|
3164 |
-
padding: 0 5px; }
|
3165 |
-
.alm-dir-listing.theme-repeaters i {
|
3166 |
-
color: #ccc;
|
3167 |
-
font-size: 1.1em; }
|
3168 |
-
|
3169 |
-
.alm-dir-listing.deleting {
|
3170 |
-
opacity: 0.5;
|
3171 |
-
background: #fff url("../../img/loader-unlimited.gif") no-repeat center center; }
|
3172 |
-
|
3173 |
-
.alm-dir-listing .dir-title {
|
3174 |
-
margin: 0 0 5px;
|
3175 |
-
position: relative; }
|
3176 |
-
|
3177 |
-
.ajax-load-more .alm-dir-listing h3.heading {
|
3178 |
-
padding-left: 40px !important; }
|
3179 |
-
|
3180 |
-
.ajax-load-more .alm-dir-listing h3.heading:after {
|
3181 |
-
content: "\f07c"; }
|
3182 |
-
|
3183 |
-
.ajax-load-more .alm-dir-listing h3.heading.open:after {
|
3184 |
-
content: "\f07b"; }
|
3185 |
-
|
3186 |
-
.alm-dir-listing .dir-title .delete {
|
3187 |
-
position: absolute;
|
3188 |
-
right: 8px;
|
3189 |
-
top: 11px;
|
3190 |
-
font-weight: 400;
|
3191 |
-
font-size: 14px;
|
3192 |
-
text-decoration: none;
|
3193 |
-
padding: 5px 10px;
|
3194 |
-
border: 1px solid #e1e1e1;
|
3195 |
-
color: #ccc;
|
3196 |
-
border-radius: 2px; }
|
3197 |
-
|
3198 |
-
.alm-dir-listing:hover .dir-title .delete {
|
3199 |
-
border-color: #e1e1e1;
|
3200 |
-
background-color: #fff;
|
3201 |
-
color: #666; }
|
3202 |
-
|
3203 |
-
.alm-dir-listing .dir-title .delete:hover {
|
3204 |
-
background-color: #c94141;
|
3205 |
-
border-color: #c94141;
|
3206 |
-
color: #fff;
|
3207 |
-
-webkit-box-shadow: 0 0 3px #ccc;
|
3208 |
-
box-shadow: 0 0 3px #ccc; }
|
3209 |
-
|
3210 |
-
.alm-dir-listing .dir-title .delete:active {
|
3211 |
-
-webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
3212 |
-
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2); }
|
3213 |
-
|
3214 |
-
.alm-dir-listing ul {
|
3215 |
-
padding: 10px;
|
3216 |
-
margin: 0;
|
3217 |
-
border: 1px solid #efefef; }
|
3218 |
-
|
3219 |
-
.alm-dir-listing ul li {
|
3220 |
-
margin: 0 -2px;
|
3221 |
-
padding: 7px 0 7px 40px;
|
3222 |
-
display: inline-block;
|
3223 |
-
vertical-align: top;
|
3224 |
-
overflow: hidden;
|
3225 |
-
width: 47%;
|
3226 |
-
font-size: 14px;
|
3227 |
-
background: transparent url(../../img/directory-list.gif) no-repeat left center; }
|
3228 |
-
|
3229 |
-
.alm-dir-listing.theme-repeaters ul li {
|
3230 |
-
display: block;
|
3231 |
-
width: 100%;
|
3232 |
-
padding-top: 12px; }
|
3233 |
-
|
3234 |
-
.alm-dir-listing.theme-repeaters ul li label {
|
3235 |
-
display: block;
|
3236 |
-
width: 100%; }
|
3237 |
-
|
3238 |
-
.alm-dir-listing ul li:last-child,
|
3239 |
-
.alm-dir-listing ul li:nth-last-child(2) {
|
3240 |
-
background-image: url(../../img/directory-list-btm.gif); }
|
3241 |
-
|
3242 |
-
.alm-dir-listing.theme-repeaters ul li:nth-last-child(2) {
|
3243 |
-
background: transparent url(../../img/directory-list.gif) no-repeat left center; }
|
3244 |
-
|
3245 |
-
.alm-dir-listing ul li a {
|
3246 |
-
text-decoration: none; }
|
3247 |
-
|
3248 |
-
.alm-dir-listing li i {
|
3249 |
-
color: #999;
|
3250 |
-
padding: 0 5px 0 0; }
|
3251 |
-
|
3252 |
-
.cache-page-title {
|
3253 |
-
font-size: 14px;
|
3254 |
-
display: block;
|
3255 |
-
width: 100%;
|
3256 |
-
padding: 0 0 10px 12px;
|
3257 |
-
font-weight: 600; }
|
3258 |
-
|
3259 |
-
.cache-page-wrap {
|
3260 |
-
padding: 0 15px 15px; }
|
3261 |
-
|
3262 |
-
.alm-dir-listing ul.cache-details {
|
3263 |
-
display: block;
|
3264 |
-
padding: 6px 10px 12px;
|
3265 |
-
margin: 0;
|
3266 |
-
border: none; }
|
3267 |
-
|
3268 |
-
.alm-dir-listing ul.cache-details li {
|
3269 |
-
display: block;
|
3270 |
-
width: 100%;
|
3271 |
-
background: none;
|
3272 |
-
padding: 6px 4px 6px;
|
3273 |
-
color: #333; }
|
3274 |
-
|
3275 |
-
.alm-dir-listing ul.cache-details li i {
|
3276 |
-
color: #ccc;
|
3277 |
-
font-size: 18px;
|
3278 |
-
position: relative;
|
3279 |
-
top: 1px; }
|
3280 |
-
|
3281 |
-
.dir-empty,
|
3282 |
-
.cache-cleared {
|
3283 |
-
background-color: #fefeed;
|
3284 |
-
border: 1px solid #efefef;
|
3285 |
-
padding: 10px;
|
3286 |
-
display: block;
|
3287 |
-
color: #222; }
|
3288 |
-
|
3289 |
-
.cache-cleared {
|
3290 |
-
margin: 0 0 20px;
|
3291 |
-
background-color: #e0f5ff;
|
3292 |
-
border-color: #bad0da;
|
3293 |
-
color: #666; }
|
3294 |
-
.cache-cleared i {
|
3295 |
-
color: #111;
|
3296 |
-
margin: 0 5px 0 0; }
|
3297 |
-
.cache-cleared .remove {
|
3298 |
-
float: right;
|
3299 |
-
font-size: 12px;
|
3300 |
-
font-weight: 600; }
|
3301 |
-
|
3302 |
-
#alm-cache.ajax-load-more .cnkt-sidebar .item {
|
3303 |
-
padding: 20px;
|
3304 |
-
display: block; }
|
3305 |
-
|
3306 |
-
p.cache-stats {
|
3307 |
-
min-height: 38px;
|
3308 |
-
line-height: 37px;
|
3309 |
-
display: block;
|
3310 |
-
padding: 0;
|
3311 |
-
margin: 0; }
|
3312 |
-
p.cache-stats span {
|
3313 |
-
display: inline-block;
|
3314 |
-
width: 38px;
|
3315 |
-
height: 38px;
|
3316 |
-
line-height: 36px;
|
3317 |
-
text-align: center;
|
3318 |
-
margin: 0 9px 0 0;
|
3319 |
-
font-weight: 700;
|
3320 |
-
font-size: 15px;
|
3321 |
-
border-radius: 2px;
|
3322 |
-
background: #a4a5e2;
|
3323 |
-
background: -webkit-gradient(linear, left top, left bottom, from(#a4a5e2), color-stop(50%, #9ea0d9), color-stop(51%, #8d8fce), to(#a4a5e2));
|
3324 |
-
background: linear-gradient(to bottom, #a4a5e2 0%, #9ea0d9 50%, #8d8fce 51%, #a4a5e2 100%);
|
3325 |
-
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
|
3326 |
-
border: 1px solid #8586be;
|
3327 |
-
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
3328 |
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
3329 |
color: #fff;
|
3330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3331 |
|
3332 |
/*
|
3333 |
* Error Handling
|
518 |
overflow: hidden;
|
519 |
padding: 25px 25px 12.5px;
|
520 |
background: #f7f7f7;
|
521 |
+
border-bottom: 1px solid #e1e1e1;
|
522 |
+
position: relative;
|
523 |
+
z-index: 1;
|
524 |
+
-webkit-box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045);
|
525 |
+
box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045); }
|
526 |
.ajax-load-more .header-wrap h1 {
|
527 |
padding: 0 0 0 58px;
|
528 |
min-height: 48px;
|
529 |
padding-top: 0;
|
530 |
background: url("../../img/alm-logo-48x48.png") no-repeat 0 0;
|
531 |
+
background: url("../../img/alm-logo-48x48.svg") no-repeat 0 0;
|
532 |
+
font-size: 22px; }
|
533 |
.ajax-load-more .header-wrap h1 em {
|
534 |
display: block;
|
535 |
position: relative;
|
574 |
.alm-settings-feedback {
|
575 |
position: fixed;
|
576 |
bottom: 20px;
|
577 |
+
right: 25px;
|
578 |
width: auto;
|
579 |
height: auto;
|
580 |
+
background: #fff;
|
581 |
+
border-left: 5px solid #5cc583;
|
582 |
+
color: #444;
|
583 |
+
padding: 25px 30px 25px 25px;
|
584 |
line-height: 1;
|
585 |
z-index: 9999;
|
586 |
border-radius: 2px;
|
587 |
opacity: 0;
|
588 |
visibility: hidden;
|
589 |
+
-webkit-transition: all 0.2s ease-in-out;
|
590 |
+
transition: all 0.2s ease-in-out;
|
591 |
+
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
592 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
593 |
+
font-size: 13px; }
|
594 |
.alm-settings-feedback.--saving {
|
595 |
+
border-color: #e0bd5e;
|
596 |
opacity: 1;
|
597 |
+
visibility: visible;
|
598 |
+
bottom: 25px; }
|
599 |
.alm-settings-feedback.--saved {
|
600 |
opacity: 1;
|
601 |
+
visibility: visible;
|
602 |
+
bottom: 25px; }
|
603 |
.alm-settings-feedback.--error {
|
604 |
+
border-color: #e03e3e;
|
605 |
opacity: 1;
|
606 |
+
visibility: visible;
|
607 |
+
bottom: 25px; }
|
608 |
.alm-settings-feedback i {
|
609 |
+
opacity: 0.6;
|
610 |
margin: 0 3px 0 0; }
|
611 |
|
612 |
#alm_OptionsForm {
|
876 |
display: flex;
|
877 |
-ms-flex-wrap: nowrap;
|
878 |
flex-wrap: nowrap;
|
879 |
+
font-family: Consolas,monaco,monospace;
|
880 |
border-radius: 3px; }
|
881 |
.ajax-load-more .file-location p, .ajax-load-more .file-location code {
|
882 |
padding: 12px 16px;
|
1274 |
.ajax-load-more p.warning-callout strong {
|
1275 |
display: inline-block;
|
1276 |
font-weight: normal;
|
1277 |
+
font-family: Consolas,monaco,monospace;
|
1278 |
background-color: #edfbff;
|
1279 |
color: #525c5f;
|
1280 |
padding: 0 6px;
|
1644 |
.next-page-content,
|
1645 |
.acf-options,
|
1646 |
.masonry-options,
|
1647 |
+
.progress-bar-options,
|
1648 |
+
.hide-section {
|
1649 |
display: none; }
|
1650 |
|
1651 |
.ajax-load-more .row .wrap {
|
2722 |
padding: 0;
|
2723 |
margin: 0 0 20px;
|
2724 |
overflow: visible;
|
2725 |
+
position: relative;
|
2726 |
+
-webkit-box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045);
|
2727 |
+
box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045); }
|
2728 |
+
.ajax-load-more .cnkt-sidebar .cta .alm-file-location {
|
2729 |
+
padding-top: 15px;
|
2730 |
+
margin-top: 15px;
|
2731 |
+
border-top: 1px solid #efefef; }
|
2732 |
+
.ajax-load-more .cnkt-sidebar .cta .alm-file-location input {
|
2733 |
+
font-size: 12px;
|
2734 |
+
font-family: Consolas, monaco, monospace;
|
2735 |
+
background: #f7f7f7;
|
2736 |
+
border: 1px solid #e1e1e1;
|
2737 |
+
display: block;
|
2738 |
+
width: 100%;
|
2739 |
+
padding: 8px;
|
2740 |
+
margin: 0;
|
2741 |
+
color: #777;
|
2742 |
+
-webkit-box-shadow: none !important;
|
2743 |
+
box-shadow: none !important; }
|
2744 |
|
2745 |
.ajax-load-more .cnkt-sidebar .cta-inner {
|
2746 |
padding: 20px;
|
3149 |
* Cache
|
3150 |
* @since 2.6.0
|
3151 |
*/
|
3152 |
+
.alm-cache {
|
3153 |
+
/* Live Search */
|
3154 |
+
/* Directory Listing */ }
|
3155 |
+
.alm-cache .generate-id {
|
3156 |
+
margin: 10px 0 0 !important;
|
3157 |
+
font-size: 12px !important; }
|
3158 |
+
.alm-cache .generate-cache-id i {
|
3159 |
+
margin: 0 5px 0 0; }
|
3160 |
+
.alm-cache .row:first-of-type {
|
3161 |
+
margin-top: 0 !important; }
|
3162 |
+
.alm-cache .alm-cache-search-wrap {
|
3163 |
+
position: relative;
|
|
|
|
|
|
|
|
|
3164 |
display: block;
|
3165 |
+
margin: 0 0 10px; }
|
3166 |
+
.alm-cache .alm-cache-search-wrap input {
|
3167 |
+
width: 100% !important;
|
3168 |
+
margin: 0 !important;
|
3169 |
+
padding: 12px;
|
3170 |
+
display: block;
|
3171 |
+
font-size: 16px; }
|
3172 |
+
.alm-cache .alm-cache-search-wrap i {
|
3173 |
+
position: absolute;
|
3174 |
+
right: 11px;
|
3175 |
+
top: 13px;
|
3176 |
+
color: #ccc;
|
3177 |
+
font-size: 20px;
|
3178 |
+
z-index: 1; }
|
3179 |
+
.alm-cache .alm-dir-listing {
|
3180 |
+
border: 1px solid #e1e1e1;
|
3181 |
+
padding: 0;
|
3182 |
+
margin: 10px 0 0; }
|
3183 |
+
.alm-cache .alm-dir-listing.theme-repeaters {
|
3184 |
+
padding: 15px;
|
3185 |
+
margin: 0; }
|
3186 |
+
.alm-cache .alm-dir-listing.theme-repeaters ul {
|
3187 |
+
border: none;
|
3188 |
+
padding: 0;
|
3189 |
+
margin: 0; }
|
3190 |
+
.alm-cache .alm-dir-listing.theme-repeaters p.theme-title {
|
3191 |
+
font-weight: 600;
|
3192 |
+
margin: 0 0 15px;
|
3193 |
+
padding: 0 5px; }
|
3194 |
+
.alm-cache .alm-dir-listing.theme-repeaters i {
|
3195 |
+
color: #ccc;
|
3196 |
+
font-size: 1.1em; }
|
3197 |
+
.alm-cache .alm-dir-listing.deleting {
|
3198 |
+
opacity: 0.5;
|
3199 |
+
background: #fff url("../../img/loader-unlimited.gif") no-repeat center center; }
|
3200 |
+
.alm-cache .alm-dir-listing .dir-title {
|
3201 |
+
margin: 0 0 5px;
|
3202 |
+
position: relative; }
|
3203 |
+
.alm-cache .ajax-load-more .alm-dir-listing h3.heading {
|
3204 |
+
padding-left: 40px !important; }
|
3205 |
+
.alm-cache .ajax-load-more .alm-dir-listing h3.heading:after {
|
3206 |
+
content: "\f07c"; }
|
3207 |
+
.alm-cache .ajax-load-more .alm-dir-listing h3.heading.open:after {
|
3208 |
+
content: "\f07b"; }
|
3209 |
+
.alm-cache .alm-dir-listing .dir-title .delete {
|
3210 |
position: absolute;
|
3211 |
+
right: 8px;
|
3212 |
+
top: 11px;
|
3213 |
+
font-weight: 400;
|
3214 |
+
font-size: 14px;
|
3215 |
+
text-decoration: none;
|
3216 |
+
padding: 5px 10px;
|
3217 |
+
border: 1px solid #e1e1e1;
|
3218 |
color: #ccc;
|
3219 |
+
border-radius: 2px; }
|
3220 |
+
.alm-cache .alm-dir-listing:hover .dir-title .delete {
|
3221 |
+
border-color: #e1e1e1;
|
3222 |
+
background-color: #fff;
|
3223 |
+
color: #666; }
|
3224 |
+
.alm-cache .alm-dir-listing .dir-title .delete:hover {
|
3225 |
+
background-color: #c94141;
|
3226 |
+
border-color: #c94141;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3227 |
color: #fff;
|
3228 |
+
-webkit-box-shadow: 0 0 3px #ccc;
|
3229 |
+
box-shadow: 0 0 3px #ccc; }
|
3230 |
+
.alm-cache .alm-dir-listing .dir-title .delete:active {
|
3231 |
+
-webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
3232 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2); }
|
3233 |
+
.alm-cache .alm-dir-listing ul {
|
3234 |
+
padding: 20px 0 0;
|
3235 |
+
margin: 10px 0 0;
|
3236 |
+
border-top: 1px solid #efefef; }
|
3237 |
+
.alm-cache .alm-dir-listing ul li {
|
3238 |
+
margin: 0 -2px;
|
3239 |
+
padding: 7px 0 7px 40px;
|
3240 |
+
display: inline-block;
|
3241 |
+
vertical-align: top;
|
3242 |
+
overflow: hidden;
|
3243 |
+
width: 47%;
|
3244 |
+
font-size: 14px;
|
3245 |
+
background: transparent url(../../img/directory-list.gif) no-repeat left center; }
|
3246 |
+
.alm-cache .alm-dir-listing.theme-repeaters ul li {
|
3247 |
+
display: block;
|
3248 |
+
width: 100%;
|
3249 |
+
padding-top: 12px; }
|
3250 |
+
.alm-cache .alm-dir-listing.theme-repeaters ul li label {
|
3251 |
+
display: block;
|
3252 |
+
width: 100%; }
|
3253 |
+
.alm-cache .alm-dir-listing ul li:last-child,
|
3254 |
+
.alm-cache .alm-dir-listing ul li:nth-last-child(2) {
|
3255 |
+
background-image: url(../../img/directory-list-btm.gif); }
|
3256 |
+
.alm-cache .alm-dir-listing.theme-repeaters ul li:nth-last-child(2) {
|
3257 |
+
background: transparent url(../../img/directory-list.gif) no-repeat left center; }
|
3258 |
+
.alm-cache .alm-dir-listing ul li a {
|
3259 |
+
text-decoration: none; }
|
3260 |
+
.alm-cache .alm-dir-listing li i {
|
3261 |
+
color: #999;
|
3262 |
+
padding: 0 5px 0 0; }
|
3263 |
+
.alm-cache .cache-page-title {
|
3264 |
+
font-size: 14px;
|
3265 |
+
display: block;
|
3266 |
+
width: 100%;
|
3267 |
+
padding: 0 7px 10px;
|
3268 |
+
font-weight: 600; }
|
3269 |
+
.alm-cache .cache-page-wrap {
|
3270 |
+
padding: 0 10px 15px; }
|
3271 |
+
.alm-cache .alm-dir-listing ul.cache-details {
|
3272 |
+
display: block;
|
3273 |
+
padding: 10px 10px;
|
3274 |
+
margin: 0;
|
3275 |
+
border: none; }
|
3276 |
+
.alm-cache .alm-dir-listing ul.cache-details li {
|
3277 |
+
display: block;
|
3278 |
+
width: 100%;
|
3279 |
+
background: none;
|
3280 |
+
padding: 6px 4px 6px;
|
3281 |
+
color: #333; }
|
3282 |
+
.alm-cache .alm-dir-listing ul.cache-details li i {
|
3283 |
+
color: #ccc;
|
3284 |
+
font-size: 18px;
|
3285 |
+
position: relative;
|
3286 |
+
top: 1px; }
|
3287 |
+
.alm-cache .dir-empty,
|
3288 |
+
.alm-cache .cache-cleared {
|
3289 |
+
background-color: #ffffe8;
|
3290 |
+
border: 1px solid #e4e4c8;
|
3291 |
+
padding: 20px;
|
3292 |
+
display: block;
|
3293 |
+
color: #222;
|
3294 |
+
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2); }
|
3295 |
+
.alm-cache .cache-cleared {
|
3296 |
+
margin: 0 0 20px;
|
3297 |
+
background-color: #e0f5ff;
|
3298 |
+
border-color: #bad0da;
|
3299 |
+
color: #666; }
|
3300 |
+
.alm-cache .cache-cleared i {
|
3301 |
+
color: #111;
|
3302 |
+
margin: 0 5px 0 0; }
|
3303 |
+
.alm-cache .cache-cleared .remove {
|
3304 |
+
float: right;
|
3305 |
+
font-size: 12px;
|
3306 |
+
font-weight: 600; }
|
3307 |
+
.alm-cache .cnkt-sidebar .item {
|
3308 |
+
padding: 20px;
|
3309 |
+
display: block; }
|
3310 |
+
.alm-cache p.cache-stats {
|
3311 |
+
min-height: 38px;
|
3312 |
+
line-height: 37px;
|
3313 |
+
display: block;
|
3314 |
+
padding: 0;
|
3315 |
+
margin: 0; }
|
3316 |
+
.alm-cache p.cache-stats span {
|
3317 |
+
display: inline-block;
|
3318 |
+
width: 38px;
|
3319 |
+
height: 38px;
|
3320 |
+
line-height: 36px;
|
3321 |
+
text-align: center;
|
3322 |
+
margin: 0 9px 0 0;
|
3323 |
+
font-weight: 700;
|
3324 |
+
font-size: 15px;
|
3325 |
+
border-radius: 2px;
|
3326 |
+
background: #a4a5e2;
|
3327 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#a4a5e2), color-stop(50%, #9ea0d9), color-stop(51%, #8d8fce), to(#a4a5e2));
|
3328 |
+
background: linear-gradient(to bottom, #a4a5e2 0%, #9ea0d9 50%, #8d8fce 51%, #a4a5e2 100%);
|
3329 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
|
3330 |
+
border: 1px solid #8586be;
|
3331 |
+
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
3332 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
3333 |
+
color: #fff;
|
3334 |
+
text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1); }
|
3335 |
|
3336 |
/*
|
3337 |
* Error Handling
|
admin/includes/cta/sharing.php
CHANGED
@@ -1,14 +1,25 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$alm_share_notification = get_transient( 'alm_dismiss_sharing');
|
3 |
+
if(!isset($alm_share_notification) || empty($alm_share_notification)){
|
4 |
+
// If transient has not been set - display this notice.
|
5 |
+
?>
|
6 |
+
<div class="group alm-notification alm-notification--blue">
|
7 |
+
<h2><span>👋</span>Thank you for installing Ajax Load More!</h2>
|
8 |
+
<p class="opening">I hope you're finding the plugin easy to use and a nice feature addition to your website.</p>
|
9 |
+
<p>If so, would you consider helping <a href="https://twitter.com/KaptonKaos" target="_blank">me</a> widen the reach of Ajax Load More by sharing with your networks and/or leaving a review.</p>
|
10 |
+
<ul class="share">
|
11 |
+
<li class="twitter">
|
12 |
+
<a target="blank" title="Share on Twitter" href="//twitter.com/home?status=I'm infinite scrolling with Ajax Load More for %23WordPress - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter"><i class="fa fa-twitter"></i> Twitter</a>
|
13 |
+
</li>
|
14 |
+
<li class="facebook">
|
15 |
+
<a target="blank" title="Share on Facebook" href="//facebook.com/share.php?u=https://connekthq.com/plugins/ajax-load-more/" class="share-facebook"><i class="fa fa-facebook"></i> Facebook</a>
|
16 |
+
</li>
|
17 |
+
<li class="review">
|
18 |
+
<a target="blank" title="Leave a Review" href="//wordpress.org/support/plugin/ajax-load-more/reviews/" class="share-review"><i class="fa fa-pencil"></i> Leave Review</a>
|
19 |
+
</li>
|
20 |
+
</ul>
|
21 |
+
<div class="clear"></div>
|
22 |
+
<a href="javascript: void(0);" class="dismiss alm-notification--dismiss" id="alm_dismiss_sharing" title="<?php _e('Don\'t show me this again!', 'ajax-load-more');?>">×</a>
|
23 |
+
|
24 |
+
</div>
|
25 |
+
<?php } ?>
|
admin/includes/cta/writeable.php
CHANGED
@@ -18,8 +18,8 @@
|
|
18 |
}
|
19 |
?>
|
20 |
</div>
|
21 |
-
<
|
22 |
-
<input type="text" value="<?php echo $path; ?>"
|
23 |
-
</
|
24 |
</div>
|
25 |
</div>
|
18 |
}
|
19 |
?>
|
20 |
</div>
|
21 |
+
<div class="alm-file-location">
|
22 |
+
<input type="text" value="<?php echo $path; ?>" readonly="readonly">
|
23 |
+
</div>
|
24 |
</div>
|
25 |
</div>
|
admin/src/scss/_variables.scss
CHANGED
@@ -3,6 +3,8 @@ $padding: 15px;
|
|
3 |
$grey: #555;
|
4 |
$green: #63ccb2;
|
5 |
$green_hover: #57bda4;
|
|
|
|
|
6 |
|
7 |
$small: 480px;
|
8 |
|
3 |
$grey: #555;
|
4 |
$green: #63ccb2;
|
5 |
$green_hover: #57bda4;
|
6 |
+
$yellow: #ffffe8;
|
7 |
+
$yellow_dark: #e4e4c8;
|
8 |
|
9 |
$small: 480px;
|
10 |
|
admin/src/scss/admin.scss
CHANGED
@@ -166,6 +166,8 @@ body.ajax-load-more_page_ajax-load-more-pro{
|
|
166 |
}
|
167 |
}
|
168 |
}
|
|
|
|
|
169 |
// File location on Theme Repeaters
|
170 |
.ajax-load-more .file-location{
|
171 |
border: 1px solid #e1e1e1;
|
@@ -175,7 +177,7 @@ body.ajax-load-more_page_ajax-load-more-pro{
|
|
175 |
line-height: 1;
|
176 |
display: flex;
|
177 |
flex-wrap: nowrap;
|
178 |
-
font-family: Consolas,
|
179 |
border-radius: 3px;
|
180 |
p, code {
|
181 |
padding: 12px 16px;
|
@@ -600,7 +602,7 @@ a.layout-hover{
|
|
600 |
.ajax-load-more p.warning-callout strong{
|
601 |
display: inline-block;
|
602 |
font-weight: normal;
|
603 |
-
font-family: Consolas,
|
604 |
background-color: #edfbff;
|
605 |
color:#525c5f;
|
606 |
padding: 0 6px;
|
@@ -1024,7 +1026,8 @@ hr.indented{ // Indented as fake padding in shortcode builder
|
|
1024 |
.next-page-content,
|
1025 |
.acf-options,
|
1026 |
.masonry-options,
|
1027 |
-
.progress-bar-options
|
|
|
1028 |
display: none;
|
1029 |
}
|
1030 |
|
@@ -2178,6 +2181,26 @@ table.highlight{
|
|
2178 |
margin: 0 0 20px;
|
2179 |
overflow: visible;
|
2180 |
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2181 |
}
|
2182 |
.ajax-load-more .cnkt-sidebar .cta-inner{
|
2183 |
padding: 20px;
|
@@ -2602,244 +2625,252 @@ table.highlight{
|
|
2602 |
* @since 2.6.0
|
2603 |
*/
|
2604 |
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
display: block;
|
2625 |
-
font-size: 16px;
|
2626 |
-
}
|
2627 |
-
i{
|
2628 |
-
position: absolute;
|
2629 |
-
right: 11px;
|
2630 |
-
top: 13px;
|
2631 |
-
color: #ccc;
|
2632 |
-
font-size: 20px;
|
2633 |
-
z-index: 1;
|
2634 |
-
}
|
2635 |
-
}
|
2636 |
-
|
2637 |
-
/* Directory Listing */
|
2638 |
-
|
2639 |
-
.alm-dir-listing{
|
2640 |
-
border: 1px solid #e1e1e1;
|
2641 |
-
padding: 0;
|
2642 |
-
margin: 20px 0 0;
|
2643 |
-
&.theme-repeaters{
|
2644 |
-
padding: 15px;
|
2645 |
-
margin: 0;
|
2646 |
-
ul{
|
2647 |
-
border: none;
|
2648 |
-
padding: 0;
|
2649 |
-
margin: 0;
|
2650 |
-
}
|
2651 |
-
p.theme-title{
|
2652 |
-
font-weight: 600;
|
2653 |
-
margin: 0 0 15px;
|
2654 |
-
padding: 0 5px;
|
2655 |
-
}
|
2656 |
-
i{
|
2657 |
-
color: #ccc;
|
2658 |
-
font-size: 1.1em;
|
2659 |
-
}
|
2660 |
-
}
|
2661 |
-
}
|
2662 |
-
|
2663 |
-
.alm-dir-listing.deleting{
|
2664 |
-
opacity: 0.5;
|
2665 |
-
background: #fff url("../../img/loader-unlimited.gif") no-repeat center center;
|
2666 |
-
}
|
2667 |
-
|
2668 |
-
.alm-dir-listing .dir-title{
|
2669 |
-
margin: 0 0 5px;
|
2670 |
-
position: relative;
|
2671 |
-
}
|
2672 |
-
.ajax-load-more .alm-dir-listing h3.heading{
|
2673 |
-
padding-left: 40px !important;
|
2674 |
-
}
|
2675 |
-
.ajax-load-more .alm-dir-listing h3.heading:after {
|
2676 |
-
content: "\f07c";
|
2677 |
-
}
|
2678 |
-
.ajax-load-more .alm-dir-listing h3.heading.open:after {
|
2679 |
-
content: "\f07b";
|
2680 |
-
}
|
2681 |
-
.alm-dir-listing .dir-title .delete{
|
2682 |
-
position: absolute;
|
2683 |
-
right:8px;
|
2684 |
-
top:11px;
|
2685 |
-
font-weight: 400;
|
2686 |
-
font-size: 14px;
|
2687 |
-
text-decoration: none;
|
2688 |
-
padding: 5px 10px;
|
2689 |
-
border: 1px solid #e1e1e1;
|
2690 |
-
color: #ccc;
|
2691 |
-
-webkit-border-radius: 2px;
|
2692 |
-
-moz-border-radius: 2px;
|
2693 |
-
border-radius: 2px;
|
2694 |
-
}
|
2695 |
-
.alm-dir-listing:hover .dir-title .delete{
|
2696 |
-
border-color: #e1e1e1;
|
2697 |
-
background-color: #fff;
|
2698 |
-
color: #666;
|
2699 |
-
}
|
2700 |
-
.alm-dir-listing .dir-title .delete:hover{
|
2701 |
-
background-color: #c94141;
|
2702 |
-
border-color: #c94141;
|
2703 |
-
color: #fff;
|
2704 |
-
-webkit-box-shadow: 0 0 3px #ccc;
|
2705 |
-
-moz-box-shadow: 0 0 3px #ccc;
|
2706 |
-
box-shadow: 0 0 3px #ccc;
|
2707 |
-
}
|
2708 |
-
.alm-dir-listing .dir-title .delete:active{
|
2709 |
-
-webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2710 |
-
-moz-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2711 |
-
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2712 |
-
}
|
2713 |
-
.alm-dir-listing ul{
|
2714 |
-
padding: 10px;
|
2715 |
-
margin: 0;
|
2716 |
-
border: 1px solid #efefef;
|
2717 |
-
}
|
2718 |
-
.alm-dir-listing ul li{
|
2719 |
-
margin: 0 -2px;
|
2720 |
-
padding: 7px 0 7px 40px;
|
2721 |
-
display: inline-block;
|
2722 |
-
vertical-align: top;
|
2723 |
-
overflow: hidden;
|
2724 |
-
width: 47%;
|
2725 |
-
font-size: 14px;
|
2726 |
-
background: transparent url(../../img/directory-list.gif) no-repeat left center;
|
2727 |
-
}
|
2728 |
-
.alm-dir-listing.theme-repeaters ul li{
|
2729 |
-
display: block;
|
2730 |
-
width: 100%;
|
2731 |
-
padding-top: 12px;
|
2732 |
-
}
|
2733 |
-
.alm-dir-listing.theme-repeaters ul li label{
|
2734 |
-
display: block;
|
2735 |
-
width: 100%;
|
2736 |
-
}
|
2737 |
-
|
2738 |
-
.alm-dir-listing ul li:last-child,
|
2739 |
-
.alm-dir-listing ul li:nth-last-child(2){
|
2740 |
-
background-image: url(../../img/directory-list-btm.gif);
|
2741 |
-
}
|
2742 |
-
.alm-dir-listing.theme-repeaters ul li:nth-last-child(2){
|
2743 |
-
background: transparent url(../../img/directory-list.gif) no-repeat left center;
|
2744 |
-
}
|
2745 |
-
.alm-dir-listing ul li a{
|
2746 |
-
text-decoration: none;
|
2747 |
-
}
|
2748 |
-
.alm-dir-listing li i{
|
2749 |
-
color: #999;
|
2750 |
-
padding: 0 5px 0 0;
|
2751 |
-
}
|
2752 |
-
|
2753 |
-
.cache-page-title{
|
2754 |
-
font-size: 14px;
|
2755 |
-
display: block;
|
2756 |
-
width: 100%;
|
2757 |
-
padding: 0 0 10px 12px;
|
2758 |
-
font-weight: 600;
|
2759 |
-
}
|
2760 |
-
|
2761 |
-
.cache-page-wrap{
|
2762 |
-
padding: 0 15px 15px;
|
2763 |
-
}
|
2764 |
-
|
2765 |
-
.alm-dir-listing ul.cache-details{
|
2766 |
display: block;
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
background: none;
|
2775 |
-
padding: 6px 4px 6px;
|
2776 |
-
color: #333;
|
2777 |
}
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
background-color: #fefeed;
|
2788 |
-
border: 1px solid #efefef;
|
2789 |
-
padding: 10px;
|
2790 |
-
display: block;
|
2791 |
-
color: #222;
|
2792 |
-
}
|
2793 |
-
.cache-cleared{
|
2794 |
-
margin: 0 0 20px;
|
2795 |
-
background-color: #e0f5ff;
|
2796 |
-
border-color: #bad0da;
|
2797 |
-
color: #666;
|
2798 |
-
i{
|
2799 |
-
color: #111;
|
2800 |
-
margin: 0 5px 0 0;
|
2801 |
-
}
|
2802 |
-
.remove{
|
2803 |
-
float: right;
|
2804 |
-
font-size: 12px;
|
2805 |
-
font-weight: 600;
|
2806 |
-
}
|
2807 |
-
}
|
2808 |
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2843 |
}
|
2844 |
}
|
2845 |
|
166 |
}
|
167 |
}
|
168 |
}
|
169 |
+
|
170 |
+
|
171 |
// File location on Theme Repeaters
|
172 |
.ajax-load-more .file-location{
|
173 |
border: 1px solid #e1e1e1;
|
177 |
line-height: 1;
|
178 |
display: flex;
|
179 |
flex-wrap: nowrap;
|
180 |
+
font-family: Consolas,monaco,monospace;
|
181 |
border-radius: 3px;
|
182 |
p, code {
|
183 |
padding: 12px 16px;
|
602 |
.ajax-load-more p.warning-callout strong{
|
603 |
display: inline-block;
|
604 |
font-weight: normal;
|
605 |
+
font-family: Consolas,monaco,monospace;
|
606 |
background-color: #edfbff;
|
607 |
color:#525c5f;
|
608 |
padding: 0 6px;
|
1026 |
.next-page-content,
|
1027 |
.acf-options,
|
1028 |
.masonry-options,
|
1029 |
+
.progress-bar-options,
|
1030 |
+
.hide-section{
|
1031 |
display: none;
|
1032 |
}
|
1033 |
|
2181 |
margin: 0 0 20px;
|
2182 |
overflow: visible;
|
2183 |
position: relative;
|
2184 |
+
box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045);
|
2185 |
+
|
2186 |
+
.alm-file-location{
|
2187 |
+
padding-top: 15px;
|
2188 |
+
margin-top: 15px;
|
2189 |
+
border-top: 1px solid #efefef;
|
2190 |
+
input{
|
2191 |
+
font-size: 12px;
|
2192 |
+
font-family: Consolas, monaco, monospace;
|
2193 |
+
background: #f7f7f7;
|
2194 |
+
border: 1px solid #e1e1e1;
|
2195 |
+
display: block;
|
2196 |
+
width: 100%;
|
2197 |
+
padding: 8px;
|
2198 |
+
margin: 0;
|
2199 |
+
color: #777;
|
2200 |
+
box-shadow: none !important;
|
2201 |
+
}
|
2202 |
+
}
|
2203 |
+
|
2204 |
}
|
2205 |
.ajax-load-more .cnkt-sidebar .cta-inner{
|
2206 |
padding: 20px;
|
2625 |
* @since 2.6.0
|
2626 |
*/
|
2627 |
|
2628 |
+
.alm-cache{
|
2629 |
+
|
2630 |
+
.generate-id{
|
2631 |
+
margin: 10px 0 0 !important;
|
2632 |
+
font-size: 12px !important;
|
2633 |
+
}
|
2634 |
+
.generate-cache-id i{
|
2635 |
+
margin: 0 5px 0 0;
|
2636 |
+
}
|
2637 |
+
|
2638 |
+
.row{
|
2639 |
+
&:first-of-type{
|
2640 |
+
margin-top: 0 !important;
|
2641 |
+
}
|
2642 |
+
}
|
2643 |
+
|
2644 |
+
/* Live Search */
|
2645 |
+
.alm-cache-search-wrap{
|
2646 |
+
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2647 |
display: block;
|
2648 |
+
margin: 0 0 10px;
|
2649 |
+
input{
|
2650 |
+
width: 100% !important;
|
2651 |
+
margin: 0 !important;
|
2652 |
+
padding: 12px;
|
2653 |
+
display: block;
|
2654 |
+
font-size: 16px;
|
|
|
|
|
|
|
2655 |
}
|
2656 |
+
i{
|
2657 |
+
position: absolute;
|
2658 |
+
right: 11px;
|
2659 |
+
top: 13px;
|
2660 |
+
color: #ccc;
|
2661 |
+
font-size: 20px;
|
2662 |
+
z-index: 1;
|
2663 |
+
}
|
2664 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2665 |
|
2666 |
+
/* Directory Listing */
|
2667 |
+
|
2668 |
+
.alm-dir-listing{
|
2669 |
+
border: 1px solid #e1e1e1;
|
2670 |
+
padding: 0;
|
2671 |
+
margin: 10px 0 0;
|
2672 |
+
&.theme-repeaters{
|
2673 |
+
padding: 15px;
|
2674 |
+
margin: 0;
|
2675 |
+
ul{
|
2676 |
+
border: none;
|
2677 |
+
padding: 0;
|
2678 |
+
margin: 0;
|
2679 |
+
}
|
2680 |
+
p.theme-title{
|
2681 |
+
font-weight: 600;
|
2682 |
+
margin: 0 0 15px;
|
2683 |
+
padding: 0 5px;
|
2684 |
+
}
|
2685 |
+
i{
|
2686 |
+
color: #ccc;
|
2687 |
+
font-size: 1.1em;
|
2688 |
+
}
|
2689 |
+
}
|
2690 |
+
}
|
2691 |
+
|
2692 |
+
.alm-dir-listing.deleting{
|
2693 |
+
opacity: 0.5;
|
2694 |
+
background: #fff url("../../img/loader-unlimited.gif") no-repeat center center;
|
2695 |
+
}
|
2696 |
+
|
2697 |
+
.alm-dir-listing .dir-title{
|
2698 |
+
margin: 0 0 5px;
|
2699 |
+
position: relative;
|
2700 |
+
}
|
2701 |
+
.ajax-load-more .alm-dir-listing h3.heading{
|
2702 |
+
padding-left: 40px !important;
|
2703 |
+
}
|
2704 |
+
.ajax-load-more .alm-dir-listing h3.heading:after {
|
2705 |
+
content: "\f07c";
|
2706 |
+
}
|
2707 |
+
.ajax-load-more .alm-dir-listing h3.heading.open:after {
|
2708 |
+
content: "\f07b";
|
2709 |
+
}
|
2710 |
+
.alm-dir-listing .dir-title .delete{
|
2711 |
+
position: absolute;
|
2712 |
+
right:8px;
|
2713 |
+
top:11px;
|
2714 |
+
font-weight: 400;
|
2715 |
+
font-size: 14px;
|
2716 |
+
text-decoration: none;
|
2717 |
+
padding: 5px 10px;
|
2718 |
+
border: 1px solid #e1e1e1;
|
2719 |
+
color: #ccc;
|
2720 |
+
-webkit-border-radius: 2px;
|
2721 |
+
-moz-border-radius: 2px;
|
2722 |
+
border-radius: 2px;
|
2723 |
+
}
|
2724 |
+
.alm-dir-listing:hover .dir-title .delete{
|
2725 |
+
border-color: #e1e1e1;
|
2726 |
+
background-color: #fff;
|
2727 |
+
color: #666;
|
2728 |
+
}
|
2729 |
+
.alm-dir-listing .dir-title .delete:hover{
|
2730 |
+
background-color: #c94141;
|
2731 |
+
border-color: #c94141;
|
2732 |
+
color: #fff;
|
2733 |
+
-webkit-box-shadow: 0 0 3px #ccc;
|
2734 |
+
-moz-box-shadow: 0 0 3px #ccc;
|
2735 |
+
box-shadow: 0 0 3px #ccc;
|
2736 |
+
}
|
2737 |
+
.alm-dir-listing .dir-title .delete:active{
|
2738 |
+
-webkit-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2739 |
+
-moz-box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2740 |
+
box-shadow: inset 0 2px 1px rgba(0, 0, 0, 0.2);
|
2741 |
+
}
|
2742 |
+
.alm-dir-listing ul{
|
2743 |
+
padding: 20px 0 0;
|
2744 |
+
margin: 10px 0 0;
|
2745 |
+
border-top: 1px solid #efefef;
|
2746 |
+
}
|
2747 |
+
.alm-dir-listing ul li{
|
2748 |
+
margin: 0 -2px;
|
2749 |
+
padding: 7px 0 7px 40px;
|
2750 |
+
display: inline-block;
|
2751 |
+
vertical-align: top;
|
2752 |
+
overflow: hidden;
|
2753 |
+
width: 47%;
|
2754 |
+
font-size: 14px;
|
2755 |
+
background: transparent url(../../img/directory-list.gif) no-repeat left center;
|
2756 |
+
}
|
2757 |
+
.alm-dir-listing.theme-repeaters ul li{
|
2758 |
+
display: block;
|
2759 |
+
width: 100%;
|
2760 |
+
padding-top: 12px;
|
2761 |
+
}
|
2762 |
+
.alm-dir-listing.theme-repeaters ul li label{
|
2763 |
+
display: block;
|
2764 |
+
width: 100%;
|
2765 |
+
}
|
2766 |
+
|
2767 |
+
.alm-dir-listing ul li:last-child,
|
2768 |
+
.alm-dir-listing ul li:nth-last-child(2){
|
2769 |
+
background-image: url(../../img/directory-list-btm.gif);
|
2770 |
+
}
|
2771 |
+
.alm-dir-listing.theme-repeaters ul li:nth-last-child(2){
|
2772 |
+
background: transparent url(../../img/directory-list.gif) no-repeat left center;
|
2773 |
+
}
|
2774 |
+
.alm-dir-listing ul li a{
|
2775 |
+
text-decoration: none;
|
2776 |
+
}
|
2777 |
+
.alm-dir-listing li i{
|
2778 |
+
color: #999;
|
2779 |
+
padding: 0 5px 0 0;
|
2780 |
+
}
|
2781 |
+
|
2782 |
+
.cache-page-title{
|
2783 |
+
font-size: 14px;
|
2784 |
+
display: block;
|
2785 |
+
width: 100%;
|
2786 |
+
padding: 0 7px 10px;
|
2787 |
+
font-weight: 600;
|
2788 |
+
}
|
2789 |
+
|
2790 |
+
.cache-page-wrap{
|
2791 |
+
padding: 0 10px 15px;
|
2792 |
+
}
|
2793 |
+
|
2794 |
+
.alm-dir-listing ul.cache-details{
|
2795 |
+
display: block;
|
2796 |
+
padding: 10px 10px;
|
2797 |
+
margin: 0;
|
2798 |
+
border: none;
|
2799 |
+
}
|
2800 |
+
.alm-dir-listing ul.cache-details li{
|
2801 |
+
display: block;
|
2802 |
+
width: 100%;
|
2803 |
+
background: none;
|
2804 |
+
padding: 6px 4px 6px;
|
2805 |
+
color: #333;
|
2806 |
+
}
|
2807 |
+
.alm-dir-listing ul.cache-details li i{
|
2808 |
+
color: #ccc;
|
2809 |
+
font-size: 18px;
|
2810 |
+
position: relative;
|
2811 |
+
top:1px;
|
2812 |
+
}
|
2813 |
+
|
2814 |
+
.dir-empty,
|
2815 |
+
.cache-cleared{
|
2816 |
+
background-color: $yellow;
|
2817 |
+
border: 1px solid $yellow_dark;
|
2818 |
+
padding: 20px;
|
2819 |
+
display: block;
|
2820 |
+
color: #222;
|
2821 |
+
text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2);
|
2822 |
+
}
|
2823 |
+
.cache-cleared{
|
2824 |
+
margin: 0 0 20px;
|
2825 |
+
background-color: #e0f5ff;
|
2826 |
+
border-color: #bad0da;
|
2827 |
+
color: #666;
|
2828 |
+
i{
|
2829 |
+
color: #111;
|
2830 |
+
margin: 0 5px 0 0;
|
2831 |
+
}
|
2832 |
+
.remove{
|
2833 |
+
float: right;
|
2834 |
+
font-size: 12px;
|
2835 |
+
font-weight: 600;
|
2836 |
+
}
|
2837 |
+
}
|
2838 |
+
|
2839 |
+
.cnkt-sidebar .item{
|
2840 |
+
padding: 20px;
|
2841 |
+
display: block;
|
2842 |
+
}
|
2843 |
+
p.cache-stats{
|
2844 |
+
min-height: 38px;
|
2845 |
+
line-height: 37px;
|
2846 |
+
display: block;
|
2847 |
+
padding: 0;
|
2848 |
+
margin: 0;
|
2849 |
+
span{
|
2850 |
+
display: inline-block;
|
2851 |
+
width: 38px;
|
2852 |
+
height: 38px;
|
2853 |
+
line-height: 36px;
|
2854 |
+
text-align: center;
|
2855 |
+
margin: 0 9px 0 0;
|
2856 |
+
font-weight: 700;
|
2857 |
+
font-size: 15px;
|
2858 |
+
-webkit-border-radius: 2px;
|
2859 |
+
-moz-border-radius:2px;
|
2860 |
+
border-radius: 2px;
|
2861 |
+
background: #a4a5e2;
|
2862 |
+
background: -moz-linear-gradient(top, #a4a5e2 0%, #9ea0d9 50%, #8d8fce 51%, #a4a5e2 100%);
|
2863 |
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#a4a5e2), color-stop(50%,#9ea0d9), color-stop(51%,#8d8fce), color-stop(100%,#a4a5e2));
|
2864 |
+
background: -webkit-linear-gradient(top, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
|
2865 |
+
background: -o-linear-gradient(top, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
|
2866 |
+
background: -ms-linear-gradient(top, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
|
2867 |
+
background: linear-gradient(to bottom, #a4a5e2 0%,#9ea0d9 50%,#8d8fce 51%,#a4a5e2 100%);
|
2868 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a4a5e2', endColorstr='#a4a5e2',GradientType=0 );
|
2869 |
+
border: 1px solid #8586be;
|
2870 |
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
2871 |
+
color: #fff;
|
2872 |
+
text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.1);
|
2873 |
+
}
|
2874 |
}
|
2875 |
}
|
2876 |
|
admin/src/scss/partials/_alm-settings-feedback.scss
CHANGED
@@ -1,35 +1,40 @@
|
|
1 |
.alm-settings-feedback{
|
2 |
position: fixed;
|
3 |
bottom: 20px;
|
4 |
-
right:
|
5 |
width: auto;
|
6 |
height: auto;
|
7 |
-
background: #
|
8 |
-
|
9 |
-
|
|
|
10 |
line-height: 1;
|
11 |
z-index: 9999;
|
12 |
border-radius: 2px;
|
13 |
opacity: 0;
|
14 |
visibility: hidden;
|
15 |
-
transition: all 0.2s ease;
|
16 |
-
box-shadow: 0
|
|
|
17 |
&.--saving{
|
18 |
-
|
19 |
opacity: 1;
|
20 |
visibility: visible;
|
|
|
21 |
}
|
22 |
&.--saved{
|
23 |
opacity: 1;
|
24 |
visibility: visible;
|
|
|
25 |
}
|
26 |
&.--error{
|
27 |
-
|
28 |
opacity: 1;
|
29 |
visibility: visible;
|
|
|
30 |
}
|
31 |
i{
|
32 |
-
opacity: 0.
|
33 |
margin: 0 3px 0 0;
|
34 |
}
|
35 |
}
|
1 |
.alm-settings-feedback{
|
2 |
position: fixed;
|
3 |
bottom: 20px;
|
4 |
+
right: 25px;
|
5 |
width: auto;
|
6 |
height: auto;
|
7 |
+
background: #fff;
|
8 |
+
border-left: 5px solid #5cc583;
|
9 |
+
color: #444;
|
10 |
+
padding: 25px 30px 25px 25px;
|
11 |
line-height: 1;
|
12 |
z-index: 9999;
|
13 |
border-radius: 2px;
|
14 |
opacity: 0;
|
15 |
visibility: hidden;
|
16 |
+
transition: all 0.2s ease-in-out;
|
17 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
|
18 |
+
font-size: 13px;
|
19 |
&.--saving{
|
20 |
+
border-color: #e0bd5e;
|
21 |
opacity: 1;
|
22 |
visibility: visible;
|
23 |
+
bottom: 25px;
|
24 |
}
|
25 |
&.--saved{
|
26 |
opacity: 1;
|
27 |
visibility: visible;
|
28 |
+
bottom: 25px;
|
29 |
}
|
30 |
&.--error{
|
31 |
+
border-color: #e03e3e;
|
32 |
opacity: 1;
|
33 |
visibility: visible;
|
34 |
+
bottom: 25px;
|
35 |
}
|
36 |
i{
|
37 |
+
opacity: 0.6;
|
38 |
margin: 0 3px 0 0;
|
39 |
}
|
40 |
}
|
admin/src/scss/partials/_header.scss
CHANGED
@@ -3,12 +3,16 @@
|
|
3 |
padding: $gutter $gutter $gutter/2;
|
4 |
background: #f7f7f7;
|
5 |
border-bottom: 1px solid #e1e1e1;
|
|
|
|
|
|
|
6 |
h1{
|
7 |
padding: 0 0 0 58px;
|
8 |
min-height: 48px;
|
9 |
padding-top: 0;
|
10 |
background: url('../../img/alm-logo-48x48.png') no-repeat 0 0;
|
11 |
background: url('../../img/alm-logo-48x48.svg') no-repeat 0 0;
|
|
|
12 |
em{
|
13 |
display: block;
|
14 |
position: relative;
|
3 |
padding: $gutter $gutter $gutter/2;
|
4 |
background: #f7f7f7;
|
5 |
border-bottom: 1px solid #e1e1e1;
|
6 |
+
position: relative;
|
7 |
+
z-index: 1;
|
8 |
+
box-shadow: 0 1px 12px 2px rgba(0, 0, 0, 0.045);
|
9 |
h1{
|
10 |
padding: 0 0 0 58px;
|
11 |
min-height: 48px;
|
12 |
padding-top: 0;
|
13 |
background: url('../../img/alm-logo-48x48.png') no-repeat 0 0;
|
14 |
background: url('../../img/alm-logo-48x48.svg') no-repeat 0 0;
|
15 |
+
font-size: 22px;
|
16 |
em{
|
17 |
display: block;
|
18 |
position: relative;
|
admin/views/settings.php
CHANGED
@@ -12,35 +12,10 @@
|
|
12 |
|
13 |
<div class="ajax-load-more-inner-wrapper">
|
14 |
|
15 |
-
<div class="cnkt-main">
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
if(!isset($alm_share_notification) || empty($alm_share_notification)){
|
20 |
-
// If transient has not been set - display this notice.
|
21 |
-
?>
|
22 |
-
<div class="group alm-notification alm-notification--blue">
|
23 |
-
<h2><span>👋</span>Thank you for installing Ajax Load More!</h2>
|
24 |
-
<p class="opening">I hope you're finding the plugin easy to use and a nice feature addition to your website.</p>
|
25 |
-
<p>If so, would you consider helping <a href="https://twitter.com/KaptonKaos" target="_blank">me</a> widen the reach of Ajax Load More by sharing with your networks and/or leaving a review.</p>
|
26 |
-
<ul class="share">
|
27 |
-
<li class="twitter">
|
28 |
-
<a target="blank" title="Share on Twitter" href="//twitter.com/home?status=I'm infinite scrolling with Ajax Load More for %23WordPress - https://connekthq.com/plugins/ajax-load-more/" class="share-twitter"><i class="fa fa-twitter"></i> Twitter</a>
|
29 |
-
</li>
|
30 |
-
<li class="facebook">
|
31 |
-
<a target="blank" title="Share on Facebook" href="//facebook.com/share.php?u=https://connekthq.com/plugins/ajax-load-more/" class="share-facebook"><i class="fa fa-facebook"></i> Facebook</a>
|
32 |
-
</li>
|
33 |
-
<li class="review">
|
34 |
-
<a target="blank" title="Leave a Review" href="//wordpress.org/support/plugin/ajax-load-more/reviews/" class="share-review"><i class="fa fa-pencil"></i> Leave Review</a>
|
35 |
-
</li>
|
36 |
-
</ul>
|
37 |
-
<div class="clear"></div>
|
38 |
-
<a href="javascript: void(0);" class="dismiss alm-notification--dismiss" id="alm_dismiss_sharing" title="<?php _e('Don\'t show me this again!', 'ajax-load-more');?>">×</a>
|
39 |
-
|
40 |
-
</div>
|
41 |
-
<?php } ?>
|
42 |
-
|
43 |
-
|
44 |
<?php
|
45 |
if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
|
46 |
?>
|
12 |
|
13 |
<div class="ajax-load-more-inner-wrapper">
|
14 |
|
15 |
+
<div class="cnkt-main">
|
16 |
+
|
17 |
+
<?php // include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
|
18 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
<?php
|
20 |
if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
|
21 |
?>
|
ajax-load-more.php
CHANGED
@@ -7,15 +7,14 @@ Text Domain: ajax-load-more
|
|
7 |
Author: Darren Cooney
|
8 |
Twitter: @KaptonKaos
|
9 |
Author URI: https://connekthq.com
|
10 |
-
Version: 3.
|
11 |
License: GPL
|
12 |
Copyright: Darren Cooney & Connekt Media
|
13 |
-
|
14 |
*/
|
15 |
|
16 |
|
17 |
-
define('ALM_VERSION', '3.
|
18 |
-
define('ALM_RELEASE', '
|
19 |
define('ALM_STORE_URL', 'https://connekthq.com');
|
20 |
|
21 |
|
@@ -108,6 +107,8 @@ if( !class_exists('AjaxLoadMore') ):
|
|
108 |
add_action( 'wp_ajax_nopriv_alm_query_total', array(&$this, 'alm_query_total') );
|
109 |
add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
|
110 |
add_action( 'after_setup_theme', array(&$this, 'alm_image_sizes') );
|
|
|
|
|
111 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links') );
|
112 |
add_filter( 'plugin_row_meta', array(&$this, 'alm_plugin_meta_links'), 10, 2 );
|
113 |
add_shortcode( 'ajax_load_more', array(&$this, 'alm_shortcode') );
|
@@ -118,6 +119,82 @@ if( !class_exists('AjaxLoadMore') ):
|
|
118 |
|
119 |
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
/*
|
122 |
* alm_get_repeater_base_path
|
123 |
* Get absolute path to repeater directory base
|
@@ -149,49 +226,13 @@ if( !class_exists('AjaxLoadMore') ):
|
|
149 |
|
150 |
// Check again after creating it (permission checker)
|
151 |
if( !is_dir($dir) ) {
|
152 |
-
echo __('Error creating repeater template directory', 'ajax-load-more');
|
153 |
-
echo ' - '. $dir;
|
154 |
}
|
155 |
}
|
156 |
}
|
157 |
|
158 |
|
159 |
|
160 |
-
/*
|
161 |
-
* alm_define_constants
|
162 |
-
* Define plugin constants
|
163 |
-
*
|
164 |
-
* @since 2.10.1
|
165 |
-
*/
|
166 |
-
|
167 |
-
public function alm_define_constants(){
|
168 |
-
|
169 |
-
define('ALM_PATH', plugin_dir_path(__FILE__));
|
170 |
-
define('ALM_URL', plugins_url('', __FILE__));
|
171 |
-
define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
|
172 |
-
define('ALM_NAME', '_ajax_load_more');
|
173 |
-
define('ALM_TITLE', 'Ajax Load More');
|
174 |
-
define('ALM_SLUG', 'ajax-load-more');
|
175 |
-
|
176 |
-
if (!defined('ALM_CACHE_ITEM_NAME')) define('ALM_CACHE_ITEM_NAME', '4878');
|
177 |
-
if (!defined('ALM_CTA_ITEM_NAME')) define('ALM_CTA_ITEM_NAME', '14456');
|
178 |
-
if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
|
179 |
-
if (!defined('ALM_UNLIMITED_ITEM_NAME')) define('ALM_UNLIMITED_ITEM_NAME', '3118');
|
180 |
-
if (!defined('ALM_FILTERS_ITEM_NAME')) define('ALM_FILTERS_ITEM_NAME', '35992');
|
181 |
-
if (!defined('ALM_LAYOUTS_ITEM_NAME')) define('ALM_LAYOUTS_ITEM_NAME', '11398');
|
182 |
-
if (!defined('ALM_NEXTPAGE_ITEM_NAME')) define('ALM_NEXTPAGE_ITEM_NAME', '24540');
|
183 |
-
if (!defined('ALM_PAGING_ITEM_NAME')) define('ALM_PAGING_ITEM_NAME', '6898');
|
184 |
-
if (!defined('ALM_PRELOADED_ITEM_NAME')) define('ALM_PRELOADED_ITEM_NAME', '4293');
|
185 |
-
if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
|
186 |
-
if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105'); // Deprecated
|
187 |
-
if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
|
188 |
-
if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
|
189 |
-
if (!defined('ALM_USERS_ITEM_NAME')) define('ALM_USERS_ITEM_NAME', '32311');
|
190 |
-
if (!defined('ALM_PRO_ITEM_NAME')) define('ALM_PRO_ITEM_NAME', '42166');
|
191 |
-
|
192 |
-
}
|
193 |
-
|
194 |
-
|
195 |
/*
|
196 |
* alm_includes
|
197 |
* Load these files before the theme loads
|
@@ -200,9 +241,11 @@ if( !class_exists('AjaxLoadMore') ):
|
|
200 |
*/
|
201 |
|
202 |
public function alm_includes(){
|
203 |
-
include_once( ALM_PATH . 'core/functions.php'); // Core Functions
|
204 |
-
include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Shortcode Class
|
205 |
-
include_once( ALM_PATH . 'core/classes/class.alm-enqueue.php'); // Enqueue Class
|
|
|
|
|
206 |
|
207 |
if( is_admin() ){
|
208 |
include_once('admin/editor/editor.php');
|
@@ -214,16 +257,16 @@ if( !class_exists('AjaxLoadMore') ):
|
|
214 |
}
|
215 |
}
|
216 |
}
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
/*
|
221 |
* alm_return_addons
|
222 |
* Returns add-on data (admin/admin-functions.php)
|
223 |
*
|
224 |
* @since 2.0.0
|
225 |
*/
|
226 |
-
|
227 |
public function alm_return_addons(){
|
228 |
return alm_get_addons();
|
229 |
}
|
@@ -300,7 +343,7 @@ if( !class_exists('AjaxLoadMore') ):
|
|
300 |
$dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
|
301 |
|
302 |
|
303 |
-
// Core ALM JS
|
304 |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
|
305 |
wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more'. $suffix .'.js', __FILE__ ), $dependencies, ALM_VERSION, true );
|
306 |
|
@@ -377,8 +420,6 @@ if( !class_exists('AjaxLoadMore') ):
|
|
377 |
|
378 |
public function alm_query_posts() {
|
379 |
|
380 |
-
$options = get_option( 'alm_settings' );
|
381 |
-
|
382 |
// WPML fix for category/tag/taxonomy archives
|
383 |
if ( (isset( $_GET['category'] ) && $_GET['category']) || (isset($_GET['taxonomy']) && $_GET['taxonomy']) ) {
|
384 |
unset($_REQUEST['post_id']);
|
@@ -389,8 +430,11 @@ if( !class_exists('AjaxLoadMore') ):
|
|
389 |
$slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
|
390 |
$canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
|
391 |
|
|
|
392 |
$queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
|
393 |
|
|
|
|
|
394 |
$cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
|
395 |
$cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
|
396 |
$do_create_cache = true;
|
@@ -398,70 +442,18 @@ if( !class_exists('AjaxLoadMore') ):
|
|
398 |
$do_create_cache = false;
|
399 |
}
|
400 |
|
|
|
|
|
|
|
|
|
|
|
401 |
$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
|
402 |
$type = alm_get_repeater_type($repeater);
|
403 |
$theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';
|
404 |
|
|
|
|
|
405 |
$postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
|
406 |
-
$post_format = (isset($_GET['post_format'])) ? $_GET['post_format'] : '';
|
407 |
-
|
408 |
-
$category = (isset($_GET['category'])) ? $_GET['category'] : '';
|
409 |
-
$category__not_in = (isset($_GET['category__not_in'])) ? $_GET['category__not_in'] : '';
|
410 |
-
$tag = (isset($_GET['tag'])) ? $_GET['tag'] : '';
|
411 |
-
$tag__not_in = (isset($_GET['tag__not_in'])) ? $_GET['tag__not_in'] : '';
|
412 |
-
|
413 |
-
// Taxonomy
|
414 |
-
$taxonomy = (isset($_GET['taxonomy'])) ? $_GET['taxonomy'] : '';
|
415 |
-
$taxonomy_terms = (isset($_GET['taxonomy_terms'])) ? $_GET['taxonomy_terms'] : '';
|
416 |
-
$taxonomy_operator = (isset($_GET['taxonomy_operator'])) ? $_GET['taxonomy_operator'] : '';
|
417 |
-
if(empty($taxonomy_operator)) $taxonomy_operator = 'IN';
|
418 |
-
$taxonomy_relation = (isset($_GET['taxonomy_relation'])) ? $_GET['taxonomy_relation'] : 'AND';
|
419 |
-
if($taxonomy_relation == '') $taxonomy_relation = 'AND';
|
420 |
-
|
421 |
-
// Date
|
422 |
-
$year = (isset($_GET['year'])) ? $_GET['year'] : '';
|
423 |
-
$month = (isset($_GET['month'])) ? $_GET['month'] : '';
|
424 |
-
$day = (isset($_GET['day'])) ? $_GET['day'] : '';
|
425 |
-
|
426 |
-
// Custom Fields
|
427 |
-
$meta_key = (isset($_GET['meta_key'])) ? $_GET['meta_key'] : '';
|
428 |
-
$meta_value = (isset($_GET['meta_value'])) ? $_GET['meta_value'] : '';
|
429 |
-
$meta_compare = (isset($_GET['meta_compare'])) ? $_GET['meta_compare'] : '';
|
430 |
-
if($meta_compare == '') $meta_compare = 'IN';
|
431 |
-
if($meta_compare === 'lessthan') $meta_compare = '<'; // do_shortcode fix (shortcode was rendering as HTML)
|
432 |
-
if($meta_compare === 'lessthanequalto') $meta_compare = '<='; // do_shortcode fix (shortcode was rendering as HTML)
|
433 |
-
$meta_relation = (isset($_GET['meta_relation'])) ? $_GET['meta_relation'] : '';
|
434 |
-
if($meta_relation == '') $meta_relation = 'AND';
|
435 |
-
$meta_type = (isset($_GET['meta_type'])) ? $_GET['meta_type'] : '';
|
436 |
-
if($meta_type == '') $meta_type = 'CHAR';
|
437 |
-
|
438 |
-
$s = (isset($_GET['search'])) ? sanitize_text_field($_GET['search']) : '';
|
439 |
-
$custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
|
440 |
-
|
441 |
-
// Author
|
442 |
-
$author = (isset($_GET['author'])) ? $_GET['author'] : '';
|
443 |
-
|
444 |
-
// Ordering
|
445 |
-
$order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
|
446 |
-
$orderby = (isset($_GET['orderby'])) ? $_GET['orderby'] : 'date';
|
447 |
-
|
448 |
-
// Sticky, Include, Exclude, Offset, Status
|
449 |
-
$sticky = (isset($_GET['sticky_posts'])) ? $_GET['sticky_posts'] : '';
|
450 |
-
$sticky = ($sticky === 'true') ? true : false;
|
451 |
-
$post__in = (isset($_GET['post__in'])) ? $_GET['post__in'] : '';
|
452 |
-
$post__not_in = (isset($_GET['post__not_in'])) ? $_GET['post__not_in'] : '';
|
453 |
-
$exclude = (isset($_GET['exclude'])) ? $_GET['exclude'] : '';
|
454 |
-
$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
|
455 |
-
$post_status = (isset($_GET['post_status'])) ? $_GET['post_status'] : '';
|
456 |
-
if($post_status == '') $post_status = 'publish';
|
457 |
-
if($post_status != 'publish' && $post_status != 'inherit'){
|
458 |
-
// If not 'publish', OR 'inherit' confirm user has rights to view these old posts.
|
459 |
-
if (current_user_can( 'edit_theme_options' )){
|
460 |
-
$post_status = $post_status;
|
461 |
-
} else {
|
462 |
-
$post_status = 'publish';
|
463 |
-
}
|
464 |
-
}
|
465 |
|
466 |
|
467 |
// Page Parameters
|
@@ -479,6 +471,10 @@ if( !class_exists('AjaxLoadMore') ):
|
|
479 |
}
|
480 |
|
481 |
|
|
|
|
|
|
|
|
|
482 |
// Preload Add-on
|
483 |
$preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
|
484 |
$preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
|
@@ -516,212 +512,20 @@ if( !class_exists('AjaxLoadMore') ):
|
|
516 |
}
|
517 |
|
518 |
|
519 |
-
// Paging Add-on
|
520 |
-
$paging = (isset($_GET['paging'])) ? $_GET['paging'] : false;
|
521 |
-
|
522 |
-
|
523 |
// SEO Add-on
|
524 |
$seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
|
525 |
|
526 |
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
// Set up initial query arguments
|
532 |
-
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
533 |
-
$args = array(
|
534 |
-
'post_type' => $postType,
|
535 |
-
'posts_per_page' => $posts_per_page,
|
536 |
-
'offset' => $offset + ($posts_per_page*$page),
|
537 |
-
'order' => $order,
|
538 |
-
'orderby' => $orderby,
|
539 |
-
'post_status' => $post_status,
|
540 |
-
'ignore_sticky_posts' => true,
|
541 |
-
'paged' => $paged,
|
542 |
-
);
|
543 |
-
|
544 |
-
|
545 |
-
// Post Format & Taxonomy
|
546 |
-
// - Both use tax_query, so we combine these queries
|
547 |
-
if(!empty($post_format) || !empty($taxonomy)){
|
548 |
-
|
549 |
-
$tax_query_total = count(explode(":", $taxonomy)); // Total $taxonomy objects
|
550 |
-
$taxonomy = explode(":", $taxonomy); // convert to array
|
551 |
-
$taxonomy_terms = explode(":", $taxonomy_terms); // convert to array
|
552 |
-
$taxonomy_operator = explode(":", $taxonomy_operator); // convert to array
|
553 |
-
|
554 |
-
if(empty($taxonomy)){
|
555 |
-
|
556 |
-
// Post Format only
|
557 |
-
$args['tax_query'] = array(
|
558 |
-
alm_get_post_format($post_format),
|
559 |
-
);
|
560 |
-
|
561 |
-
}else{
|
562 |
-
|
563 |
-
// Post Formats
|
564 |
-
$args['tax_query'] = array(
|
565 |
-
'relation' => $taxonomy_relation,
|
566 |
-
alm_get_post_format( $post_format )
|
567 |
-
);
|
568 |
-
|
569 |
-
// Loop Taxonomies
|
570 |
-
for($tax_i = 0; $tax_i < $tax_query_total; $tax_i++){
|
571 |
-
$args['tax_query'][] = alm_get_taxonomy_query($taxonomy[$tax_i], $taxonomy_terms[$tax_i], $taxonomy_operator[$tax_i]);
|
572 |
-
}
|
573 |
-
}
|
574 |
-
|
575 |
-
}
|
576 |
-
|
577 |
-
// Category
|
578 |
-
if(!empty($category)){
|
579 |
-
$args['category_name'] = $category;
|
580 |
-
}
|
581 |
-
|
582 |
-
// Category Not In
|
583 |
-
if(!empty($category__not_in)){
|
584 |
-
$exclude_cats = explode(",",$category__not_in);
|
585 |
-
$args['category__not_in'] = $exclude_cats;
|
586 |
-
}
|
587 |
-
|
588 |
-
// Tag
|
589 |
-
if(!empty($tag)){
|
590 |
-
$args['tag'] = $tag;
|
591 |
-
}
|
592 |
-
|
593 |
-
// Tag Not In
|
594 |
-
if(!empty($tag__not_in)){
|
595 |
-
$exclude_tags = explode(",",$tag__not_in);
|
596 |
-
$args['tag__not_in'] = $exclude_tags;
|
597 |
-
}
|
598 |
-
|
599 |
-
// Date (not using date_query as there was issue with year/month archives)
|
600 |
-
if(!empty($year)){
|
601 |
-
$args['year'] = $year;
|
602 |
-
}
|
603 |
-
if(!empty($month)){
|
604 |
-
$args['monthnum'] = $month;
|
605 |
-
}
|
606 |
-
if(!empty($day)){
|
607 |
-
$args['day'] = $day;
|
608 |
-
}
|
609 |
-
|
610 |
-
// Meta Query
|
611 |
-
if(!empty($meta_key) && !empty($meta_value) || !empty($meta_key) && $meta_compare !== "IN"){
|
612 |
-
|
613 |
-
// Parse multiple meta query
|
614 |
-
$meta_query_total = count(explode(":", $meta_key)); // Total meta_query objects
|
615 |
-
$meta_keys = explode(":", $meta_key); // convert to array
|
616 |
-
$meta_value = explode(":", $meta_value); // convert to array
|
617 |
-
$meta_compare = explode(":", $meta_compare); // convert to array
|
618 |
-
$meta_type = explode(":", $meta_type); // convert to array
|
619 |
-
|
620 |
-
// Loop Meta Query
|
621 |
-
$args['meta_query'] = array(
|
622 |
-
'relation' => $meta_relation
|
623 |
-
);
|
624 |
-
for($mq_i = 0; $mq_i < $meta_query_total; $mq_i++){
|
625 |
-
$args['meta_query'][] = alm_get_meta_query($meta_keys[$mq_i], $meta_value[$mq_i], $meta_compare[$mq_i], $meta_type[$mq_i]);
|
626 |
-
}
|
627 |
-
|
628 |
-
}
|
629 |
-
|
630 |
-
// Meta_key
|
631 |
-
if(!empty($meta_key)){ // ordering by meta value
|
632 |
-
if (strpos($orderby, 'meta_value') !== false) { // Only order by meta_key, if $orderby is set to meta_value{_num}
|
633 |
-
$meta_key_single = explode(":", $meta_key);
|
634 |
-
$args['meta_key'] = $meta_key_single[0];
|
635 |
-
}
|
636 |
-
}
|
637 |
-
|
638 |
-
// Author
|
639 |
-
if(!empty($author)){
|
640 |
-
$args['author'] = $author;
|
641 |
-
}
|
642 |
-
|
643 |
-
// Include Posts
|
644 |
-
if(!empty($post__in)){
|
645 |
-
$post__in = explode(",",$post__in);
|
646 |
-
$args['post__in'] = $post__in;
|
647 |
-
}
|
648 |
-
|
649 |
-
// Exclude Posts
|
650 |
-
if(!empty($post__not_in)){
|
651 |
-
$post__not_in = explode(",",$post__not_in);
|
652 |
-
$args['post__not_in'] = $post__not_in;
|
653 |
-
}
|
654 |
-
if(!empty($exclude)){ // Deprecate this soon - 2.8.5 */
|
655 |
-
$exclude = explode(",",$exclude);
|
656 |
-
$args['post__not_in'] = $exclude;
|
657 |
-
}
|
658 |
-
|
659 |
-
// Search Term
|
660 |
-
if(!empty($s)){
|
661 |
-
$args['s'] = $s;
|
662 |
-
}
|
663 |
-
|
664 |
-
// Custom Args
|
665 |
-
if(!empty($custom_args)){
|
666 |
-
$custom_args_array = explode(";",$custom_args); // Split the $custom_args at ','
|
667 |
-
foreach($custom_args_array as $argument){ // Loop each $argument
|
668 |
-
|
669 |
-
$argument = preg_replace('/\s+/', '', $argument); // Remove all whitespace
|
670 |
-
$argument = explode(":",$argument); // Split the $argument at ':'
|
671 |
-
$argument_arr = explode(",", $argument[1]); // explode $argument[1] at ','
|
672 |
-
if(sizeof($argument_arr) > 1){
|
673 |
-
$args[$argument[0]] = $argument_arr;
|
674 |
-
}else{
|
675 |
-
$args[$argument[0]] = $argument[1];
|
676 |
-
}
|
677 |
-
}
|
678 |
-
}
|
679 |
-
|
680 |
-
// Language
|
681 |
-
if(!empty($lang)){
|
682 |
-
$args['lang'] = $lang;
|
683 |
-
}
|
684 |
-
|
685 |
-
// Sticky Posts
|
686 |
-
if($sticky){
|
687 |
-
$sticky_posts = get_option( 'sticky_posts' ); // Get all sticky post ids
|
688 |
-
|
689 |
-
$sticky_query_args = $args;
|
690 |
-
$sticky_query_args['post__not_in'] = $sticky_posts;
|
691 |
-
$sticky_query_args['posts_per_page'] = -1;
|
692 |
-
$sticky_query_args['fields'] = 'ids';
|
693 |
-
|
694 |
-
$sticky_query = new WP_Query($sticky_query_args); // Query all non sticky posts
|
695 |
-
|
696 |
-
// If has sticky and regular posts
|
697 |
-
if($sticky_posts && $sticky_query->posts){
|
698 |
-
$standard_posts = $sticky_query->posts;
|
699 |
-
if($standard_posts){
|
700 |
-
$sticky_ids = array_merge($sticky_posts, $standard_posts); // merge regular posts with sticky
|
701 |
-
$args['post__in'] = $sticky_ids;
|
702 |
-
$args['orderby'] = 'post__in'; // set orderby to order by post__in.
|
703 |
-
}
|
704 |
-
}
|
705 |
-
}
|
706 |
-
|
707 |
-
// Advanced Custom Fields
|
708 |
-
if(!empty($acf) && !empty($acf_post_id) && !empty($acf_field_type) && !empty($acf_field_name)){
|
709 |
-
if($acf_field_type === 'relationship'){ // Relationship Field
|
710 |
-
$acf_post_ids = get_field($acf_field_name, $acf_post_id); // Get field value from ACF
|
711 |
-
if($acf_post_ids){
|
712 |
-
$args['post__in'] = $acf_post_ids;
|
713 |
-
} else {
|
714 |
-
$args['post__in'] = array(0);
|
715 |
-
}
|
716 |
-
}
|
717 |
-
}
|
718 |
|
719 |
|
720 |
// Get current page number for determining item number
|
721 |
$alm_page_count = ($page == 0) ? 1 : $page + 1;
|
722 |
|
723 |
|
724 |
-
|
725 |
/*
|
726 |
* alm_prev_post_args
|
727 |
*
|
@@ -810,13 +614,12 @@ if( !class_exists('AjaxLoadMore') ):
|
|
810 |
|
811 |
$cta_array = Array();
|
812 |
if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
|
813 |
-
$cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val);
|
814 |
}
|
815 |
|
816 |
ob_start();
|
817 |
|
818 |
// ALM Loop
|
819 |
-
|
820 |
while ($alm_query->have_posts()): $alm_query->the_post();
|
821 |
|
822 |
$alm_loop_count++;
|
@@ -849,7 +652,6 @@ if( !class_exists('AjaxLoadMore') ):
|
|
849 |
|
850 |
|
851 |
endwhile; wp_reset_query();
|
852 |
-
|
853 |
// End ALM Loop
|
854 |
|
855 |
$data = ob_get_clean();
|
@@ -941,6 +743,6 @@ if( !class_exists('AjaxLoadMore') ):
|
|
941 |
return $ajax_load_more;
|
942 |
}
|
943 |
// initialize
|
944 |
-
AjaxLoadMore();
|
945 |
|
946 |
endif; // class_exists check
|
7 |
Author: Darren Cooney
|
8 |
Twitter: @KaptonKaos
|
9 |
Author URI: https://connekthq.com
|
10 |
+
Version: 3.7.1
|
11 |
License: GPL
|
12 |
Copyright: Darren Cooney & Connekt Media
|
|
|
13 |
*/
|
14 |
|
15 |
|
16 |
+
define('ALM_VERSION', '3.7.1');
|
17 |
+
define('ALM_RELEASE', 'October 3, 2018');
|
18 |
define('ALM_STORE_URL', 'https://connekthq.com');
|
19 |
|
20 |
|
107 |
add_action( 'wp_ajax_nopriv_alm_query_total', array(&$this, 'alm_query_total') );
|
108 |
add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
|
109 |
add_action( 'after_setup_theme', array(&$this, 'alm_image_sizes') );
|
110 |
+
add_filter( 'alm_noscript', array(&$this, 'alm_noscript'), 10, 5 );
|
111 |
+
add_filter( 'alm_noscript_pagination', array(&$this, 'alm_noscript_pagination'), 10, 2 );
|
112 |
add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array(&$this, 'alm_action_links') );
|
113 |
add_filter( 'plugin_row_meta', array(&$this, 'alm_plugin_meta_links'), 10, 2 );
|
114 |
add_shortcode( 'ajax_load_more', array(&$this, 'alm_shortcode') );
|
119 |
|
120 |
|
121 |
|
122 |
+
/*
|
123 |
+
* alm_define_constants
|
124 |
+
* Define plugin constants
|
125 |
+
*
|
126 |
+
* @since 2.10.1
|
127 |
+
*/
|
128 |
+
|
129 |
+
public function alm_define_constants(){
|
130 |
+
|
131 |
+
define('ALM_PATH', plugin_dir_path(__FILE__));
|
132 |
+
define('ALM_URL', plugins_url('', __FILE__));
|
133 |
+
define('ALM_ADMIN_URL', plugins_url('admin/', __FILE__));
|
134 |
+
define('ALM_NAME', '_ajax_load_more');
|
135 |
+
define('ALM_TITLE', 'Ajax Load More');
|
136 |
+
define('ALM_SLUG', 'ajax-load-more');
|
137 |
+
|
138 |
+
if (!defined('ALM_CACHE_ITEM_NAME')) define('ALM_CACHE_ITEM_NAME', '4878');
|
139 |
+
if (!defined('ALM_CTA_ITEM_NAME')) define('ALM_CTA_ITEM_NAME', '14456');
|
140 |
+
if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
|
141 |
+
if (!defined('ALM_UNLIMITED_ITEM_NAME')) define('ALM_UNLIMITED_ITEM_NAME', '3118');
|
142 |
+
if (!defined('ALM_FILTERS_ITEM_NAME')) define('ALM_FILTERS_ITEM_NAME', '35992');
|
143 |
+
if (!defined('ALM_LAYOUTS_ITEM_NAME')) define('ALM_LAYOUTS_ITEM_NAME', '11398');
|
144 |
+
if (!defined('ALM_NEXTPAGE_ITEM_NAME')) define('ALM_NEXTPAGE_ITEM_NAME', '24540');
|
145 |
+
if (!defined('ALM_PAGING_ITEM_NAME')) define('ALM_PAGING_ITEM_NAME', '6898');
|
146 |
+
if (!defined('ALM_PRELOADED_ITEM_NAME')) define('ALM_PRELOADED_ITEM_NAME', '4293');
|
147 |
+
if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
|
148 |
+
if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105'); // Deprecated
|
149 |
+
if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
|
150 |
+
if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
|
151 |
+
if (!defined('ALM_USERS_ITEM_NAME')) define('ALM_USERS_ITEM_NAME', '32311');
|
152 |
+
if (!defined('ALM_PRO_ITEM_NAME')) define('ALM_PRO_ITEM_NAME', '42166');
|
153 |
+
|
154 |
+
}
|
155 |
+
|
156 |
+
|
157 |
+
|
158 |
+
/*
|
159 |
+
* alm_noscript
|
160 |
+
* This function will build an query for users without JS enabled
|
161 |
+
*
|
162 |
+
* @return $return string
|
163 |
+
* @since 3.7
|
164 |
+
*/
|
165 |
+
function alm_noscript($args, $container_element, $css_classes = '', $transition_container_classes = ''){
|
166 |
+
if(is_admin()){
|
167 |
+
return false;
|
168 |
+
}
|
169 |
+
$return = '';
|
170 |
+
include_once( ALM_PATH . 'core/classes/class.alm-noscript.php'); // Load Noscript Class
|
171 |
+
$return = ALM_NOSCRIPT::alm_get_noscript($args, $container_element, $css_classes, $transition_container_classes);
|
172 |
+
|
173 |
+
return $return;
|
174 |
+
}
|
175 |
+
|
176 |
+
|
177 |
+
|
178 |
+
/*
|
179 |
+
* alm_noscript_pagination
|
180 |
+
* This function will build an pagination for users without JS enabled
|
181 |
+
*
|
182 |
+
* @return $return string
|
183 |
+
* @since 3.7
|
184 |
+
*/
|
185 |
+
function alm_noscript_pagination($query){
|
186 |
+
if(is_admin()){
|
187 |
+
return false;
|
188 |
+
}
|
189 |
+
$return = '';
|
190 |
+
include_once( ALM_PATH . 'core/classes/class.alm-noscript.php'); // Load Noscript Class
|
191 |
+
$return = ALM_NOSCRIPT::build_noscript_paging($query);
|
192 |
+
|
193 |
+
return '<noscript>'. $return .'</noscript>';
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
+
|
198 |
/*
|
199 |
* alm_get_repeater_base_path
|
200 |
* Get absolute path to repeater directory base
|
226 |
|
227 |
// Check again after creating it (permission checker)
|
228 |
if( !is_dir($dir) ) {
|
229 |
+
echo __('Error creating repeater template directory', 'ajax-load-more') . ' - '. $dir;
|
|
|
230 |
}
|
231 |
}
|
232 |
}
|
233 |
|
234 |
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
/*
|
237 |
* alm_includes
|
238 |
* Load these files before the theme loads
|
241 |
*/
|
242 |
|
243 |
public function alm_includes(){
|
244 |
+
include_once( ALM_PATH . 'core/functions.php'); // Load Core Functions
|
245 |
+
include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Load Shortcode Class
|
246 |
+
include_once( ALM_PATH . 'core/classes/class.alm-enqueue.php'); // Load Enqueue Class
|
247 |
+
include_once( ALM_PATH . 'core/classes/class.alm-queryargs.php'); // Load Query Args Class
|
248 |
+
include_once( ALM_PATH . 'core/classes/class.alm-localize.php'); // Load Localize Class
|
249 |
|
250 |
if( is_admin() ){
|
251 |
include_once('admin/editor/editor.php');
|
257 |
}
|
258 |
}
|
259 |
}
|
260 |
+
|
261 |
+
|
262 |
+
|
263 |
/*
|
264 |
* alm_return_addons
|
265 |
* Returns add-on data (admin/admin-functions.php)
|
266 |
*
|
267 |
* @since 2.0.0
|
268 |
*/
|
269 |
+
|
270 |
public function alm_return_addons(){
|
271 |
return alm_get_addons();
|
272 |
}
|
343 |
$dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
|
344 |
|
345 |
|
346 |
+
// Core ALM JS
|
347 |
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
|
348 |
wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more'. $suffix .'.js', __FILE__ ), $dependencies, ALM_VERSION, true );
|
349 |
|
420 |
|
421 |
public function alm_query_posts() {
|
422 |
|
|
|
|
|
423 |
// WPML fix for category/tag/taxonomy archives
|
424 |
if ( (isset( $_GET['category'] ) && $_GET['category']) || (isset($_GET['taxonomy']) && $_GET['taxonomy']) ) {
|
425 |
unset($_REQUEST['post_id']);
|
430 |
$slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
|
431 |
$canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
|
432 |
|
433 |
+
// Ajax Query Type
|
434 |
$queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
|
435 |
|
436 |
+
|
437 |
+
// Cache
|
438 |
$cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
|
439 |
$cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
|
440 |
$do_create_cache = true;
|
442 |
$do_create_cache = false;
|
443 |
}
|
444 |
|
445 |
+
// Offset
|
446 |
+
$offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
|
447 |
+
|
448 |
+
|
449 |
+
// Repeater Templates
|
450 |
$repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
|
451 |
$type = alm_get_repeater_type($repeater);
|
452 |
$theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';
|
453 |
|
454 |
+
|
455 |
+
// Post Type
|
456 |
$postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
|
458 |
|
459 |
// Page Parameters
|
471 |
}
|
472 |
|
473 |
|
474 |
+
// Paging Add-on
|
475 |
+
$paging = (isset($_GET['paging'])) ? $_GET['paging'] : 'false';
|
476 |
+
|
477 |
+
|
478 |
// Preload Add-on
|
479 |
$preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
|
480 |
$preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
|
512 |
}
|
513 |
|
514 |
|
|
|
|
|
|
|
|
|
515 |
// SEO Add-on
|
516 |
$seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
|
517 |
|
518 |
|
519 |
+
// Set up initial WP_Query $args
|
520 |
+
$args = ALM_QUERY_ARGS::alm_build_queryargs($_GET, true);
|
521 |
+
$args['paged'] = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
522 |
+
$args['offset'] = $offset + ($posts_per_page*$page);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
|
524 |
|
525 |
// Get current page number for determining item number
|
526 |
$alm_page_count = ($page == 0) ? 1 : $page + 1;
|
527 |
|
528 |
|
|
|
529 |
/*
|
530 |
* alm_prev_post_args
|
531 |
*
|
614 |
|
615 |
$cta_array = Array();
|
616 |
if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
|
617 |
+
$cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $paging);
|
618 |
}
|
619 |
|
620 |
ob_start();
|
621 |
|
622 |
// ALM Loop
|
|
|
623 |
while ($alm_query->have_posts()): $alm_query->the_post();
|
624 |
|
625 |
$alm_loop_count++;
|
652 |
|
653 |
|
654 |
endwhile; wp_reset_query();
|
|
|
655 |
// End ALM Loop
|
656 |
|
657 |
$data = ob_get_clean();
|
743 |
return $ajax_load_more;
|
744 |
}
|
745 |
// initialize
|
746 |
+
AjaxLoadMore();
|
747 |
|
748 |
endif; // class_exists check
|
core/classes/class.alm-localize.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ALM_LOCALIZE
|
4 |
+
* A class for adding localize ALM JS variables to the screen.
|
5 |
+
*
|
6 |
+
* @author Darren Cooney
|
7 |
+
* @since 3.7
|
8 |
+
*/
|
9 |
+
|
10 |
+
if (!defined( 'ABSPATH')){
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
if(!class_exists('ALM_LOCALIZE')):
|
15 |
+
|
16 |
+
class ALM_LOCALIZE {
|
17 |
+
|
18 |
+
|
19 |
+
static $vars = array();
|
20 |
+
|
21 |
+
/*
|
22 |
+
* add_localized_var
|
23 |
+
* Create <script> variables for use with Preloaded addon
|
24 |
+
*
|
25 |
+
* @param $key string
|
26 |
+
* @param $value string
|
27 |
+
* @return $array
|
28 |
+
* @return $position string (meta, param) This allows for nesting of params.
|
29 |
+
* @since 3.7
|
30 |
+
*/
|
31 |
+
public static function add_localized_var($key = '', $value = '', $id = 'ajax-load-more', $position = ''){
|
32 |
+
if($position){
|
33 |
+
self::$vars[$id][$position][$key] = $value; // Add key & val
|
34 |
+
} else {
|
35 |
+
self::$vars[$id][$key] = $value; // Add key & val
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
|
41 |
+
/*
|
42 |
+
* create_script_vars
|
43 |
+
* Create <script> variables for use with Preloaded addon
|
44 |
+
*
|
45 |
+
* @param $id string
|
46 |
+
* @param $vars array
|
47 |
+
* @since 3.7
|
48 |
+
*/
|
49 |
+
public static function create_script_vars($id){
|
50 |
+
if(!empty(self::$vars) && isset(self::$vars[$id]) && is_array(self::$vars[$id])){
|
51 |
+
|
52 |
+
// Add div ID to the start of array
|
53 |
+
self::$vars[$id] = array_merge(array('id' => $id), self::$vars[$id]);
|
54 |
+
|
55 |
+
// Render wp_localize_script vars with 'ajax-load-more' script handle.
|
56 |
+
wp_localize_script( 'ajax-load-more', alm_convert_dashes_to_underscore($id) .'_vars', self::$vars[$id] );
|
57 |
+
}
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
+
endif;
|
core/classes/class.alm-noscript.php
ADDED
@@ -0,0 +1,231 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* ALM_NOSCRIPT
|
4 |
+
* Class that generates a wp_query for injection into <noscript />.
|
5 |
+
*
|
6 |
+
* @author Darren Cooney
|
7 |
+
* @since 3.7
|
8 |
+
*/
|
9 |
+
|
10 |
+
if (!defined( 'ABSPATH')){
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
if(!class_exists('ALM_NOSCRIPT')):
|
15 |
+
|
16 |
+
class ALM_NOSCRIPT {
|
17 |
+
|
18 |
+
static $element = 'noscript';
|
19 |
+
|
20 |
+
|
21 |
+
/*
|
22 |
+
* alm_get_noscript
|
23 |
+
* This function will return a generated query for the noscript.
|
24 |
+
*
|
25 |
+
* @since 1.8
|
26 |
+
* @param $q array
|
27 |
+
* @param $container string
|
28 |
+
* @return <noscript>
|
29 |
+
*/
|
30 |
+
public static function alm_get_noscript($q, $container = 'ul', $css_classes = '', $transition_container_classes = ''){
|
31 |
+
|
32 |
+
$paged = ($q['paged']) ? $q['paged'] : 1;
|
33 |
+
|
34 |
+
|
35 |
+
// Comments
|
36 |
+
if($q['comments']){
|
37 |
+
if(has_action('alm_comments_installed') && $q['comments']){
|
38 |
+
// SEO does not support comments at this time
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
|
43 |
+
// Users
|
44 |
+
elseif($q['users']){
|
45 |
+
|
46 |
+
if(has_action('alm_users_preloaded') && $q['users']){
|
47 |
+
|
48 |
+
// Encrypt User Role
|
49 |
+
if(!empty($q['users_role']) && function_exists('alm_role_encrypt')){
|
50 |
+
$q['users_role'] = alm_role_encrypt($q['users_role']);
|
51 |
+
}
|
52 |
+
|
53 |
+
// Update offset
|
54 |
+
$q['offset'] = ALM_NOSCRIPT::set_offset($paged, $q['users_per_page'], $q['offset']);
|
55 |
+
|
56 |
+
// Build output
|
57 |
+
$output = apply_filters('alm_users_preloaded', $q, $q['users_per_page'], $q['repeater'], $q['theme_repeater']); // located in Users add-on
|
58 |
+
|
59 |
+
return ALM_NOSCRIPT::render($output['data'], $container, '', $css_classes, $transition_container_classes);
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
|
64 |
+
// Advanced Custom Fields (Repeater, Gallery, Flex Content
|
65 |
+
elseif($q['acf'] && ($q['acf_field_type'] !== 'relationship')){
|
66 |
+
if(has_action('alm_acf_installed') && $q['acf']){
|
67 |
+
|
68 |
+
// Update offset
|
69 |
+
$q['offset'] = ALM_NOSCRIPT::set_offset($paged, $q['posts_per_page'], $q['offset']);
|
70 |
+
|
71 |
+
// Build output
|
72 |
+
$output = apply_filters('alm_acf_preloaded', $q, $q['repeater'], $q['theme_repeater']); //located in ACF add-on
|
73 |
+
|
74 |
+
return ALM_NOSCRIPT::render($output, $container, '', $css_classes, $transition_container_classes);
|
75 |
+
}
|
76 |
+
}
|
77 |
+
|
78 |
+
|
79 |
+
// Standard ALM
|
80 |
+
else {
|
81 |
+
|
82 |
+
|
83 |
+
// Build the $args array to use with this WP_Query
|
84 |
+
$query_args = ALM_QUERY_ARGS::alm_build_queryargs($q, false);
|
85 |
+
|
86 |
+
|
87 |
+
/*
|
88 |
+
* alm_query_args_[id]
|
89 |
+
*
|
90 |
+
* ALM Core Filter Hook
|
91 |
+
*
|
92 |
+
* @return $query_args;
|
93 |
+
*/
|
94 |
+
$query_args = apply_filters('alm_query_args_'.$q['id'], $query_args, $q['post_id']);
|
95 |
+
|
96 |
+
|
97 |
+
// Get Per Page param
|
98 |
+
$posts_per_page = $query_args['posts_per_page'];
|
99 |
+
|
100 |
+
|
101 |
+
// Get Repeater Template type
|
102 |
+
$type = alm_get_repeater_type($q['repeater']);
|
103 |
+
|
104 |
+
|
105 |
+
// Update offset
|
106 |
+
$query_args['paged'] = $paged;
|
107 |
+
$query_args['offset'] = ALM_NOSCRIPT::set_offset($paged, $posts_per_page, $q['offset']);
|
108 |
+
|
109 |
+
$output = '';
|
110 |
+
$i = 0;
|
111 |
+
|
112 |
+
$noscript_query = new WP_Query($query_args);
|
113 |
+
|
114 |
+
if($noscript_query->have_posts()) :
|
115 |
+
|
116 |
+
$alm_found_posts = $noscript_query->found_posts;
|
117 |
+
$alm_page = $paged;
|
118 |
+
|
119 |
+
while ($noscript_query->have_posts()) : $noscript_query->the_post();
|
120 |
+
$i++;
|
121 |
+
$alm_current = $i;
|
122 |
+
$alm_item = $query_args['offset'] + $i;
|
123 |
+
|
124 |
+
$output .= alm_loop($q['repeater'], $type, $q['theme_repeater'], $alm_found_posts, $alm_page, $alm_item, $alm_current);
|
125 |
+
|
126 |
+
endwhile; wp_reset_query();
|
127 |
+
|
128 |
+
endif;
|
129 |
+
|
130 |
+
$paging = ALM_NOSCRIPT::build_noscript_paging($noscript_query);
|
131 |
+
|
132 |
+
return ALM_NOSCRIPT::render($output, $container, $paging, $css_classes, $transition_container_classes);
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
+
/*
|
141 |
+
* alm_paging_no_script
|
142 |
+
* Create paging navigation
|
143 |
+
*
|
144 |
+
* @return html;
|
145 |
+
* @updated 3.7
|
146 |
+
* @since 2.8.3
|
147 |
+
*/
|
148 |
+
public static function build_noscript_paging($query){
|
149 |
+
$paged = get_query_var('paged');
|
150 |
+
if(empty(get_query_var('paged')) || get_query_var('paged') == 0) {
|
151 |
+
$paged = 1;
|
152 |
+
}
|
153 |
+
$numposts = $query->found_posts;
|
154 |
+
$max_page = $query->max_num_pages;
|
155 |
+
$pages_to_show = 8;
|
156 |
+
$pages_to_show_minus_1 = $pages_to_show-1;
|
157 |
+
$half_page_start = floor($pages_to_show_minus_1/2);
|
158 |
+
$half_page_end = ceil($pages_to_show_minus_1/2);
|
159 |
+
$start_page = $paged - $half_page_start;
|
160 |
+
if($start_page <= 0) {
|
161 |
+
$start_page = 1;
|
162 |
+
}
|
163 |
+
$end_page = $paged + $half_page_end;
|
164 |
+
if(($end_page - $start_page) != $pages_to_show_minus_1) {
|
165 |
+
$end_page = $start_page + $pages_to_show_minus_1;
|
166 |
+
}
|
167 |
+
if($end_page > $max_page) {
|
168 |
+
$start_page = $max_page - $pages_to_show_minus_1;
|
169 |
+
$end_page = $max_page;
|
170 |
+
}
|
171 |
+
if($start_page <= 0) {
|
172 |
+
$start_page = 1;
|
173 |
+
}
|
174 |
+
$content = '';
|
175 |
+
if ($max_page > 1) {
|
176 |
+
$content .= '<div class="alm-paging" style="opacity: 1">';
|
177 |
+
$content .= __('Pages: ', 'ajax-load-more');
|
178 |
+
if ($start_page >= 2 && $pages_to_show < $max_page) {
|
179 |
+
$first_page_text = "«";
|
180 |
+
$content .= '<span class="page"><a href="'.get_pagenum_link().'">'.$first_page_text.'</a></span>';
|
181 |
+
}
|
182 |
+
// Loop pages
|
183 |
+
for($i = $start_page; $i <= $end_page; $i++) {
|
184 |
+
$content .= ' <span class="page"><a href="'.get_pagenum_link($i).'">'.$i.'</a></span>';
|
185 |
+
}
|
186 |
+
|
187 |
+
if ($end_page < $max_page) {
|
188 |
+
$last_page_text = "»";
|
189 |
+
$content .= '<span><a href="'.get_pagenum_link($max_page).'" title="'.$last_page_text.'">'.$last_page_text.'</a></span>';
|
190 |
+
}
|
191 |
+
$content .= '</div>';
|
192 |
+
}
|
193 |
+
|
194 |
+
return $content;
|
195 |
+
}
|
196 |
+
|
197 |
+
|
198 |
+
|
199 |
+
/*
|
200 |
+
* render
|
201 |
+
* This function will return the HTML output of the <noscript/>
|
202 |
+
*
|
203 |
+
* @since 1.8
|
204 |
+
* @param $output string
|
205 |
+
* @param $container string
|
206 |
+
* @param $paging string
|
207 |
+
* @return <noscript>
|
208 |
+
*/
|
209 |
+
public static function render($output, $container, $paging = '', $css_classes, $transition_container_classes){
|
210 |
+
return (!empty($output)) ? '<'. self::$element .'><'. $container .' class="alm-listing alm-noscript'. $css_classes .'"><div class="alm-reveal'. $transition_container_classes .'">'. $output .'</div></'. $container .'>'. $paging .'</'. self::$element .'>' : '';
|
211 |
+
}
|
212 |
+
|
213 |
+
|
214 |
+
|
215 |
+
/*
|
216 |
+
* set_offset
|
217 |
+
* This function will set the offset of the noscript query
|
218 |
+
*
|
219 |
+
* @since 1.8
|
220 |
+
* @param $paged string
|
221 |
+
* @param $per_page string
|
222 |
+
* @param $offset string
|
223 |
+
* @return int
|
224 |
+
*/
|
225 |
+
public static function set_offset($paged, $per_page, $offset){
|
226 |
+
return ($paged * $per_page) - $per_page + $offset;
|
227 |
+
}
|
228 |
+
|
229 |
+
}
|
230 |
+
|
231 |
+
endif;
|
core/classes/class.alm-queryargs.php
ADDED
@@ -0,0 +1,386 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* ALM_QUERY_ARGS
|
4 |
+
* Generate args that pass into the ALM WP_Query
|
5 |
+
*
|
6 |
+
* @author Darren Cooney
|
7 |
+
* @since 3.7
|
8 |
+
*/
|
9 |
+
|
10 |
+
if (!defined( 'ABSPATH')){
|
11 |
+
exit;
|
12 |
+
}
|
13 |
+
|
14 |
+
if(!class_exists('ALM_QUERY_ARGS')):
|
15 |
+
|
16 |
+
class ALM_QUERY_ARGS {
|
17 |
+
|
18 |
+
|
19 |
+
/**
|
20 |
+
* alm_build_queryargs
|
21 |
+
* This function will return a generated $args array.
|
22 |
+
*
|
23 |
+
* @since 3.7
|
24 |
+
* @param $a array
|
25 |
+
* @return $args
|
26 |
+
*/
|
27 |
+
|
28 |
+
|
29 |
+
public static function alm_build_queryargs($a, $is_ajax = true){
|
30 |
+
|
31 |
+
// ID
|
32 |
+
$post_id = (isset($a['post_id'])) ? $a['post_id'] : '';
|
33 |
+
|
34 |
+
// Posts Per Page
|
35 |
+
$posts_per_page = (isset($a['posts_per_page'])) ? $a['posts_per_page'] : 5;
|
36 |
+
|
37 |
+
// Post Type
|
38 |
+
if($is_ajax){
|
39 |
+
$post_type = (isset($a['post_type'])) ? $a['post_type'] : 'post';
|
40 |
+
} else {
|
41 |
+
$post_type = explode(",", $a['post_type']);
|
42 |
+
}
|
43 |
+
|
44 |
+
// Format
|
45 |
+
$post_format = (isset($a['post_format'])) ? $a['post_format'] : '';
|
46 |
+
|
47 |
+
// Category
|
48 |
+
$category = (isset($a['category'])) ? $a['category'] : '';
|
49 |
+
$category__not_in = (isset($a['category__not_in'])) ? $a['category__not_in'] : '';
|
50 |
+
|
51 |
+
// Tags
|
52 |
+
$tag = (isset($a['tag'])) ? $a['tag'] : '';
|
53 |
+
$tag__not_in = (isset($a['tag__not_in'])) ? $a['tag__not_in'] : '';
|
54 |
+
|
55 |
+
// Taxonomy
|
56 |
+
$taxonomy = (isset($a['taxonomy'])) ? $a['taxonomy'] : '';
|
57 |
+
$taxonomy_terms = (isset($a['taxonomy_terms'])) ? $a['taxonomy_terms'] : '';
|
58 |
+
$taxonomy_operator = (isset($a['taxonomy_operator'])) ? $a['taxonomy_operator'] : '';
|
59 |
+
if(empty($taxonomy_operator))
|
60 |
+
$taxonomy_operator = 'IN';
|
61 |
+
$taxonomy_relation = (isset($a['taxonomy_relation'])) ? $a['taxonomy_relation'] : 'AND';
|
62 |
+
if(empty($taxonomy_relation))
|
63 |
+
$taxonomy_relation = 'AND';
|
64 |
+
|
65 |
+
// Date
|
66 |
+
$year = (isset($a['year'])) ? $a['year'] : '';
|
67 |
+
$month = (isset($a['month'])) ? $a['month'] : '';
|
68 |
+
$day = (isset($a['day'])) ? $a['day'] : '';
|
69 |
+
|
70 |
+
// Custom Fields
|
71 |
+
$meta_key = (isset($a['meta_key'])) ? $a['meta_key'] : '';
|
72 |
+
$meta_value = (isset($a['meta_value'])) ? $a['meta_value'] : '';
|
73 |
+
$meta_compare = (isset($a['meta_compare'])) ? $a['meta_compare'] : '';
|
74 |
+
if(empty($meta_compare))
|
75 |
+
$meta_compare = 'IN';
|
76 |
+
if($meta_compare === 'lessthan') $meta_compare = '<'; // do_shortcode fix (shortcode was rendering as HTML)
|
77 |
+
if($meta_compare === 'lessthanequalto') $meta_compare = '<='; // do_shortcode fix (shortcode was rendering as HTML)
|
78 |
+
$meta_relation = (isset($a['meta_relation'])) ? $a['meta_relation'] : '';
|
79 |
+
if(empty($meta_relation))
|
80 |
+
$meta_relation = 'AND';
|
81 |
+
$meta_type = (isset($a['meta_type'])) ? $a['meta_type'] : '';
|
82 |
+
if(empty($meta_type))
|
83 |
+
$meta_type = 'CHAR';
|
84 |
+
|
85 |
+
// Search
|
86 |
+
$s = (isset($a['search'])) ? $a['search'] : '';
|
87 |
+
|
88 |
+
// Custom Args
|
89 |
+
$custom_args = (isset($a['custom_args'])) ? $a['custom_args'] : '';
|
90 |
+
|
91 |
+
// Author
|
92 |
+
$author_id = (isset($a['author'])) ? $a['author'] : '';
|
93 |
+
|
94 |
+
// Ordering
|
95 |
+
$order = (isset($a['order'])) ? $a['order'] : 'DESC';
|
96 |
+
$orderby = (isset($a['orderby'])) ? $a['orderby'] : 'date';
|
97 |
+
|
98 |
+
// Sticky, Include, Exclude, Offset, Status
|
99 |
+
$sticky = (isset($a['sticky_posts'])) ? $a['sticky_posts'] : '';
|
100 |
+
$sticky = ($sticky === 'true') ? true : false;
|
101 |
+
|
102 |
+
// Post IN
|
103 |
+
$post__in = (isset($a['post__in'])) ? $a['post__in'] : '';
|
104 |
+
|
105 |
+
// Exclude
|
106 |
+
$post__not_in = (isset($a['post__not_in'])) ? $a['post__not_in'] : '';
|
107 |
+
$exclude = (isset($a['exclude'])) ? $a['exclude'] : '';
|
108 |
+
|
109 |
+
// Offset
|
110 |
+
$offset = (isset($a['offset'])) ? $a['offset'] : 0;
|
111 |
+
|
112 |
+
// Post Status
|
113 |
+
$post_status = (isset($a['post_status'])) ? $a['post_status'] : 'publish';
|
114 |
+
if(empty($post_status))
|
115 |
+
$post_status = 'publish';
|
116 |
+
if($post_status != 'publish' && $post_status != 'inherit'){
|
117 |
+
// If not 'publish', confirm user has rights to view these old posts.
|
118 |
+
if (current_user_can( 'edit_theme_options' )){
|
119 |
+
$post_status = $post_status;
|
120 |
+
} else {
|
121 |
+
$post_status = 'publish';
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
|
126 |
+
// Advanced Custom Fields
|
127 |
+
// Only used for Relationship Field. Gallery, Repeater and Flex Content is in the ACF extension.
|
128 |
+
if($is_ajax){
|
129 |
+
$acf = (isset($a['acf'])) ? true : false;
|
130 |
+
if($acf){
|
131 |
+
$acf_post_id = (isset($a['acf']['post_id'])) ? $a['acf']['post_id'] : ''; // Post ID
|
132 |
+
$acf_field_type = (isset($a['acf']['field_type'])) ? $a['acf']['field_type'] : ''; // ACF Field Type
|
133 |
+
$acf_field_name = (isset($a['acf']['field_name'])) ? $a['acf']['field_name'] : ''; // ACF Field Type
|
134 |
+
}
|
135 |
+
|
136 |
+
} else {
|
137 |
+
// If Preloaded, $a needs to access acf data differently.
|
138 |
+
if(isset($a['acf'])){
|
139 |
+
if($a['acf'] === 'true'){
|
140 |
+
$acf_post_id = (isset($a['acf_post_id'])) ? $a['acf_post_id'] : ''; // Post ID
|
141 |
+
$acf_field_type = (isset($a['acf_field_type'])) ? $a['acf_field_type'] : ''; // ACF Field Type
|
142 |
+
$acf_field_name = (isset($a['acf_field_name'])) ? $a['acf_field_name'] : ''; // ACF Field Type
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
+
|
147 |
+
|
148 |
+
// Create $args array
|
149 |
+
$args = array(
|
150 |
+
'post_type' => $post_type,
|
151 |
+
'posts_per_page' => $posts_per_page,
|
152 |
+
'offset' => $offset,
|
153 |
+
'order' => $order,
|
154 |
+
'orderby' => $orderby,
|
155 |
+
'post_status' => $post_status,
|
156 |
+
'ignore_sticky_posts' => true
|
157 |
+
);
|
158 |
+
|
159 |
+
|
160 |
+
// Post Format & Taxonomy
|
161 |
+
// * Both use tax_query, so we need to combine these queries
|
162 |
+
if(!empty($post_format) || !empty($taxonomy)){
|
163 |
+
|
164 |
+
$tax_query_total = count(explode(":", $taxonomy)); // Total $taxonomy objects
|
165 |
+
$taxonomy = explode(":", $taxonomy); // convert to array
|
166 |
+
$taxonomy_terms = explode(":", $taxonomy_terms); // convert to array
|
167 |
+
$taxonomy_operator = explode(":", $taxonomy_operator); // convert to array
|
168 |
+
|
169 |
+
if(empty($taxonomy)){
|
170 |
+
|
171 |
+
// Post Format only
|
172 |
+
$args['tax_query'] = array(
|
173 |
+
alm_get_post_format($post_format),
|
174 |
+
);
|
175 |
+
|
176 |
+
}else{
|
177 |
+
|
178 |
+
// Post Formats
|
179 |
+
$args['tax_query'] = array(
|
180 |
+
'relation' => $taxonomy_relation,
|
181 |
+
alm_get_post_format($post_format)
|
182 |
+
);
|
183 |
+
|
184 |
+
// Loop Taxonomies
|
185 |
+
for($tax_i = 0; $tax_i < $tax_query_total; $tax_i++){
|
186 |
+
$args['tax_query'][] = alm_get_taxonomy_query($taxonomy[$tax_i], $taxonomy_terms[$tax_i], $taxonomy_operator[$tax_i]);
|
187 |
+
}
|
188 |
+
|
189 |
+
}
|
190 |
+
|
191 |
+
}
|
192 |
+
|
193 |
+
// Category
|
194 |
+
if(!empty($category)){
|
195 |
+
$args['category_name'] = $category;
|
196 |
+
}
|
197 |
+
|
198 |
+
// Category Not In
|
199 |
+
if(!empty($category__not_in)){
|
200 |
+
$exclude_cats = explode(",",$category__not_in);
|
201 |
+
$args['category__not_in'] = $exclude_cats;
|
202 |
+
}
|
203 |
+
|
204 |
+
// Tag
|
205 |
+
if(!empty($tag)){
|
206 |
+
$args['tag'] = $tag;
|
207 |
+
}
|
208 |
+
|
209 |
+
// Tag Not In
|
210 |
+
if(!empty($tag__not_in)){
|
211 |
+
$exclude_tags = explode(",",$tag__not_in);
|
212 |
+
$args['tag__not_in'] = $exclude_tags;
|
213 |
+
}
|
214 |
+
|
215 |
+
// Date (not using date_query as there was issue with year/month archives)
|
216 |
+
if(!empty($year)){
|
217 |
+
$args['year'] = $year;
|
218 |
+
}
|
219 |
+
if(!empty($month)){
|
220 |
+
$args['monthnum'] = $month;
|
221 |
+
}
|
222 |
+
if(!empty($day)){
|
223 |
+
$args['day'] = $day;
|
224 |
+
}
|
225 |
+
|
226 |
+
// Meta Query
|
227 |
+
if(!empty($meta_key) && !empty($meta_value) || !empty($meta_key) && $meta_compare !== "IN"){
|
228 |
+
|
229 |
+
// Parse multiple meta query
|
230 |
+
$meta_query_total = count(explode(":", $meta_key)); // Total meta_query objects
|
231 |
+
$meta_keys = explode(":", $meta_key); // convert to array
|
232 |
+
$meta_value = explode(":", $meta_value); // convert to array
|
233 |
+
$meta_compare = explode(":", $meta_compare); // convert to array
|
234 |
+
$meta_type = explode(":", $meta_type); // convert to array
|
235 |
+
|
236 |
+
// Loop Meta Query
|
237 |
+
$args['meta_query'] = array(
|
238 |
+
'relation' => $meta_relation
|
239 |
+
);
|
240 |
+
for($mq_i = 0; $mq_i < $meta_query_total; $mq_i++){
|
241 |
+
$args['meta_query'][] = alm_get_meta_query($meta_keys[$mq_i], $meta_value[$mq_i], $meta_compare[$mq_i], $meta_type[$mq_i]);
|
242 |
+
}
|
243 |
+
}
|
244 |
+
|
245 |
+
// Meta_key, used for ordering by meta value
|
246 |
+
if(!empty($meta_key)){
|
247 |
+
if (strpos($orderby, 'meta_value') !== false) { // Only order by meta_key, if $orderby is set to meta_value{_num}
|
248 |
+
$meta_key_single = explode(":", $meta_key);
|
249 |
+
$args['meta_key'] = $meta_key_single[0];
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
// Author
|
254 |
+
if(!empty($author_id)){
|
255 |
+
$args['author'] = $author_id;
|
256 |
+
}
|
257 |
+
|
258 |
+
// Search Term
|
259 |
+
if(!empty($s)){
|
260 |
+
$args['s'] = $s;
|
261 |
+
}
|
262 |
+
|
263 |
+
// Custom Args
|
264 |
+
if(!empty($custom_args)){
|
265 |
+
$custom_args_array = explode(";",$custom_args); // Split the $custom_args at ','
|
266 |
+
foreach($custom_args_array as $argument){ // Loop each $argument
|
267 |
+
|
268 |
+
$argument = preg_replace('/\s+/', '', $argument); // Remove all whitespace
|
269 |
+
$argument = explode(":",$argument); // Split the $argument at ':'
|
270 |
+
$argument_arr = explode(",", $argument[1]); // explode $argument[1] at ','
|
271 |
+
if(sizeof($argument_arr) > 1){
|
272 |
+
$args[$argument[0]] = $argument_arr;
|
273 |
+
}else{
|
274 |
+
$args[$argument[0]] = $argument[1];
|
275 |
+
}
|
276 |
+
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
// Include posts
|
281 |
+
if(!empty($post__in)){
|
282 |
+
$post__in = explode(",",$post__in);
|
283 |
+
$args['post__in'] = $post__in;
|
284 |
+
}
|
285 |
+
|
286 |
+
// Exclude posts
|
287 |
+
if(!empty($post__not_in)){
|
288 |
+
$post__not_in = explode(",",$post__not_in);
|
289 |
+
$args['post__not_in'] = $post__not_in;
|
290 |
+
}
|
291 |
+
if(!empty($exclude)){ // Deprecate this soon - 2.8.5 */
|
292 |
+
$exclude = explode(",",$exclude);
|
293 |
+
$args['post__not_in'] = $exclude;
|
294 |
+
}
|
295 |
+
|
296 |
+
// Language
|
297 |
+
if(!empty($lang)){
|
298 |
+
$args['lang'] = $lang;
|
299 |
+
}
|
300 |
+
|
301 |
+
// Sticky Posts
|
302 |
+
if($sticky){
|
303 |
+
$sticky_posts = get_option( 'sticky_posts' ); // Get all sticky post ids
|
304 |
+
$sticky_post__not_in = isset($args['post__not_in']) ? $args['post__not_in'] : '';
|
305 |
+
|
306 |
+
if($is_ajax){ // Is an Ajax Query
|
307 |
+
|
308 |
+
$sticky_query_args = $args;
|
309 |
+
|
310 |
+
$sticky_query_args['post__not_in'] = $sticky_posts;
|
311 |
+
$sticky_query_args['posts_per_page'] = -1;
|
312 |
+
$sticky_query_args['fields'] = 'ids';
|
313 |
+
|
314 |
+
$sticky_query = new WP_Query($sticky_query_args); // Query all non sticky posts
|
315 |
+
|
316 |
+
// If has sticky and regular posts
|
317 |
+
if($sticky_posts && $sticky_query->posts){
|
318 |
+
$standard_posts = $sticky_query->posts;
|
319 |
+
if($standard_posts){
|
320 |
+
$sticky_ids = array_merge($sticky_posts, $standard_posts); // merge regular posts with sticky
|
321 |
+
$args['post__in'] = alm_sticky_post__not_in($sticky_ids, $sticky_post__not_in);
|
322 |
+
$args['orderby'] = 'post__in'; // set orderby to order by post__in.
|
323 |
+
}
|
324 |
+
}
|
325 |
+
|
326 |
+
} else { // Preloaded
|
327 |
+
|
328 |
+
// If more sticky posts than $posts_per_page run a secondary query to get posts to fill query.
|
329 |
+
if(count($sticky_posts) <= $posts_per_page){
|
330 |
+
|
331 |
+
$sticky_query_args = $args;
|
332 |
+
|
333 |
+
$sticky_query_args['post__not_in'] = $sticky_posts;
|
334 |
+
$sticky_query_args['posts_per_page'] = -1;
|
335 |
+
$sticky_query_args['fields'] = 'ids';
|
336 |
+
|
337 |
+
|
338 |
+
$sticky_query = new WP_Query($sticky_query_args); // Query all non sticky posts
|
339 |
+
|
340 |
+
// If has sticky and regular posts
|
341 |
+
if($sticky_posts && $sticky_query->posts){
|
342 |
+
$standard_posts = $sticky_query->posts;
|
343 |
+
if($standard_posts){
|
344 |
+
$sticky_ids = array_merge($sticky_posts, $standard_posts); // merge regular posts with sticky
|
345 |
+
$sticky_ids = alm_sticky_post__not_in($sticky_ids, $sticky_post__not_in);
|
346 |
+
$args['orderby'] = 'post__in'; // set orderby to order by post__in.
|
347 |
+
}
|
348 |
+
}
|
349 |
+
|
350 |
+
}else{
|
351 |
+
$sticky_ids = $sticky_posts; // Pass get_option('sticky_posts');
|
352 |
+
}
|
353 |
+
|
354 |
+
// If has sticky posts.
|
355 |
+
if($sticky_posts){
|
356 |
+
$args['post__in'] = $sticky_ids;
|
357 |
+
$args['orderby'] = 'post__in'; // set orderby to order by post__in.
|
358 |
+
}
|
359 |
+
|
360 |
+
}
|
361 |
+
|
362 |
+
}
|
363 |
+
|
364 |
+
|
365 |
+
// Advanced Custom Fields
|
366 |
+
if(!empty($acf_field_type) && !empty($acf_field_name) && function_exists('get_field')){
|
367 |
+
if($acf_field_type === 'relationship'){ // Relationship Field
|
368 |
+
if(empty($acf_post_id)){
|
369 |
+
$acf_post_id = $post_id;
|
370 |
+
}
|
371 |
+
$acf_post_ids = get_field($acf_field_name, $acf_post_id); // Get field value from ACF
|
372 |
+
if($acf_post_ids){
|
373 |
+
$args['post__in'] = $acf_post_ids;
|
374 |
+
} else {
|
375 |
+
$args['post__in'] = array(0);
|
376 |
+
}
|
377 |
+
}
|
378 |
+
}
|
379 |
+
|
380 |
+
return $args;
|
381 |
+
|
382 |
+
}
|
383 |
+
|
384 |
+
}
|
385 |
+
|
386 |
+
endif;
|
core/classes/class.alm-shortcode.php
CHANGED
@@ -29,10 +29,15 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
29 |
*/
|
30 |
|
31 |
public static function alm_render_shortcode($atts){
|
|
|
32 |
|
|
|
33 |
global $post;
|
34 |
|
|
|
35 |
$options = get_option( 'alm_settings' );
|
|
|
|
|
36 |
self::$counter++;
|
37 |
|
38 |
// Define page slug
|
@@ -161,7 +166,7 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
161 |
// Start Enqueue Scripts
|
162 |
|
163 |
|
164 |
-
// Inline CSS
|
165 |
if( !is_admin() && alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css') && self::$counter === 1 ){
|
166 |
$file = ALM_PATH . '/core/dist/css/'. ALM_SLUG .'.min.css'; // Core Ajax Load More
|
167 |
echo ALM_ENQUEUE::alm_inline_css(ALM_SLUG, $file, ALM_URL);
|
@@ -172,6 +177,10 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
172 |
wp_enqueue_script( 'imagesloaded' ); // Enqueue before core ALM
|
173 |
wp_enqueue_script( 'ajax-load-more-masonry' ); // Enqueue before core ALM
|
174 |
}
|
|
|
|
|
|
|
|
|
175 |
|
176 |
// Core ALM
|
177 |
wp_enqueue_script( 'ajax-load-more' );
|
@@ -190,9 +199,10 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
190 |
// Paging
|
191 |
if(has_action('alm_paging_installed') && $paging === 'true'){
|
192 |
wp_enqueue_script( 'ajax-load-more-paging' );
|
|
|
193 |
|
194 |
// Inline paging CSS
|
195 |
-
if( !is_admin() && alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_paging_disable_css')
|
196 |
if(defined('ALM_PAGING_PATH') && defined('ALM_PAGING_URL')){
|
197 |
$file = ALM_PAGING_PATH.'/core/css/ajax-load-more-paging.min.css';
|
198 |
echo ALM_ENQUEUE::alm_inline_css('ajax-load-more-paging', $file, ALM_PAGING_URL);
|
@@ -380,7 +390,7 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
380 |
$is_search = (is_search()) ? 'data-search="true"' : '';
|
381 |
|
382 |
|
383 |
-
// Start
|
384 |
$ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '. $unique_id .' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" data-post-id="'. $post_id .'" '. $is_search .'>';
|
385 |
|
386 |
|
@@ -407,6 +417,15 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
407 |
$cache = false;
|
408 |
$acf = false;
|
409 |
$posts_per_page = $comments_per_page;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
410 |
}
|
411 |
|
412 |
|
@@ -422,19 +441,29 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
422 |
}
|
423 |
|
424 |
|
425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
$query_args = array(
|
427 |
'post_id' => $post_id,
|
|
|
|
|
428 |
'acf' => $acf,
|
429 |
'acf_post_id' => $acf_post_id,
|
430 |
'acf_field_type' => $acf_field_type,
|
431 |
'acf_field_name' => $acf_field_name,
|
432 |
'users' => $users,
|
|
|
433 |
'users_include' => $users_include,
|
434 |
'users_exclude' => $users_exclude,
|
435 |
'users_per_page' => $users_per_page,
|
436 |
'users_order' => $users_order,
|
437 |
'users_orderby' => $users_orderby,
|
|
|
438 |
'comments_per_page' => $comments_per_page,
|
439 |
'comments_type' => $comments_type,
|
440 |
'comments_style' => $comments_style,
|
@@ -473,23 +502,21 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
473 |
'posts_per_page' => $posts_per_page,
|
474 |
'lang' => $lang,
|
475 |
'css_classes' => $css_classes,
|
|
|
|
|
|
|
|
|
476 |
);
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
// Preloaded
|
481 |
-
if(has_action('alm_preload_installed') && $preloaded === 'true'){
|
482 |
-
include(ALM_PATH .'core/classes/includes/preloaded.php');
|
483 |
-
}
|
484 |
-
// End Preloaded
|
485 |
-
|
486 |
|
487 |
$listing_class = ($comments === 'true') ? 'commentlist alm-comments' : 'alm-listing'; // If Comments
|
488 |
|
489 |
|
490 |
// Open #ajax-load-more
|
491 |
-
|
|
|
492 |
|
|
|
493 |
|
494 |
// Advanced Custom Fields Extension
|
495 |
if(has_action('alm_acf_installed') && $acf === 'true'){
|
@@ -575,9 +602,20 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
575 |
|
576 |
|
577 |
// Preloaded Add-on
|
578 |
-
if(has_action('alm_preload_installed') && $preloaded === 'true'){
|
579 |
-
|
580 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
581 |
}
|
582 |
|
583 |
|
@@ -757,7 +795,16 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
757 |
$ajaxloadmore .= ($primary !== false) ? ' data-primary="true"' : '';
|
758 |
|
759 |
$ajaxloadmore .= '>';
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
|
762 |
// Previous Post
|
763 |
// Get first post and append to alm object
|
@@ -808,8 +855,22 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
808 |
|
809 |
// Masonry Hook (After)
|
810 |
$ajaxloadmore .= apply_filters('alm_masonry_after', $transition);
|
811 |
-
|
|
|
|
|
812 |
$ajaxloadmore .= '</'.$container_element.'>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
|
814 |
|
815 |
/*
|
@@ -825,7 +886,11 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
825 |
// Create Load More button
|
826 |
$ajaxloadmore .= self::alm_render_button($seo, $paging, $button_classname, $button_label, $canonicalURL);
|
827 |
|
828 |
-
|
|
|
|
|
|
|
|
|
829 |
// Close #ajax-load-more
|
830 |
$ajaxloadmore .= '</div>';
|
831 |
|
@@ -844,7 +909,8 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
844 |
$ajaxloadmore .= apply_filters('alm_progress_css', self::$counter, $progress_bar, $progress_bar_color); // ALM Core Filter Hook
|
845 |
|
846 |
|
847 |
-
// REST API Add-on
|
|
|
848 |
if(has_action('alm_rest_api_installed') && $restapi){
|
849 |
if($theme_repeater != 'null' && has_action('alm_get_rest_theme_repeater')){
|
850 |
do_action('alm_get_rest_theme_repeater', $theme_repeater);
|
@@ -854,18 +920,22 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
854 |
}
|
855 |
}
|
856 |
// End REST API Add-on
|
857 |
-
|
858 |
-
|
859 |
-
// SEO <noscript>
|
860 |
-
if($seo === 'true' && has_filter('alm_seo_noscript')){
|
861 |
-
$ajaxloadmore .= apply_filters('alm_seo_noscript', $query_args);
|
862 |
-
}
|
863 |
-
|
864 |
-
|
865 |
-
// End SEO </noscript>
|
866 |
-
|
867 |
|
868 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
869 |
}
|
870 |
|
871 |
|
@@ -879,15 +949,16 @@ if( !class_exists('ALM_SHORTCODE') ):
|
|
879 |
*/
|
880 |
public static function alm_render_button($seo, $paging, $button_classname, $button_label, $canonicalURL){
|
881 |
|
882 |
-
$html = '<div class="alm-btn-wrap">';
|
883 |
if($paging !== 'true'){
|
884 |
$btn_element = 'button';
|
885 |
-
$btn_href =
|
886 |
-
|
|
|
887 |
$btn_element = 'a'; // Convert to link for SEO
|
888 |
$btn_href = ' href="'. $canonicalURL .'"';
|
889 |
$btn_rel = ' rel="next"';
|
890 |
-
}
|
891 |
$html .= '<'. $btn_element .' class="alm-load-more-btn more'. $button_classname .'"'. $btn_href . $btn_rel .'>'. $button_label .'</'. $btn_element .'>';
|
892 |
}
|
893 |
$html .= '</div>';
|
29 |
*/
|
30 |
|
31 |
public static function alm_render_shortcode($atts){
|
32 |
+
|
33 |
|
34 |
+
// Get global $post obj
|
35 |
global $post;
|
36 |
|
37 |
+
// Get ALM options
|
38 |
$options = get_option( 'alm_settings' );
|
39 |
+
|
40 |
+
// Add count
|
41 |
self::$counter++;
|
42 |
|
43 |
// Define page slug
|
166 |
// Start Enqueue Scripts
|
167 |
|
168 |
|
169 |
+
// Inline Core CSS
|
170 |
if( !is_admin() && alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css') && self::$counter === 1 ){
|
171 |
$file = ALM_PATH . '/core/dist/css/'. ALM_SLUG .'.min.css'; // Core Ajax Load More
|
172 |
echo ALM_ENQUEUE::alm_inline_css(ALM_SLUG, $file, ALM_URL);
|
177 |
wp_enqueue_script( 'imagesloaded' ); // Enqueue before core ALM
|
178 |
wp_enqueue_script( 'ajax-load-more-masonry' ); // Enqueue before core ALM
|
179 |
}
|
180 |
+
|
181 |
+
if($images_loaded === 'true'){
|
182 |
+
wp_enqueue_script( 'ajax-load-more-images-loaded' );
|
183 |
+
}
|
184 |
|
185 |
// Core ALM
|
186 |
wp_enqueue_script( 'ajax-load-more' );
|
199 |
// Paging
|
200 |
if(has_action('alm_paging_installed') && $paging === 'true'){
|
201 |
wp_enqueue_script( 'ajax-load-more-paging' );
|
202 |
+
wp_enqueue_script( 'ajax-load-more-images-loaded' ); // Required for Paging
|
203 |
|
204 |
// Inline paging CSS
|
205 |
+
if( !is_admin() && alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_paging_disable_css') ){
|
206 |
if(defined('ALM_PAGING_PATH') && defined('ALM_PAGING_URL')){
|
207 |
$file = ALM_PAGING_PATH.'/core/css/ajax-load-more-paging.min.css';
|
208 |
echo ALM_ENQUEUE::alm_inline_css('ajax-load-more-paging', $file, ALM_PAGING_URL);
|
390 |
$is_search = (is_search()) ? 'data-search="true"' : '';
|
391 |
|
392 |
|
393 |
+
// Start .alm-listing
|
394 |
$ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '. $unique_id .' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" data-post-id="'. $post_id .'" '. $is_search .'>';
|
395 |
|
396 |
|
417 |
$cache = false;
|
418 |
$acf = false;
|
419 |
$posts_per_page = $comments_per_page;
|
420 |
+
if($preloaded === 'true'){
|
421 |
+
$preloaded_amount = $comments_per_page;
|
422 |
+
}
|
423 |
+
}
|
424 |
+
|
425 |
+
|
426 |
+
// Users Add-on
|
427 |
+
if($users){
|
428 |
+
$posts_per_page = $users_per_page;
|
429 |
}
|
430 |
|
431 |
|
441 |
}
|
442 |
|
443 |
|
444 |
+
if($seo === 'true'){
|
445 |
+
// If seo, set preloaded_amount to posts_per_page value
|
446 |
+
$preloaded_amount = $posts_per_page;
|
447 |
+
}
|
448 |
+
|
449 |
+
|
450 |
+
// $query_args array to store global ALM variables
|
451 |
$query_args = array(
|
452 |
'post_id' => $post_id,
|
453 |
+
'preloaded' => $preloaded,
|
454 |
+
'preloaded_amount' => $preloaded_amount,
|
455 |
'acf' => $acf,
|
456 |
'acf_post_id' => $acf_post_id,
|
457 |
'acf_field_type' => $acf_field_type,
|
458 |
'acf_field_name' => $acf_field_name,
|
459 |
'users' => $users,
|
460 |
+
'users_role' => $users_role,
|
461 |
'users_include' => $users_include,
|
462 |
'users_exclude' => $users_exclude,
|
463 |
'users_per_page' => $users_per_page,
|
464 |
'users_order' => $users_order,
|
465 |
'users_orderby' => $users_orderby,
|
466 |
+
'comments' => $comments,
|
467 |
'comments_per_page' => $comments_per_page,
|
468 |
'comments_type' => $comments_type,
|
469 |
'comments_style' => $comments_style,
|
502 |
'posts_per_page' => $posts_per_page,
|
503 |
'lang' => $lang,
|
504 |
'css_classes' => $css_classes,
|
505 |
+
'id' => $id,
|
506 |
+
'repeater' => $repeater,
|
507 |
+
'theme_repeater' => $theme_repeater,
|
508 |
+
'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1
|
509 |
);
|
510 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
|
512 |
$listing_class = ($comments === 'true') ? 'commentlist alm-comments' : 'alm-listing'; // If Comments
|
513 |
|
514 |
|
515 |
// Open #ajax-load-more
|
516 |
+
|
517 |
+
$ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class . $classname . $css_classes .'"';
|
518 |
|
519 |
+
// Build container data atts
|
520 |
|
521 |
// Advanced Custom Fields Extension
|
522 |
if(has_action('alm_acf_installed') && $acf === 'true'){
|
602 |
|
603 |
|
604 |
// Preloaded Add-on
|
605 |
+
if(has_action('alm_preload_installed') && $preloaded === 'true'){
|
606 |
+
|
607 |
+
$preloaded = ($seo === 'true' && (int)$query_args['paged'] < 1 && $paging !== 'true') ? 'true' : $preloaded; // SEO page 1
|
608 |
+
|
609 |
+
// SEO > page 1
|
610 |
+
$preloaded = ($seo === 'true' && $query_args['paged'] > 1 && $paging !== 'true') ? false : $preloaded; // SEO page 1
|
611 |
+
|
612 |
+
// Set was-preloaded attribute to add alm-preloaded class to first alm-reveal div
|
613 |
+
if($seo === 'true' && $query_args['paged'] > 1){
|
614 |
+
$ajaxloadmore .= ' data-is-preloaded="true"';
|
615 |
+
}
|
616 |
+
|
617 |
+
$ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
|
618 |
+
$ajaxloadmore .= ' data-preloaded-amount="'.$preloaded_amount.'"';
|
619 |
}
|
620 |
|
621 |
|
795 |
$ajaxloadmore .= ($primary !== false) ? ' data-primary="true"' : '';
|
796 |
|
797 |
$ajaxloadmore .= '>';
|
798 |
+
// End .alm-listing
|
799 |
+
|
800 |
+
|
801 |
+
// Preloaded
|
802 |
+
// Add Preloaded Posts
|
803 |
+
$noscript_pagingnav = '';
|
804 |
+
if(has_action('alm_preload_installed') && $preloaded === 'true'){
|
805 |
+
include(ALM_PATH .'core/classes/includes/preloaded.php');
|
806 |
+
}
|
807 |
+
|
808 |
|
809 |
// Previous Post
|
810 |
// Get first post and append to alm object
|
855 |
|
856 |
// Masonry Hook (After)
|
857 |
$ajaxloadmore .= apply_filters('alm_masonry_after', $transition);
|
858 |
+
|
859 |
+
|
860 |
+
// Close ALM container element
|
861 |
$ajaxloadmore .= '</'.$container_element.'>';
|
862 |
+
|
863 |
+
|
864 |
+
/*
|
865 |
+
* alm_noscript (Generates <noscript/> element of current query)
|
866 |
+
*
|
867 |
+
* ALM Core Filter Hook
|
868 |
+
*
|
869 |
+
* @return html;
|
870 |
+
*/
|
871 |
+
if($seo === 'true' && $preloaded !== 'true' && !$restapi){
|
872 |
+
$ajaxloadmore .= apply_filters('alm_noscript', $query_args, $container_element, $css_classes, $transition_container_classes);
|
873 |
+
}
|
874 |
|
875 |
|
876 |
/*
|
886 |
// Create Load More button
|
887 |
$ajaxloadmore .= self::alm_render_button($seo, $paging, $button_classname, $button_label, $canonicalURL);
|
888 |
|
889 |
+
|
890 |
+
// Render <noscript> pagination for SEO and Preloaded (./preloaded.php)
|
891 |
+
$ajaxloadmore .= (!empty($noscript_pagingnav)) ? $noscript_pagingnav : '';
|
892 |
+
|
893 |
+
|
894 |
// Close #ajax-load-more
|
895 |
$ajaxloadmore .= '</div>';
|
896 |
|
909 |
$ajaxloadmore .= apply_filters('alm_progress_css', self::$counter, $progress_bar, $progress_bar_color); // ALM Core Filter Hook
|
910 |
|
911 |
|
912 |
+
// REST API Add-on
|
913 |
+
// - add <script> template to page
|
914 |
if(has_action('alm_rest_api_installed') && $restapi){
|
915 |
if($theme_repeater != 'null' && has_action('alm_get_rest_theme_repeater')){
|
916 |
do_action('alm_get_rest_theme_repeater', $theme_repeater);
|
920 |
}
|
921 |
}
|
922 |
// End REST API Add-on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
923 |
|
924 |
+
|
925 |
+
|
926 |
+
/*
|
927 |
+
* alm_create_script_vars
|
928 |
+
*
|
929 |
+
* Build localized script vars for each ALM instance.
|
930 |
+
*
|
931 |
+
* @return <script>
|
932 |
+
*/
|
933 |
+
ALM_LOCALIZE::create_script_vars($div_id);
|
934 |
+
|
935 |
+
|
936 |
+
|
937 |
+
return $ajaxloadmore; // End $ajaxloadmore object
|
938 |
+
|
939 |
}
|
940 |
|
941 |
|
949 |
*/
|
950 |
public static function alm_render_button($seo, $paging, $button_classname, $button_label, $canonicalURL){
|
951 |
|
952 |
+
$html = '<div class="alm-btn-wrap" style="visibility: hidden;">';
|
953 |
if($paging !== 'true'){
|
954 |
$btn_element = 'button';
|
955 |
+
$btn_href = '';
|
956 |
+
$btn_rel = ' rel="next"';
|
957 |
+
/* if($seo === 'true'){
|
958 |
$btn_element = 'a'; // Convert to link for SEO
|
959 |
$btn_href = ' href="'. $canonicalURL .'"';
|
960 |
$btn_rel = ' rel="next"';
|
961 |
+
} */
|
962 |
$html .= '<'. $btn_element .' class="alm-load-more-btn more'. $button_classname .'"'. $btn_href . $btn_rel .'>'. $button_label .'</'. $btn_element .'>';
|
963 |
}
|
964 |
$html .= '</div>';
|
core/classes/includes/preloaded.php
CHANGED
@@ -1,26 +1,32 @@
|
|
1 |
<?php
|
2 |
|
3 |
// Preloaded
|
4 |
-
// Get preloaded posts and append to
|
5 |
|
|
|
|
|
6 |
$preloaded_output = '';
|
7 |
$preload_offset = $offset;
|
8 |
|
|
|
|
|
|
|
|
|
|
|
9 |
// If $seo or $filters, set $preloaded_amount to $posts_per_page
|
10 |
if((has_action('alm_seo_installed') && $seo === 'true' && !$users) || $filters){
|
11 |
$preloaded_amount = $posts_per_page;
|
12 |
}
|
13 |
|
|
|
14 |
// Paging Add-on
|
15 |
// Set $preloaded_amount to $posts_per_page
|
16 |
if($paging === 'true'){
|
17 |
$preloaded_amount = $posts_per_page;
|
18 |
-
$
|
19 |
-
if($paged > 1){
|
20 |
-
$preload_offset = $preloaded_amount * ($paged - 1);
|
21 |
-
}
|
22 |
}
|
23 |
|
|
|
24 |
// CTA Add-on
|
25 |
// Parse $cta_position
|
26 |
if($cta){
|
@@ -55,13 +61,20 @@ if($comments){
|
|
55 |
* @return $preloaded_comments;
|
56 |
*/
|
57 |
$preloaded_comments = apply_filters('alm_comments_preloaded', $query_args); // located in comments add-on
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
}
|
@@ -86,13 +99,29 @@ elseif($users){
|
|
86 |
* @return $preloaded_users;
|
87 |
*/
|
88 |
$preloaded_users = apply_filters('alm_users_preloaded', $query_args, $preloaded_amount, $repeater, $theme_repeater); // located in Users add-on
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
-
|
|
|
96 |
|
97 |
}
|
98 |
}
|
@@ -109,13 +138,25 @@ elseif($acf && ($acf_field_type !== 'relationship')){
|
|
109 |
* @return $preloaded_acf;
|
110 |
*/
|
111 |
$preloaded_acf = apply_filters('alm_acf_preloaded', $query_args, $repeater, $theme_repeater); //located in ACF add-on
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
-
$preloaded_output .= '</'.$container_element.'>';
|
119 |
}
|
120 |
|
121 |
}
|
@@ -126,12 +167,25 @@ else {
|
|
126 |
|
127 |
/*
|
128 |
* alm_preload_args
|
129 |
-
*
|
130 |
* ALM Preloaded add-on Hook
|
131 |
*
|
132 |
* @return $args;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
*/
|
134 |
-
|
|
|
|
|
135 |
|
136 |
|
137 |
|
@@ -142,6 +196,7 @@ else {
|
|
142 |
*
|
143 |
* @return $args;
|
144 |
*/
|
|
|
145 |
if($filters && has_action('alm_filters_preloaded_args')){
|
146 |
// $args = apply_filters('alm_filters_preloaded_args', $args); // Create filters $args
|
147 |
}
|
@@ -171,9 +226,8 @@ else {
|
|
171 |
|
172 |
$alm_preload_query = new WP_Query($args);
|
173 |
|
174 |
-
$alm_total_posts = $alm_preload_query->found_posts - $offset;
|
175 |
-
|
176 |
-
$output = $noscript = '';
|
177 |
|
178 |
if ($alm_preload_query->have_posts()) :
|
179 |
|
@@ -182,23 +236,24 @@ else {
|
|
182 |
|
183 |
// Filters Wrap [Open]
|
184 |
if($filters && has_filter('alm_filters_reveal_open')){
|
185 |
-
$output .= apply_filters('alm_filters_reveal_open', $transition_container_classes, $canonicalURL);
|
186 |
}
|
187 |
|
188 |
while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
|
189 |
|
190 |
$alm_item++;
|
191 |
$alm_current++;
|
192 |
-
|
193 |
// Call to Action [Before]
|
194 |
-
if($cta && has_action('alm_cta_inc') && $cta_pos
|
195 |
-
$output .= ($alm_current == $cta_val) ?
|
196 |
-
}
|
197 |
|
198 |
-
|
|
|
199 |
|
200 |
// Call to Action [After]
|
201 |
-
if($cta && has_action('alm_cta_inc') && $cta_pos
|
202 |
$output .= ($alm_current == $cta_val) ? apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true) : '';
|
203 |
}
|
204 |
|
@@ -209,10 +264,12 @@ else {
|
|
209 |
$output .= apply_filters('alm_filters_reveal_close', '</div>');
|
210 |
}
|
211 |
|
212 |
-
|
213 |
-
|
214 |
-
|
|
|
215 |
}
|
|
|
216 |
|
217 |
endif;
|
218 |
|
@@ -223,42 +280,35 @@ else {
|
|
223 |
//$alm_total_posts = ($pg > 1 ) ? $alm_total_posts - ($preloaded_amount * $pg) + $preloaded_amount : $alm_total_posts;
|
224 |
}
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
// $querystring = $_SERVER['QUERY_STRING'];
|
233 |
-
$querystring = '';
|
234 |
-
|
235 |
-
if(is_search()){
|
236 |
-
// If search, append slug (?s=term) to data-url
|
237 |
-
$preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL .''. $slug . $querystring .'">';
|
238 |
-
}else{
|
239 |
-
// Append querystring to data-url
|
240 |
-
$querystring = ($querystring) ? '?'.$querystring : '';
|
241 |
-
$preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL . $querystring .'">';
|
242 |
-
}
|
243 |
-
}
|
244 |
-
|
245 |
-
if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
|
246 |
-
$preloaded_output .= '<div class="alm-reveal'. $transition_container_classes .'">';
|
247 |
-
}
|
248 |
|
249 |
-
//
|
250 |
-
$
|
251 |
|
252 |
-
//
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
|
264 |
$ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
|
1 |
<?php
|
2 |
|
3 |
// Preloaded
|
4 |
+
// Get preloaded posts and append to alm object
|
5 |
|
6 |
+
|
7 |
+
// Initial vars
|
8 |
$preloaded_output = '';
|
9 |
$preload_offset = $offset;
|
10 |
|
11 |
+
|
12 |
+
// .alm-reveal default
|
13 |
+
$alm_reveal= '<div class="alm-reveal alm-preloaded'. $transition_container_classes .'">';
|
14 |
+
|
15 |
+
|
16 |
// If $seo or $filters, set $preloaded_amount to $posts_per_page
|
17 |
if((has_action('alm_seo_installed') && $seo === 'true' && !$users) || $filters){
|
18 |
$preloaded_amount = $posts_per_page;
|
19 |
}
|
20 |
|
21 |
+
|
22 |
// Paging Add-on
|
23 |
// Set $preloaded_amount to $posts_per_page
|
24 |
if($paging === 'true'){
|
25 |
$preloaded_amount = $posts_per_page;
|
26 |
+
$preload_offset = ($query_args['paged'] > 1) ? $preloaded_amount * ($query_args['paged'] - 1) : $preload_offset;
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
+
|
30 |
// CTA Add-on
|
31 |
// Parse $cta_position
|
32 |
if($cta){
|
61 |
* @return $preloaded_comments;
|
62 |
*/
|
63 |
$preloaded_comments = apply_filters('alm_comments_preloaded', $query_args); // located in comments add-on
|
64 |
+
|
65 |
+
$total_comments = wp_count_comments( $comments_post_id );
|
66 |
+
|
67 |
+
// Add total_posts to localized ALM JS variables
|
68 |
+
ALM_LOCALIZE::add_localized_var('total_posts', $total_comments->approved, $div_id);
|
69 |
|
70 |
+
// Open .alm-reveal
|
71 |
+
$preloaded_output .= $alm_reveal;
|
72 |
+
|
73 |
+
// Append content
|
74 |
+
$preloaded_output .= $preloaded_comments;
|
75 |
+
|
76 |
+
// Close .alm-reveal
|
77 |
+
$preloaded_output .= '</div>';
|
78 |
}
|
79 |
|
80 |
}
|
99 |
* @return $preloaded_users;
|
100 |
*/
|
101 |
$preloaded_users = apply_filters('alm_users_preloaded', $query_args, $preloaded_amount, $repeater, $theme_repeater); // located in Users add-on
|
102 |
+
|
103 |
+
$preloaded_users_data = $preloaded_users['data'];
|
104 |
+
$preloaded_users_total = $preloaded_users['total'];
|
105 |
+
|
106 |
+
|
107 |
+
// Add total_posts to localized ALM JS variables
|
108 |
+
ALM_LOCALIZE::add_localized_var('total_posts', $preloaded_users_total, $div_id);
|
109 |
+
|
110 |
+
|
111 |
+
// Open .alm-reveal
|
112 |
+
|
113 |
+
if($seo === 'true'){
|
114 |
+
$alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.'">';
|
115 |
+
}
|
116 |
+
|
117 |
+
// Open .alm-reveal
|
118 |
+
$preloaded_output .= $alm_reveal;
|
119 |
+
|
120 |
+
// Append content
|
121 |
+
$preloaded_output .= $preloaded_users_data;
|
122 |
|
123 |
+
// Close .alm-reveal
|
124 |
+
$preloaded_output .= ($seo === "true" || $transition_container_classes !== 'false') ? '</div>' : '';
|
125 |
|
126 |
}
|
127 |
}
|
138 |
* @return $preloaded_acf;
|
139 |
*/
|
140 |
$preloaded_acf = apply_filters('alm_acf_preloaded', $query_args, $repeater, $theme_repeater); //located in ACF add-on
|
141 |
+
|
142 |
+
|
143 |
+
// Add total_posts to localized ALM JS variables
|
144 |
+
ALM_LOCALIZE::add_localized_var('total_posts', apply_filters('alm_acf_total_rows', $query_args), $div_id);
|
145 |
+
|
146 |
+
// Open .alm-reveal
|
147 |
+
if($seo === 'true'){
|
148 |
+
$alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.'">';
|
149 |
+
}
|
150 |
|
151 |
+
// Open .alm-reveal
|
152 |
+
$preloaded_output .= $alm_reveal;
|
153 |
+
|
154 |
+
// Append content
|
155 |
+
$preloaded_output .= $preloaded_acf;
|
156 |
+
|
157 |
+
// Close .alm-reveal
|
158 |
+
$preloaded_output .= ($seo === "true" || $transition_container_classes !== 'false') ? '</div>' : '';
|
159 |
|
|
|
160 |
}
|
161 |
|
162 |
}
|
167 |
|
168 |
/*
|
169 |
* alm_preload_args
|
|
|
170 |
* ALM Preloaded add-on Hook
|
171 |
*
|
172 |
* @return $args;
|
173 |
+
* @deprecated in 3.7
|
174 |
+
*/
|
175 |
+
//$args = apply_filters('alm_preload_args', $query_args); // Create preloaded $args
|
176 |
+
|
177 |
+
|
178 |
+
|
179 |
+
/*
|
180 |
+
* alm_get_queryargs
|
181 |
+
* This function will return an $args array for the ALM WP_Query
|
182 |
+
*
|
183 |
+
* @return $args;
|
184 |
+
* @since in 3.7
|
185 |
*/
|
186 |
+
if(class_exists('ALM_QUERY_ARGS')){
|
187 |
+
$args = ALM_QUERY_ARGS::alm_build_queryargs($query_args, false);
|
188 |
+
}
|
189 |
|
190 |
|
191 |
|
196 |
*
|
197 |
* @return $args;
|
198 |
*/
|
199 |
+
|
200 |
if($filters && has_action('alm_filters_preloaded_args')){
|
201 |
// $args = apply_filters('alm_filters_preloaded_args', $args); // Create filters $args
|
202 |
}
|
226 |
|
227 |
$alm_preload_query = new WP_Query($args);
|
228 |
|
229 |
+
$alm_total_posts = $alm_preload_query->found_posts - $offset;
|
230 |
+
$output = '';
|
|
|
231 |
|
232 |
if ($alm_preload_query->have_posts()) :
|
233 |
|
236 |
|
237 |
// Filters Wrap [Open]
|
238 |
if($filters && has_filter('alm_filters_reveal_open')){
|
239 |
+
$output .= apply_filters('alm_filters_reveal_open', $transition_container_classes, $canonicalURL, true);
|
240 |
}
|
241 |
|
242 |
while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
|
243 |
|
244 |
$alm_item++;
|
245 |
$alm_current++;
|
246 |
+
|
247 |
// Call to Action [Before]
|
248 |
+
if($cta && has_action('alm_cta_inc') && $cta_pos === 'before'){
|
249 |
+
$output .= ($alm_current == $cta_val) ? apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true) : '';
|
250 |
+
}
|
251 |
|
252 |
+
// Repeater Template
|
253 |
+
$output .= alm_loop($repeater, $type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
|
254 |
|
255 |
// Call to Action [After]
|
256 |
+
if($cta && has_action('alm_cta_inc') && $cta_pos === 'after'){
|
257 |
$output .= ($alm_current == $cta_val) ? apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true) : '';
|
258 |
}
|
259 |
|
264 |
$output .= apply_filters('alm_filters_reveal_close', '</div>');
|
265 |
}
|
266 |
|
267 |
+
|
268 |
+
// If SEO, create noscript pagination
|
269 |
+
if(has_action('alm_seo_installed') && $seo === 'true'){
|
270 |
+
$noscript_pagingnav = apply_filters('alm_noscript_pagination', $alm_preload_query); // Build pagination
|
271 |
}
|
272 |
+
|
273 |
|
274 |
endif;
|
275 |
|
280 |
//$alm_total_posts = ($pg > 1 ) ? $alm_total_posts - ($preloaded_amount * $pg) + $preloaded_amount : $alm_total_posts;
|
281 |
}
|
282 |
|
283 |
+
|
284 |
+
// Add total_posts to localized ALM JS variables
|
285 |
+
ALM_LOCALIZE::add_localized_var('total_posts', $alm_total_posts, $div_id);
|
286 |
+
|
287 |
+
|
288 |
+
if($seo === "true"){ // SEO, not Paging
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
|
290 |
+
// Get querystring to append to URL (Maybe in the future)
|
291 |
+
$querystring = ''; // $querystring = $_SERVER['QUERY_STRING'];
|
292 |
|
293 |
+
// If search, append slug (?s=term) to data-url
|
294 |
+
$search_slug = (is_search()) ? $slug : '';
|
295 |
+
|
296 |
+
// Append querystring to data-url
|
297 |
+
$querystring = ($querystring) ? '?'.$querystring : '';
|
298 |
+
|
299 |
+
$alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL .''. $search_slug . $querystring .'">';
|
300 |
+
|
301 |
+
}
|
302 |
+
|
303 |
+
// Open .alm-reveal
|
304 |
+
$preloaded_output .= $alm_reveal;
|
305 |
+
|
306 |
+
// Append content
|
307 |
+
$preloaded_output .= $output;
|
308 |
+
|
309 |
+
// Close .alm-reveal
|
310 |
+
$preloaded_output .= '</div>';
|
311 |
+
|
312 |
}
|
313 |
|
314 |
$ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
|
core/dist/js/ajax-load-more.js
CHANGED
@@ -239,6 +239,9 @@ var almGetAjaxParams = function almGetAjaxParams(alm, action, queryType) {
|
|
239 |
if (alm.content.attr('data-search')) {
|
240 |
data.search = alm.content.attr('data-search');
|
241 |
}
|
|
|
|
|
|
|
242 |
if (alm.content.attr('data-custom-args')) {
|
243 |
data.custom_args = alm.content.attr('data-custom-args');
|
244 |
}
|
@@ -558,6 +561,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
558 |
*/
|
559 |
|
560 |
(function ($) {
|
|
|
561 |
"use strict";
|
562 |
|
563 |
$.ajaxloadmore = function (el, e) {
|
@@ -581,10 +585,11 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
581 |
alm.finished = false;
|
582 |
alm.prefix = 'alm-';
|
583 |
alm.el = el;
|
|
|
584 |
alm.container = el;
|
585 |
alm.container.addClass('alm-' + e).attr('data-alm-id', e); // Add unique classname and data id
|
586 |
alm.content = $('.alm-ajax', alm.container);
|
587 |
-
alm.content_preloaded = $('.alm-
|
588 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
589 |
alm.is_search = alm.el.attr('data-search');
|
590 |
alm.slug = alm.el.attr('data-slug');
|
@@ -598,6 +603,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
598 |
alm.post_type = alm.post_type.split(",");
|
599 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
600 |
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
|
|
601 |
alm.button_label = alm.content.attr('data-button-label');
|
602 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
603 |
alm.scroll_distance = alm.content.attr('data-scroll-distance');
|
@@ -669,6 +675,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
669 |
|
670 |
alm.preloaded = alm.content.attr('data-preloaded'); // Preloaded add-on
|
671 |
alm.preloaded_amount = alm.content.attr('data-preloaded-amount');
|
|
|
672 |
|
673 |
alm.paging = alm.content.attr('data-paging'); // Paging add-on
|
674 |
|
@@ -736,9 +743,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
736 |
alm.paging_show_at_most = alm.paging_show_at_most === undefined ? 7 : alm.paging_show_at_most;
|
737 |
|
738 |
// If preloaded, pause ALM
|
739 |
-
|
740 |
-
alm.pause = true;
|
741 |
-
}
|
742 |
} else {
|
743 |
alm.paging = false;
|
744 |
}
|
@@ -762,13 +767,22 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
762 |
/* Preloaded */
|
763 |
/* If posts_per_page <= preloaded_total_posts disable ajax load more */
|
764 |
if (alm.preloaded === 'true') {
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
772 |
}
|
773 |
} else {
|
774 |
alm.preloaded = 'false';
|
@@ -929,8 +943,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
929 |
}
|
930 |
alm.masonry_wrap = alm.content;
|
931 |
alm.transition_container = false;
|
932 |
-
if (
|
933 |
-
alm.masonry_wrap = alm.content_preloaded;
|
934 |
alm.is_masonry_preloaded = true;
|
935 |
}
|
936 |
}
|
@@ -1267,7 +1280,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1267 |
alm.button.html(alm.button_label);
|
1268 |
} else {
|
1269 |
|
1270 |
-
//
|
1271 |
if (total > 0) {
|
1272 |
alm.el = $('<div class="alm-reveal' + alm.tcc + '" ' + loadingStyle + '/>');
|
1273 |
alm.el.append('<div class="alm-paging-content' + alm.tcc + '"></div><div class="alm-paging-loading"></div>');
|
@@ -1310,19 +1323,16 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1310 |
alm.posts_per_page = alm.users ? alm.content.attr('data-users-per-page') : alm.content.attr('data-posts-per-page');
|
1311 |
|
1312 |
// SEO add-on
|
1313 |
-
|
1314 |
-
// Set new page #
|
1315 |
-
alm.page = alm.start_page - 1;
|
1316 |
-
}
|
1317 |
|
1318 |
// Filters add-on
|
1319 |
if (alm.filters) {
|
1320 |
|
1321 |
if (alm.filters_startpage) {
|
|
|
|
|
1322 |
|
1323 |
-
|
1324 |
-
|
1325 |
-
// Reset filters-startpage data attr after the first run
|
1326 |
alm.posts_per_page = alm.content.attr('data-posts-per-page');
|
1327 |
}
|
1328 |
}
|
@@ -1351,47 +1361,66 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1351 |
var pagenum = void 0;
|
1352 |
var querystring = window.location.search;
|
1353 |
|
1354 |
-
// SEO
|
1355 |
if (alm.init && alm.start_page > 1) {
|
1356 |
-
// loop through items and break into separate alm-reveal divs for paging
|
1357 |
|
1358 |
var seo_data = [];
|
|
|
1359 |
var posts_per_page = parseInt(alm.posts_per_page);
|
|
|
1360 |
|
|
|
|
|
|
|
|
|
1361 |
if (alm.cta === 'true') {
|
1362 |
-
|
1363 |
-
|
|
|
1364 |
}
|
1365 |
|
1366 |
-
|
1367 |
for (var i = 0; i < total; i += posts_per_page) {
|
1368 |
seo_data.push(alm.data.slice(i, posts_per_page + i));
|
1369 |
}
|
1370 |
|
1371 |
-
|
1372 |
-
|
1373 |
for (var k = 0; k < seo_data.length; k++) {
|
1374 |
|
1375 |
var p = alm.preloaded === 'true' ? 1 : 0; // Add 1 page if items are preloaded.
|
1376 |
-
var
|
1377 |
|
1378 |
if (k > 0 || alm.preloaded === 'true') {
|
|
|
1379 |
// > Paged
|
1380 |
pagenum = k + 1 + p;
|
|
|
1381 |
if (alm.permalink === 'default') {
|
1382 |
-
|
1383 |
} else {
|
1384 |
-
|
1385 |
}
|
1386 |
} else {
|
1387 |
-
// First Page
|
1388 |
-
|
|
|
1389 |
}
|
1390 |
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1394 |
}
|
|
|
|
|
|
|
|
|
1395 |
}
|
1396 |
// End SEO
|
1397 |
|
@@ -1445,6 +1474,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
1445 |
|
1446 |
// Transitions
|
1447 |
|
|
|
1448 |
// Masonry
|
1449 |
if (alm.transition === 'masonry') {
|
1450 |
almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_columnwidth, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.masonry_init, alm.init, alm_is_filtering);
|
@@ -2005,8 +2035,8 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
|
|
2005 |
if (alm.paging_init && alm.preloaded === 'true') {
|
2006 |
|
2007 |
// Paging + Preloaded Firstrun
|
2008 |
-
data = $('.alm-
|
2009 |
-
$('.alm-
|
2010 |
alm.preloaded_amount = 0; // Reset
|
2011 |
alm.AjaxLoadMore.pagingPreloadedInit(data);
|
2012 |
alm.paging_init = false;
|
239 |
if (alm.content.attr('data-search')) {
|
240 |
data.search = alm.content.attr('data-search');
|
241 |
}
|
242 |
+
if (alm.content.attr('data-s')) {
|
243 |
+
data.search = alm.content.attr('data-s');
|
244 |
+
}
|
245 |
if (alm.content.attr('data-custom-args')) {
|
246 |
data.custom_args = alm.content.attr('data-custom-args');
|
247 |
}
|
561 |
*/
|
562 |
|
563 |
(function ($) {
|
564 |
+
|
565 |
"use strict";
|
566 |
|
567 |
$.ajaxloadmore = function (el, e) {
|
585 |
alm.finished = false;
|
586 |
alm.prefix = 'alm-';
|
587 |
alm.el = el;
|
588 |
+
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
589 |
alm.container = el;
|
590 |
alm.container.addClass('alm-' + e).attr('data-alm-id', e); // Add unique classname and data id
|
591 |
alm.content = $('.alm-ajax', alm.container);
|
592 |
+
alm.content_preloaded = $('.alm-preloaded', alm.container);
|
593 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
594 |
alm.is_search = alm.el.attr('data-search');
|
595 |
alm.slug = alm.el.attr('data-slug');
|
603 |
alm.post_type = alm.post_type.split(",");
|
604 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
605 |
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
606 |
+
alm.btnWrap.get(0).style.visibility = 'visible';
|
607 |
alm.button_label = alm.content.attr('data-button-label');
|
608 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
609 |
alm.scroll_distance = alm.content.attr('data-scroll-distance');
|
675 |
|
676 |
alm.preloaded = alm.content.attr('data-preloaded'); // Preloaded add-on
|
677 |
alm.preloaded_amount = alm.content.attr('data-preloaded-amount');
|
678 |
+
alm.is_preloaded = alm.content.attr('data-is-preloaded') === 'true' ? true : false;
|
679 |
|
680 |
alm.paging = alm.content.attr('data-paging'); // Paging add-on
|
681 |
|
743 |
alm.paging_show_at_most = alm.paging_show_at_most === undefined ? 7 : alm.paging_show_at_most;
|
744 |
|
745 |
// If preloaded, pause ALM
|
746 |
+
alm.pause = alm.preloaded === 'true' ? true : alm.pause;
|
|
|
|
|
747 |
} else {
|
748 |
alm.paging = false;
|
749 |
}
|
767 |
/* Preloaded */
|
768 |
/* If posts_per_page <= preloaded_total_posts disable ajax load more */
|
769 |
if (alm.preloaded === 'true') {
|
770 |
+
|
771 |
+
// Get Preloaded Amount
|
772 |
+
alm.preloaded_amount = alm.preloaded_amount === undefined ? alm.posts_per_page : alm.preloaded_amount;
|
773 |
+
|
774 |
+
// Get the preloaded localized <script> object to get total_posts
|
775 |
+
var var_master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
776 |
+
var_master_id = var_master_id + '_vars'; // This is the localize variable on the screen (ajax_load_more_vars)
|
777 |
+
|
778 |
+
var preloaded_vars = window[var_master_id]; // Get localize vars
|
779 |
+
|
780 |
+
// Disable ALM if total_posts is </= preloaded_amount
|
781 |
+
if (preloaded_vars && preloaded_vars.total_posts) {
|
782 |
+
if (parseInt(preloaded_vars.total_posts) <= parseInt(alm.preloaded_amount)) {
|
783 |
+
alm.preloaded_total_posts = preloaded_vars.total_posts;
|
784 |
+
alm.disable_ajax = true;
|
785 |
+
}
|
786 |
}
|
787 |
} else {
|
788 |
alm.preloaded = 'false';
|
943 |
}
|
944 |
alm.masonry_wrap = alm.content;
|
945 |
alm.transition_container = false;
|
946 |
+
if (alm.preloaded === 'true') {
|
|
|
947 |
alm.is_masonry_preloaded = true;
|
948 |
}
|
949 |
}
|
1280 |
alm.button.html(alm.button_label);
|
1281 |
} else {
|
1282 |
|
1283 |
+
// Paging
|
1284 |
if (total > 0) {
|
1285 |
alm.el = $('<div class="alm-reveal' + alm.tcc + '" ' + loadingStyle + '/>');
|
1286 |
alm.el.append('<div class="alm-paging-content' + alm.tcc + '"></div><div class="alm-paging-loading"></div>');
|
1323 |
alm.posts_per_page = alm.users ? alm.content.attr('data-users-per-page') : alm.content.attr('data-posts-per-page');
|
1324 |
|
1325 |
// SEO add-on
|
1326 |
+
alm.page = alm.start_page ? alm.start_page - 1 : alm.page; // Set new page #
|
|
|
|
|
|
|
1327 |
|
1328 |
// Filters add-on
|
1329 |
if (alm.filters) {
|
1330 |
|
1331 |
if (alm.filters_startpage) {
|
1332 |
+
// Set new page #
|
1333 |
+
alm.page = alm.filters_startpage - 1;
|
1334 |
|
1335 |
+
// Reset filters-startpage data after the first run
|
|
|
|
|
1336 |
alm.posts_per_page = alm.content.attr('data-posts-per-page');
|
1337 |
}
|
1338 |
}
|
1361 |
var pagenum = void 0;
|
1362 |
var querystring = window.location.search;
|
1363 |
|
1364 |
+
// SEO, init and paged
|
1365 |
if (alm.init && alm.start_page > 1) {
|
1366 |
+
// loop through items and break into separate .alm-reveal divs for paging
|
1367 |
|
1368 |
var seo_data = [];
|
1369 |
+
var container_array = [];
|
1370 |
var posts_per_page = parseInt(alm.posts_per_page);
|
1371 |
+
var pages = Math.ceil(total / posts_per_page);
|
1372 |
|
1373 |
+
// Set alm.el to be .alm-listing div
|
1374 |
+
alm.el = alm.content;
|
1375 |
+
|
1376 |
+
// Call to Actions
|
1377 |
if (alm.cta === 'true') {
|
1378 |
+
posts_per_page = posts_per_page + 1; // Add 1 to posts_per_page for CTAs
|
1379 |
+
pages = Math.ceil(total / posts_per_page); // Update pages var with new posts_per_page
|
1380 |
+
total = pages + total; // Get new total w/ CTAs added
|
1381 |
}
|
1382 |
|
1383 |
+
// Slice seo_data array into induvidual pages
|
1384 |
for (var i = 0; i < total; i += posts_per_page) {
|
1385 |
seo_data.push(alm.data.slice(i, posts_per_page + i));
|
1386 |
}
|
1387 |
|
1388 |
+
// Loop seo_data to build .alm-reveal data attributes
|
|
|
1389 |
for (var k = 0; k < seo_data.length; k++) {
|
1390 |
|
1391 |
var p = alm.preloaded === 'true' ? 1 : 0; // Add 1 page if items are preloaded.
|
1392 |
+
var div_reveal = void 0;
|
1393 |
|
1394 |
if (k > 0 || alm.preloaded === 'true') {
|
1395 |
+
|
1396 |
// > Paged
|
1397 |
pagenum = k + 1 + p;
|
1398 |
+
|
1399 |
if (alm.permalink === 'default') {
|
1400 |
+
div_reveal = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '&paged=' + pagenum + '" data-page="' + pagenum + '" />');
|
1401 |
} else {
|
1402 |
+
div_reveal = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + alm.seo_leading_slash + 'page/' + pagenum + alm.seo_trailing_slash + alm.search_value + '" data-page="' + pagenum + '" />');
|
1403 |
}
|
1404 |
} else {
|
1405 |
+
// First Page
|
1406 |
+
var preloaded_class = alm.is_preloaded ? ' alm-preloaded' : '';
|
1407 |
+
div_reveal = $('<div class="alm-reveal alm-seo' + preloaded_class + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '" data-page="1" />');
|
1408 |
}
|
1409 |
|
1410 |
+
// Append data to div_reveal and add to container_array
|
1411 |
+
container_array.push(div_reveal.append(seo_data[k]));
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
// Reverse the container_array so we start at page 1
|
1415 |
+
//container_array.reverse();
|
1416 |
+
for (var x = 0; x < container_array.length; x++) {
|
1417 |
+
//alm.el.prepend(container_array[x]);
|
1418 |
+
alm.el.append(container_array[x]);
|
1419 |
}
|
1420 |
+
|
1421 |
+
// Set opacity and height of .alm-listing div to allow for fadein.
|
1422 |
+
alm.el.get(0).style.opacity = 0;
|
1423 |
+
alm.el.get(0).style.height = 0;
|
1424 |
}
|
1425 |
// End SEO
|
1426 |
|
1474 |
|
1475 |
// Transitions
|
1476 |
|
1477 |
+
|
1478 |
// Masonry
|
1479 |
if (alm.transition === 'masonry') {
|
1480 |
almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_columnwidth, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.masonry_init, alm.init, alm_is_filtering);
|
2035 |
if (alm.paging_init && alm.preloaded === 'true') {
|
2036 |
|
2037 |
// Paging + Preloaded Firstrun
|
2038 |
+
data = $('.alm-reveal', alm.el).html(); // Content of preloaded page
|
2039 |
+
$('.alm-reveal', alm.el).remove();
|
2040 |
alm.preloaded_amount = 0; // Reset
|
2041 |
alm.AjaxLoadMore.pagingPreloadedInit(data);
|
2042 |
alm.paging_init = false;
|
core/dist/js/ajax-load-more.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";Array.from||(Array.from=function(){var a=Object.prototype.toString,l=function(t){return"function"==typeof t||"[object Function]"===a.call(t)},o=Math.pow(2,53)-1,d=function(t){var a,e=(a=Number(t),isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a);return Math.min(Math.max(e,0),o)};return function(t){var a=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e,o=1<arguments.length?arguments[1]:void 0;if(void 0!==o){if(!l(o))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(e=arguments[2])}for(var n,r=d(a.length),s=l(this)?Object(new this(r)):new Array(r),i=0;i<r;)n=a[i],s[i]=o?void 0===e?o(n,i):o.call(e,n,i):n,i+=1;return s.length=r,s}}());var almGetParameterByName=function(t,a){a||(a=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var e=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(a);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null},almGetAjaxParams=function(t,a,e){var o={action:a,nonce:alm_localize.alm_nonce,query_type:e,id:t.id,post_id:t.post_id,slug:t.slug,canonical_url:t.canonical_url,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,post_type:t.post_type,repeater:t.repeater,seo_start_page:t.start_page};return t.theme_repeater&&(o.theme_repeater=t.theme_repeater),t.paging&&(o.paging=t.paging),t.preloaded&&(o.preloaded=t.preloaded,o.preloaded_amount=t.preloaded_amount),"true"===t.cache&&(o.cache_id=t.cache_id,o.cache_logged_in=t.cache_logged_in),t.acf_array&&(o.acf=t.acf_array),t.cta_array&&(o.cta=t.cta_array),t.comments_array&&(o.comments=t.comments_array),t.nextpage_array&&(o.nextpage=t.nextpage_array),t.previous_post_array&&(o.previous_post=t.previous_post_array),t.users_array&&(o.users=t.users_array),t.content.attr("data-lang")&&(o.lang=t.content.attr("data-lang")),t.content.attr("data-sticky-posts")&&(o.sticky_posts=t.content.attr("data-sticky-posts")),t.content.attr("data-post-format")&&(o.post_format=t.content.attr("data-post-format")),t.content.attr("data-category")&&(o.category=t.content.attr("data-category")),t.content.attr("data-category-not-in")&&(o.category__not_in=t.content.attr("data-category-not-in")),t.content.attr("data-tag")&&(o.tag=t.content.attr("data-tag")),t.content.attr("data-tag-not-in")&&(o.tag__not_in=t.content.attr("data-tag-not-in")),t.content.attr("data-taxonomy")&&(o.taxonomy=t.content.attr("data-taxonomy")),t.content.attr("data-taxonomy-terms")&&(o.taxonomy_terms=t.content.attr("data-taxonomy-terms")),t.content.attr("data-taxonomy-operator")&&(o.taxonomy_operator=t.content.attr("data-taxonomy-operator")),t.content.attr("data-taxonomy-relation")&&(o.taxonomy_relation=t.content.attr("data-taxonomy-relation")),t.content.attr("data-meta-key")&&(o.meta_key=t.content.attr("data-meta-key")),t.content.attr("data-meta-value")&&(o.meta_value=t.content.attr("data-meta-value")),t.content.attr("data-meta-compare")&&(o.meta_compare=t.content.attr("data-meta-compare")),t.content.attr("data-meta-relation")&&(o.meta_relation=t.content.attr("data-meta-relation")),t.content.attr("data-meta-type")&&(o.meta_type=t.content.attr("data-meta-type")),t.content.attr("data-author")&&(o.author=t.content.attr("data-author")),t.content.attr("data-year")&&(o.year=t.content.attr("data-year")),t.content.attr("data-month")&&(o.month=t.content.attr("data-month")),t.content.attr("data-day")&&(o.day=t.content.attr("data-day")),t.content.attr("data-order")&&(o.order=t.content.attr("data-order")),t.content.attr("data-orderby")&&(o.orderby=t.content.attr("data-orderby")),t.content.attr("data-post-status")&&(o.post_status=t.content.attr("data-post-status")),t.content.attr("data-post-in")&&(o.post__in=t.content.attr("data-post-in")),t.content.attr("data-post-not-in")&&(o.post__not_in=t.content.attr("data-post-not-in")),t.content.attr("data-exclude")&&(o.exclude=t.content.attr("data-exclude")),t.content.attr("data-search")&&(o.search=t.content.attr("data-search")),t.content.attr("data-custom-args")&&(o.custom_args=t.content.attr("data-custom-args")),o},almGetRestParams=function(t){return{id:t.id,post_id:t.post_id,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,slug:t.slug,canonical_url:t.canonical_url,post_type:t.post_type,post_format:t.content.attr("data-post-format"),category:t.content.attr("data-category"),category__not_in:t.content.attr("data-category-not-in"),tag:t.content.attr("data-tag"),tag__not_in:t.content.attr("data-tag-not-in"),taxonomy:t.content.attr("data-taxonomy"),taxonomy_terms:t.content.attr("data-taxonomy-terms"),taxonomy_operator:t.content.attr("data-taxonomy-operator"),taxonomy_relation:t.content.attr("data-taxonomy-relation"),meta_key:t.content.attr("data-meta-key"),meta_value:t.content.attr("data-meta-value"),meta_compare:t.content.attr("data-meta-compare"),meta_relation:t.content.attr("data-meta-relation"),meta_type:t.content.attr("data-meta-type"),author:t.content.attr("data-author"),year:t.content.attr("data-year"),month:t.content.attr("data-month"),day:t.content.attr("data-day"),post_status:t.content.attr("data-post-status"),order:t.content.attr("data-order"),orderby:t.content.attr("data-orderby"),post__in:t.content.attr("data-post-in"),post__not_in:t.content.attr("data-post-not-in"),search:t.content.attr("data-search"),custom_args:t.content.attr("data-custom-args"),lang:t.lang,preloaded:t.preloaded,preloaded_amount:t.preloaded_amount,seo_start_page:t.start_page}};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}var alm_is_filtering=!1;!function(r){r.fn.almFilter=function(e,o,n){n.target?r(".ajax-load-more-wrap[data-id='"+n.target+"']").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)}):r(".ajax-load-more-wrap").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)})},r.fn.almFilterTransition=function(t,a,e,o){"slide"===t?o.slideUp(a,function(){n(a,e,o)}):"fade"===t||"masonry"===t?o.fadeOut(a,function(){n(a,e,o)}):n(a,e,o)};var n=function(t,a,e){var o=e.get(0),n=o.querySelectorAll(".alm-listing");[].concat(_toConsumableArray(n)).forEach(function(t){t.innerHTML=""});var r=o.querySelector(".alm-load-more-btn");r&&r.classList.remove("done"),s(t,a,e)},s=function(t,a,e){r.each(a,function(t,a){t=t.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),r(".alm-listing",e).attr("data-"+t,a)}),r.isFunction(r.fn.almFilterComplete)&&r.fn.almFilterComplete(),"function"==typeof almFiltersAddonComplete&&almFiltersAddonComplete(e),alm_is_filtering=!0,e.fadeIn(t),a.target?r(".ajax-load-more-wrap[data-id="+a.target+"]").ajaxloadmore():r(".ajax-load-more-wrap").ajaxloadmore()}}(jQuery);var almMasonry=function t(o,a,n,r,e,s,i,l,d,p){var c=(i+100)/1e3+"s",_="scale(0.5)",g="scale(1)";"zoom-out"===e&&(_="translateY(-20px) scale(1.25)",g="translateY(0) scale(1)"),"slide-up"===e&&(_="translateY(50px)",g="translateY(0)"),"slide-down"===e&&(_="translateY(-50px)",g="translateY(0)"),"none"===e&&(g=_="translateY(0)"),r?isNaN(r)||(r=parseInt(r)):r=n,s="true"===s,p?(o.masonry("destroy"),o[0].parentNode.style.opacity=0,o.append(a),t(o,a,n,r,e,s,i,!0,!0,!1)):l&&d?o.imagesLoaded(function(){var a={itemSelector:n,transitionDuration:c,columnWidth:r,horizontalOrder:s,hiddenStyle:{transform:_,opacity:0},visibleStyle:{transform:g,opacity:1}},e=e;e&&Object.keys(e).forEach(function(t){a[t]=e[t]}),o.masonry(a),almMasonryFadeIn(o[0].parentNode,i)}):a.imagesLoaded(function(){o.append(a).masonry("appended",a)})},almMasonryFadeIn=function(t,a){a/=10;var e=parseInt(t.style.opacity),o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a)};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}!function(y){y.ajaxloadmore=function(t,a){"true"===alm_localize.scrolltop&&y(window).scrollTop(0);var f=this;if(f.AjaxLoadMore={},f.window=y(window),f.page=0,f.posts=0,f.totalposts=0,f.proceed=!1,f.disable_ajax=!1,f.init=!0,f.loading=!0,f.finished=!1,f.prefix="alm-",f.el=t,f.container=t,f.container.addClass("alm-"+a).attr("data-alm-id",a),f.content=y(".alm-ajax",f.container),f.content_preloaded=y(".alm-listing.alm-preloaded",f.container),f.canonical_url=f.el.attr("data-canonical-url"),f.is_search=f.el.attr("data-search"),f.slug=f.el.attr("data-slug"),f.post_id=f.el.attr("data-post-id"),f.id=f.el.attr("data-id")?f.el.attr("data-id"):"",f.repeater=f.content.attr("data-repeater"),f.theme_repeater=f.content.attr("data-theme-repeater"),f.post_type=f.content.attr("data-post-type"),f.post_type=f.post_type.split(","),f.sticky_posts=f.content.attr("data-sticky-posts"),f.btnWrap=y(".alm-btn-wrap",f.container),f.button_label=f.content.attr("data-button-label"),f.button_loading_label=f.content.attr("data-button-loading-label"),f.scroll_distance=f.content.attr("data-scroll-distance"),f.scroll_distance=f.scroll_distance?parseInt(f.scroll_distance):150,f.scroll_container=f.content.attr("data-scroll-container"),f.max_pages=f.content.attr("data-max-pages"),f.max_pages=f.max_pages?parseInt(f.max_pages):0,f.pause_override=f.content.attr("data-pause-override"),f.pause=f.content.attr("data-pause"),f.transition=f.content.attr("data-transition"),f.transition_container=f.content.attr("data-transition-container"),f.tcc=f.content.attr("data-transition-container-classes"),f.speed=250,f.images_loaded=f.content.attr("data-images-loaded"),f.destroy_after=f.content.attr("data-destroy-after"),f.orginal_posts_per_page=f.content.attr("data-posts-per-page"),f.posts_per_page=f.content.attr("data-posts-per-page"),f.offset=f.content.attr("data-offset"),f.cache=f.content.attr("data-cache"),f.cache_id=f.content.attr("data-cache-id"),f.cache_path=f.content.attr("data-cache-path"),f.cache_logged_in=f.content.attr("data-cache-logged-in"),f.cta=f.content.attr("data-cta"),f.cta_position=f.content.attr("data-cta-position"),f.cta_repeater=f.content.attr("data-cta-repeater"),f.cta_theme_repeater=f.content.attr("data-cta-theme-repeater"),f.acf=f.content.attr("data-acf"),f.acf_field_type=f.content.attr("data-acf-field-type"),f.acf_field_name=f.content.attr("data-acf-field-name"),f.acf_post_id=f.content.attr("data-acf-post-id"),f.nextpage=f.content.attr("data-nextpage"),f.nextpage_urls=f.content.attr("data-nextpage-urls"),f.nextpage_scroll=f.content.attr("data-nextpage-scroll"),f.nextpage_pageviews=f.content.attr("data-nextpage-pageviews"),f.nextpage_post_id=f.content.attr("data-nextpage-post-id"),f.nextpage_startpage=f.content.attr("data-nextpage-startpage"),f.previous_post=f.content.attr("data-previous-post"),f.previous_post_id=f.content.attr("data-previous-post-id"),f.previous_post_taxonomy=f.content.attr("data-previous-post-taxonomy"),f.previous_post_excluded_terms=f.content.attr("data-previous-post-excluded-terms"),f.comments=f.content.attr("data-comments"),"true"===f.comments&&(f.content=y(".alm-comments",f.container)),f.comments_post_id=f.content.attr("data-comments_post_id"),f.comments_per_page=f.content.attr("data-comments_per_page"),f.comments_type=f.content.attr("data-comments_type"),f.comments_style=f.content.attr("data-comments_style"),f.comments_template=f.content.attr("data-comments_template"),f.comments_callback=f.content.attr("data-comments_callback"),f.filters=f.content.attr("data-filters"),f.restapi=f.content.attr("data-restapi"),f.restapi_base_url=f.content.attr("data-restapi-base-url"),f.restapi_namespace=f.content.attr("data-restapi-namespace"),f.restapi_endpoint=f.content.attr("data-restapi-endpoint"),f.restapi_template_id=f.content.attr("data-restapi-template-id"),f.restapi_debug=f.content.attr("data-restapi-debug"),f.seo=f.content.attr("data-seo"),f.preloaded=f.content.attr("data-preloaded"),f.preloaded_amount=f.content.attr("data-preloaded-amount"),f.paging=f.content.attr("data-paging"),f.users="true"===f.content.attr("data-users"),f.users&&(f.orginal_posts_per_page=f.content.attr("data-users-per-page"),f.posts_per_page=f.content.attr("data-users-per-page")),"true"===f.filters){f.filters=!0,f.filters_analtyics=f.content.attr("data-filters-analtyics"),f.filters_debug=f.content.attr("data-filters-debug"),f.filters_startpage=0;var e=almGetParameterByName("pg");null!==e&&(f.filters_startpage=parseInt(e),f.page=f.filters_startpage),f.isPaged=!1,0<f.filters_startpage&&(f.isPaged=!0,f.page=f.filters_startpage-1)}else f.filters=!1;"true"===f.restapi?(f.restapi=!0,void 0===f.restapi_debug&&(f.restapi_debug=!1),""===f.restapi_template_id&&(f.restapi=!1)):f.restapi=!1,"true"===f.paging?(f.paging=!0,f.paging_controls=!!f.content.attr("data-paging-controls"),f.paging_show_at_most=f.content.attr("data-paging-show-at-most"),f.paging_classes=f.content.attr("data-paging-classes"),f.paging_init=!0,f.paging_show_at_most=void 0===f.paging_show_at_most?7:f.paging_show_at_most,"true"===f.preloaded&&(f.pause=!0)):f.paging=!1,void 0===f.cache&&(f.cache=!1),void 0===f.cache_logged_in&&(f.cache_logged_in=!1),void 0===f.comments_per_page&&(f.comments_per_page="5"),"true"===f.preloaded?(f.preload_wrap=f.content.prev(".alm-preloaded"),f.preloaded_total_posts=parseInt(f.preload_wrap.attr("data-total-posts")),void 0===f.preloaded_amount&&(f.preloaded_amount=!1),f.preloaded_total_posts<=f.preloaded_amount&&(f.disable_ajax=!0)):f.preloaded="false",void 0===f.seo&&(f.seo=!1),"true"===f.seo&&(f.seo=!0),void 0===f.is_search&&(f.is_search=!1),f.search_value="true"===f.is_search?f.slug:"",f.permalink=f.content.attr("data-seo-permalink"),f.pageview=f.content.attr("data-seo-pageview"),f.start_page=f.content.attr("data-seo-start-page"),f.seo_trailing_slash="false"===f.content.attr("data-seo-trailing-slash")?"":"/",f.seo_leading_slash="true"===f.content.attr("data-seo-leading-slash")?"/":"",f.start_page?(f.seo_scroll=f.content.attr("data-seo-scroll"),f.seo_scroll_speed=f.content.attr("data-seo-scroll-speed"),f.seo_scrolltop=f.content.attr("data-seo-scrolltop"),f.seo_controls=f.content.attr("data-seo-controls"),f.isPaged=!1,1<f.start_page&&(f.isPaged=!0,f.posts_per_page=f.start_page*f.posts_per_page),f.paging&&(f.posts_per_page=f.orginal_posts_per_page)):f.start_page=1,"true"===f.nextpage?(f.nextpage=!0,f.posts_per_page=1):f.nextpage=!1,void 0===f.nextpage_urls&&(f.nextpage_urls="true"),void 0===f.nextpage_scroll&&(f.nextpage_scroll="250:30"),void 0===f.nextpage_pageviews&&(f.nextpage_pageviews="true"),void 0===f.nextpage_post_id&&(f.nextpage=!1,f.nextpage_post_id=null),void 0===f.nextpage_startpage&&(f.nextpage_startpage=1),1<f.nextpage_startpage&&(f.isPaged=!0),f.acf="true"===f.acf,void 0!==f.acf_field_type&&void 0!==f.acf_field_name&&void 0!==f.acf_post_id||(f.acf=!1),"true"===f.previous_post?(f.previous_post=!0,f.previous_post_permalink="",f.previous_post_title="",f.previous_post_slug=""):f.previous_post=!1,void 0===f.previous_post_id&&(f.previous_post_id=""),void 0===f.previous_post_taxonomy&&(f.previous_post_taxonomy=""),void 0===f.previous_post_excluded_terms&&(f.previous_post_excluded_terms=""),f.previous_post_title_template=f.content.attr("data-previous-post-title-template"),f.siteTitle=f.content.attr("data-previous-post-site-title"),f.siteTagline=f.content.attr("data-previous-post-site-tagline"),f.previous_post_pageview=f.content.attr("data-previous-post-pageview"),f.previous_post_scroll=f.content.attr("data-previous-post-scroll"),f.previous_post_scroll_speed=f.content.attr("data-previous-post-scroll-speed"),f.previous_post_scroll_top=f.content.attr("data-previous-post-scrolltop"),f.previous_post_controls=f.content.attr("data-previous-post-controls"),f.offset=void 0===f.offset?0:f.offset,(void 0===f.pause||f.seo&&1<f.start_page)&&(f.pause=!1),"true"===f.preloaded&&f.seo&&0<f.start_page&&(f.pause=!1),"true"===f.preloaded&&f.paging&&(f.pause=!0),void 0===f.repeater&&(f.repeater="default"),f.theme_repeater=void 0!==f.theme_repeater&&f.theme_repeater,f.max_pages=void 0===f.max_pages||0===f.max_pages?1e4:f.max_pages,f.scroll_distance=void 0===f.scroll_distance?150:f.scroll_distance,f.scroll_container=void 0===f.scroll_container?"":f.scroll_container,f.transition=void 0===f.transition?"fade":f.transition,f.tcc=void 0===f.tcc?"":f.tcc,f.is_masonry_preloaded=!1,"masonry"===f.transition&&(f.masonry_init=!0,f.masonry_selector=f.content.attr("data-masonry-selector"),f.masonry_columnwidth=f.content.attr("data-masonry-columnwidth"),f.masonry_animation=f.content.attr("data-masonry-animation"),f.masonry_horizontalorder=f.content.attr("data-masonry-horizontalorder"),void 0===f.masonry_animation&&(f.masonry_animation="standard"),void 0===f.masonry_horizontalorder&&(f.masonry_horizontalorder="true"),f.masonry_wrap=f.content,f.transition_container=!1,document.body.contains(f.content_preloaded.get(0))&&(f.masonry_wrap=f.content_preloaded,f.is_masonry_preloaded=!0)),void 0===f.content.attr("data-scroll")?f.scroll=!0:"false"===f.content.attr("data-scroll")?f.scroll=!1:f.scroll=!0,f.transition_container=void 0===f.transition_container||"true"===f.transition_container,f.images_loaded=void 0===f.images_loaded?"false":f.images_loaded,f.button_label=void 0===f.button_label?"Older Posts":f.button_label,f.button_loading_label=void 0!==f.button_loading_label&&f.button_loading_label,f.paging?f.content.parent().addClass("loading"):f.button=y(".alm-load-more-btn",f.container),f.AjaxLoadMore.loadPosts=function(){if(!f.disable_ajax)if(f.paging||(f.button.addClass("loading"),!1!==f.button_loading_label&&f.button.html(f.button_loading_label)),f.container.addClass("alm-loading"),f.loading=!0,"true"!==f.cache||f.cache_logged_in)f.AjaxLoadMore.ajax("standard");else{var t;if(f.init&&f.seo&&f.isPaged){t=f.cache_path+f.cache_id+"/page-1-"+f.start_page+".html"}else if(f.nextpage){var a;f.paging?a=parseInt(f.page)+1:(a=parseInt(f.page)+2,f.isPaged&&(a=parseInt(f.page)+parseInt(f.nextpage_startpage)+1)),t=f.cache_path+f.cache_id+"/page-"+a+".html"}else t=f.previous_post?f.cache_path+f.cache_id+"/"+f.previous_post_id+".html":f.cache_path+f.cache_id+"/page-"+(f.page+1)+".html";y.get(t,function(t){f.AjaxLoadMore.success(t,!0)}).fail(function(){f.AjaxLoadMore.ajax("standard")})}},f.AjaxLoadMore.ajax=function(a){var t="alm_query_posts";if(f.acf_array="",f.acf&&("relationship"!==f.acf_field_type&&(t="alm_acf_query"),f.acf_array={acf:"true",post_id:f.acf_post_id,field_type:f.acf_field_type,field_name:f.acf_field_name}),f.nextpage_array="",f.nextpage&&(t="alm_nextpage_query",f.nextpage_array={nextpage:"true",urls:f.nextpage_urls,scroll:f.nextpage_scroll,pageviews:f.nextpage_pageviews,post_id:f.nextpage_post_id,startpage:f.nextpage_startpage}),f.previous_post_array="",f.previous_post&&(f.previous_post_array={previous_post:"true",id:f.previous_post_id,slug:f.previous_post_slug}),f.comments_array="","true"===f.comments&&(t="alm_comments_query",f.posts_per_page=f.comments_per_page,f.comments_array={comments:"true",post_id:f.comments_post_id,per_page:f.comments_per_page,type:f.comments_type,style:f.comments_style,template:f.comments_template,callback:f.comments_callback}),f.users_array="",f.users&&(t="alm_users_query",f.users_array={users:"true",role:f.content.attr("data-users-role"),include:f.content.attr("data-users-include"),exclude:f.content.attr("data-users-exclude"),per_page:f.posts_per_page,order:f.content.attr("data-users-order"),orderby:f.content.attr("data-users-orderby")}),f.cta_array="","true"===f.cta&&(f.cta_array={cta:"true",cta_position:f.cta_position,cta_repeater:f.cta_repeater,cta_theme_repeater:f.cta_theme_repeater}),f.restapi){var i=wp.template(f.restapi_template_id),e=f.restapi_base_url+"/"+f.restapi_namespace+"/"+f.restapi_endpoint,o=almGetRestParams(f);y.ajax({type:"GET",url:e,data:o,dataType:"JSON",beforeSend:function(){1==f.page||f.paging||f.button.addClass("loading")},success:function(t){var e="",o=t.html,a=t.meta,n=a.postcount,r=a.totalposts;y.each(o,function(t){var a=o[t];"true"===f.restapi_debug&&console.log(a),e+=i(a)});var s={html:e,meta:{postcount:n,totalposts:r}};f.AjaxLoadMore.success(s,!1)}})}else{var n=almGetAjaxParams(f,t,a);y.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:n,beforeSend:function(){1==f.page||f.paging||f.button.addClass("loading")},success:function(t){"standard"===a?f.AjaxLoadMore.success(t,!1):"totalpages"===a&&f.paging&&f.nextpage?y.isFunction(y.fn.almBuildPagination)&&y.fn.almBuildPagination(t,f):"totalposts"===a&&f.paging&&y.isFunction(y.fn.almBuildPagination)&&y.fn.almBuildPagination(t,f)},error:function(t,a,e){f.AjaxLoadMore.error(t,a,e)}})}},f.paging&&(f.nextpage?f.AjaxLoadMore.ajax("totalpages"):f.AjaxLoadMore.ajax("totalposts")),f.AjaxLoadMore.success=function(t,a){f.previous_post&&f.AjaxLoadMore.getPreviousPost();var e,o,n,r='style="opacity: 0; height: 0;"';if(a?e=t:(e=t.html,o=t.meta,f.posts=f.posts+o.postcount,n=o.postcount,f.totalposts=o.totalposts,"true"===f.preloaded&&(f.totalposts=f.totalposts-f.preloaded_amount)),f.data=y(e),a&&(n=f.data.length),f.init&&(o&&o.totalposts&&f.el.attr("data-total-posts",o.totalposts),f.paging?0<n&&(f.el=y('<div class="alm-reveal'+f.tcc+'" '+r+"/>"),f.el.append('<div class="alm-paging-content'+f.tcc+'"></div><div class="alm-paging-loading"></div>'),y(".alm-paging-content",f.el).append(f.data),f.content.append(f.el),f.AjaxLoadMore.fadeIn(f.el.get(0),f.speed),f.content.parent().removeClass("loading"),f.AjaxLoadMore.resetBtnText(),setTimeout(function(){y(".alm-paging-content",f.el).fadeIn(f.speed,"alm_easeInOutQuad",function(){var t=parseInt(f.content.css("padding-top")),a=parseInt(f.content.css("padding-bottom"));f.content.css("height",f.el.height()+t+a+"px"),y.isFunction(y.fn.almFadePageControls)&&y.fn.almFadePageControls(f.btnWrap)})},f.speed)):f.button.html(f.button_label),0===n&&(f.paging&&y.isFunction(y.fn.almPagingEmpty)&&y.fn.almPagingEmpty(f),y.isFunction(y.fn.almEmpty)&&y.fn.almEmpty(f)),f.isPaged&&(f.posts_per_page=f.users?f.content.attr("data-users-per-page"):f.content.attr("data-posts-per-page"),f.start_page&&(f.page=f.start_page-1),f.filters&&f.filters_startpage&&(f.page=f.filters_startpage-1,f.posts_per_page=f.content.attr("data-posts-per-page")))),0<n){if(f.paging)f.init?(f.container.removeClass("alm-loading"),f.AjaxLoadMore.triggerAddons(f)):y(".alm-paging-content",f.el).html("").append(f.data).almWaitForImages().done(function(){y(".alm-paging-loading",f.el).fadeOut(f.speed),y.isFunction(y.fn.almOnPagingComplete)&&y.fn.almOnPagingComplete(f),f.container.removeClass("alm-loading"),f.AjaxLoadMore.triggerAddons(f)});else{if(f.previous_post)f.el=y('<div class="alm-reveal alm-previous-post post-'+f.previous_post_id+'" '+r+' data-id="'+f.previous_post_id+'" data-title="'+f.previous_post_title+'" data-url="'+f.previous_post_permalink+'" data-page="'+f.page+'"/>'),f.el.append(f.data);else if(f.transition_container){var s=void 0,i=window.location.search;if(f.init&&1<f.start_page){var l=[],d=parseInt(f.posts_per_page);"true"===f.cta&&(d+=1);Math.ceil(n/d);for(var p=0;p<n;p+=d)l.push(f.data.slice(p,d+p));f.el=f.content;for(var c=0;c<l.length;c++){var _="true"===f.preloaded?1:0,g=void 0;0<c||"true"===f.preloaded?(s=c+1+_,g="default"===f.permalink?y('<div class="alm-reveal alm-seo'+f.tcc+'" data-url="'+f.canonical_url+f.search_value+"&paged="+s+'" data-page="'+s+'" />'):y('<div class="alm-reveal alm-seo'+f.tcc+'" data-url="'+f.canonical_url+f.seo_leading_slash+"page/"+s+f.seo_trailing_slash+f.search_value+'" data-page="'+s+'" />')):g=y('<div class="alm-reveal alm-seo'+f.tcc+'" data-url="'+f.canonical_url+f.search_value+'" data-page="1" />'),g.append(l[c]),g=y(g),f.el.append(g)}}else{if(f.seo&&0<f.page||"true"===f.preloaded){var m="true"===f.preloaded?1:0;s=f.page+1+m,f.seo?"default"===f.permalink?f.el=y('<div class="alm-reveal alm-seo'+f.tcc+'" '+r+' data-url="'+f.canonical_url+f.search_value+"&paged="+s+'" data-page="'+s+'" />'):f.el=y('<div class="alm-reveal alm-seo'+f.tcc+'" '+r+' data-url="'+f.canonical_url+f.seo_leading_slash+"page/"+s+f.seo_trailing_slash+f.search_value+'" data-page="'+s+'" />'):f.filters?f.el=y('<div class="alm-reveal alm-filters'+f.tcc+'" '+r+' data-url="'+f.canonical_url+i+'" data-page="'+s+'" />'):f.el=y('<div class="alm-reveal'+f.tcc+'" '+r+" />")}else f.filters?f.el=y('<div class="alm-reveal alm-filters'+f.tcc+'" '+r+' data-url="'+f.canonical_url+i+'" data-page="'+(f.page+1)+'" />'):f.seo?f.el=y('<div class="alm-reveal alm-seo'+f.tcc+'" '+r+' data-url="'+f.canonical_url+f.search_value+'" data-page="1" />'):f.el=y('<div class="alm-reveal'+f.tcc+'" '+r+" />");f.el.append(f.data)}}else f.el=f.data;("masonry"!==f.transition||f.init&&!f.is_masonry_preloaded)&&f.content.append(f.el),"masonry"===f.transition?(almMasonry(f.masonry_wrap,f.el,f.masonry_selector,f.masonry_columnwidth,f.masonry_animation,f.masonry_horizontalorder,f.speed,f.masonry_init,f.init,alm_is_filtering),f.masonry_init=!1,f.AjaxLoadMore.transitionEnd()):"none"===f.transition?(f.AjaxLoadMore.fadeIn(f.el.get(0),0),f.AjaxLoadMore.transitionEnd()):"true"===f.images_loaded?f.el.almWaitForImages().done(function(){f.transition_container&&f.AjaxLoadMore.fadeIn(f.el.get(0),f.speed),f.AjaxLoadMore.transitionEnd()}):(f.transition_container&&f.AjaxLoadMore.fadeIn(f.el.get(0),f.speed),f.AjaxLoadMore.transitionEnd())}y.isFunction(y.fn.almComplete)&&("true"===f.images_loaded?f.el.almWaitForImages().done(function(){y.fn.almComplete(f)}):y.fn.almComplete(f)),f.cache?n<f.posts_per_page&&f.AjaxLoadMore.triggerDone():f.posts>=f.totalposts&&!f.previous_post&&f.AjaxLoadMore.triggerDone()}else f.paging||(f.button.delay(f.speed).removeClass("loading").addClass("done"),f.AjaxLoadMore.resetBtnText()),f.AjaxLoadMore.triggerDone();if(void 0!==f.destroy_after&&""!==f.destroy_after){var u=f.page+1;"true"===f.preloaded&&u++,u==f.destroy_after&&f.AjaxLoadMore.destroyed()}alm_is_filtering=!1,f.init=!1},f.AjaxLoadMore.pagingPreloadedInit=function(t){t=null==t?"":t,f.el=y('<div class="alm-reveal'+f.tcc+'"/>'),f.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),f.content.append(f.el),f.content.parent().removeClass("loading"),f.AjaxLoadMore.resetBtnText();var a=parseInt(f.content.css("padding-top")),e=parseInt(f.content.css("padding-bottom"));f.content.css("height",f.el.height()+a+e+"px"),""===t&&(y.isFunction(y.fn.almPagingEmpty)&&y.fn.almPagingEmpty(f),y.isFunction(y.fn.almEmpty)&&y.fn.almEmpty(f)),setTimeout(function(){y.isFunction(y.fn.almFadePageControls)&&y.fn.almFadePageControls(f.btnWrap)},f.speed)},f.AjaxLoadMore.pagingNextpageInit=function(t){f.el=y('<div class="alm-reveal alm-nextpage"/>'),f.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),f.el.appendTo(f.content),f.content.parent().removeClass("loading"),f.AjaxLoadMore.resetBtnText();var a=parseInt(f.content.css("padding-top")),e=parseInt(f.content.css("padding-bottom"));f.content.css("height",f.el.height()+a+e+"px"),y.isFunction(y.fn.almSetNextPageVars)&&y.fn.almSetNextPageVars(f),setTimeout(function(){y.isFunction(y.fn.almFadePageControls)&&y.fn.almFadePageControls(f.btnWrap),y.isFunction(y.fn.almOnWindowResize)&&y.fn.almOnWindowResize(f)},f.speed)},f.fetchingPreviousPost=!1,f.AjaxLoadMore.getPreviousPost=function(){f.fetchingPreviousPost=!0;var t={action:"alm_query_previous_post",id:f.previous_post_id,taxonomy:f.previous_post_taxonomy,excluded_terms:f.previous_post_excluded_terms};y.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:t,success:function(t){t.has_previous_post?(f.content.attr("data-previous-post-id",t.prev_id),f.previous_post_id=t.prev_id,f.previous_post_permalink=t.prev_permalink,f.previous_post_title=t.prev_title,f.previous_post_slug=t.prev_slug):t.has_previous_post||f.AjaxLoadMore.triggerDone(),y.isFunction(y.fn.almSetPreviousPost)&&y.fn.almSetPreviousPost(f,t.current_id,t.permalink,t.title),f.fetchingPreviousPost=!1},error:function(t,a,e){f.AjaxLoadMore.error(t,a,e),f.fetchingPreviousPost=!1}})},f.AjaxLoadMore.triggerAddons=function(t){y.isFunction(y.fn.almSEO)&&t.seo&&y.fn.almSEO(t,!1),y.isFunction(y.fn.almSetNextPage)&&y.fn.almSetNextPage(t)},f.AjaxLoadMore.triggerDone=function(){f.loading=!1,f.finished=!0,f.paging||f.button.addClass("done"),y.isFunction(y.fn.almDone)&&setTimeout(function(){y.fn.almDone(f)},f.speed+10)},f.AjaxLoadMore.resetBtnText=function(){!1===f.button_loading_label||f.paging||f.button.html(f.button_label)},f.AjaxLoadMore.error=function(t,a,e){f.loading=!1,f.paging||(f.button.removeClass("loading"),f.AjaxLoadMore.resetBtnText()),console.log(e)},f.paging||f.fetchingPreviousPost||(f.button.unbind("click"),f.button.on("click",function(t){t.preventDefault(),"true"===f.pause&&(f.pause=!1,f.pause_override=!1,f.AjaxLoadMore.loadPosts()),f.loading||f.finished||y(this).hasClass("done")||(f.loading=!0,f.page++,f.AjaxLoadMore.loadPosts()),f.filters&&"function"==typeof almFiltersPaged&&almFiltersPaged(f)})),f.paging&&(f.window.unbind("resizeEnd"),f.window.bind("resizeEnd",function(){y.isFunction(y.fn.almOnWindowResize)&&y.fn.almOnWindowResize(f)}),f.window.unbind("resize"),f.window.bind("resize",function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){y(this).trigger("resizeEnd")},f.speed)})),f.AjaxLoadMore.isVisible=function(){return f.visible=!1,f.el.is(":visible")&&(f.visible=!0),f.visible},f.scroll&&!f.paging&&(""!==f.scroll_container&&y(f.scroll_container).length&&(f.window=y(f.scroll_container)),f.window.bind("scroll touchstart",function(){if(f.AjaxLoadMore.isVisible()&&!f.fetchingPreviousPost){var t=f.button.offset().top,a=Math.round(t-(f.window.height()-f.scroll_distance)),e=f.window.scrollTop()>=a;""!==f.scroll_container&&(e=f.button.offset().top-(f.window.height()-f.scroll_distance)<f.window.offset().top),!f.loading&&!f.finished&&e&&f.page<f.max_pages-1&&f.proceed&&"true"===f.pause&&"true"===f.pause_override?f.button.trigger("click"):!f.loading&&!f.finished&&e&&f.page<f.max_pages-1&&f.proceed&&"true"!==f.pause&&f.button.trigger("click")}})),f.AjaxLoadMore.destroyed=function(){f.disable_ajax=!0,f.paging||(f.button.delay(f.speed).fadeOut(f.speed),y.isFunction(y.fn.almDestroyed)&&y.fn.almDestroyed(f))},f.AjaxLoadMore.fadeIn=function(t,a){if(0==a)t.style.opacity=1,t.style.height="auto";else{a/=10;var e=0,o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a);t.style.height="auto"}},f.AjaxLoadMore.transitionEnd=function(){setTimeout(function(){f.loading=!1,f.container.removeClass("alm-loading"),f.AjaxLoadMore.triggerAddons(f),f.paging||(f.button.delay(f.speed).removeClass("loading"),f.AjaxLoadMore.resetBtnText())},f.speed)},f.AjaxLoadMore.init=function(){("true"===f.preloaded&&1==f.destroy_after&&f.AjaxLoadMore.destroyed(),f.paging||f.previous_post||(f.disable_ajax?(f.finished=!0,f.button.addClass("done")):"true"===f.pause?(f.button.html(f.button_label),f.loading=!1):f.AjaxLoadMore.loadPosts()),f.previous_post&&(f.AjaxLoadMore.getPreviousPost(),f.loading=!1),"true"===f.preloaded&&f.seo&&!f.paging&&setTimeout(function(){y.isFunction(y.fn.almSEO)&&f.start_page<1&&y.fn.almSEO(f,!0)},f.speed),"true"!==f.preloaded||f.paging||setTimeout(function(){f.preloaded_total_posts<=parseInt(f.preloaded_amount)&&f.AjaxLoadMore.triggerDone(),0==f.preloaded_total_posts&&y.isFunction(y.fn.almEmpty)&&y.fn.almEmpty(f)},f.speed),f.nextpage)&&(1<y(".alm-nextpage").length&&y(".alm-nextpage").length==y(".alm-nextpage").eq(0).data("total-pages")&&f.AjaxLoadMore.triggerDone());f.window.bind("load",function(){f.is_masonry_preloaded&&(almMasonry(f.masonry_wrap,f.el,f.masonry_selector,f.masonry_columnwidth,f.masonry_animation,f.masonry_horizontalorder,f.speed,f.masonry_init,!0,!1),f.masonry_init=!1)})},f.AjaxLoadMore.init(),setTimeout(function(){f.proceed=!0},150),y.fn.almUpdateCurrentPage=function(t,a,e){e.page=t,e.nextpage&&!e.paging&&(e.page=e.page-1);var o="";e.paging_init&&"true"===e.preloaded?(o=y(".alm-preloaded .alm-reveal",e.el).html(),y(".alm-preloaded",e.el).remove(),e.preloaded_amount=0,e.AjaxLoadMore.pagingPreloadedInit(o),e.paging_init=!1,e.init=!1):e.paging_init&&e.nextpage?(o=y(".alm-nextpage",e.el).html(),y(".alm-nextpage",e.el).remove(),e.AjaxLoadMore.pagingNextpageInit(o),e.paging_init=!1,e.init=!1):e.AjaxLoadMore.loadPosts()},y.fn.almGetParentContainer=function(){return f.el.closest("#ajax-load-more")},y.fn.almGetObj=function(){return f},y.fn.almTriggerClick=function(){f.button.trigger("click")},y.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},y.fn.ajaxloadmore=function(){return this.each(function(t){new y.ajaxloadmore(y(this),t)})};var t=document.querySelectorAll(".ajax-load-more-wrap");t.length&&[].concat(_toConsumableArray(t)).forEach(function(t,a){new y.ajaxloadmore(y(t),a)})}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(g){var m="almWaitForImages";g.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},g.expr[":"]["has-src"]=function(t){return g(t).is('img[src][src!=""]')},g.expr[":"].uncached=function(t){return!!g(t).is(":has-src")&&!t.complete},g.fn.almWaitForImages=function(){var l,d,e,p=0,c=0,_=g.Deferred();if(g.isPlainObject(arguments[0])?(e=arguments[0].waitForAll,d=arguments[0].each,l=arguments[0].finished):1===arguments.length&&"boolean"===g.type(arguments[0])?e=arguments[0]:(l=arguments[0],d=arguments[1],e=arguments[2]),l=l||g.noop,d=d||g.noop,e=!!e,!g.isFunction(l)||!g.isFunction(d))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var r=g(this),s=[],t=g.almWaitForImages.hasImageProperties||[],a=g.almWaitForImages.hasImageAttributes||[],i=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?r.find("*").addBack().each(function(){var n=g(this);n.is("img:has-src")&&s.push({src:n.attr("src"),element:n[0]}),g.each(t,function(t,a){var e,o=n.css(a);if(!o)return!0;for(;e=i.exec(o);)s.push({src:e[2],element:n[0]})}),g.each(a,function(t,a){var e,o=n.attr(a);if(!o)return!0;e=o.split(","),g.each(e,function(t,a){a=g.trim(a).split(" ")[0],s.push({src:a,element:n[0]})})})}):r.find("img:has-src").each(function(){s.push({src:this.src,element:this})}),p=s.length,(c=0)===p&&(l.call(r[0]),_.resolveWith(r[0])),g.each(s,function(t,o){var a=new Image,n="load."+m+" error."+m;g(a).one(n,function t(a){var e=[c,p,"load"==a.type];if(c++,d.apply(o.element,e),_.notifyWith(o.element,e),g(this).off(n,t),c==p)return l.call(r[0]),_.resolveWith(r[0]),!1}),a.src=o.src})}),_.promise()}});
|
1 |
+
"use strict";Array.from||(Array.from=function(){var a=Object.prototype.toString,l=function(t){return"function"==typeof t||"[object Function]"===a.call(t)},o=Math.pow(2,53)-1,d=function(t){var a,e=(a=Number(t),isNaN(a)?0:0!==a&&isFinite(a)?(0<a?1:-1)*Math.floor(Math.abs(a)):a);return Math.min(Math.max(e,0),o)};return function(t){var a=Object(t);if(null==t)throw new TypeError("Array.from requires an array-like object - not null or undefined");var e,o=1<arguments.length?arguments[1]:void 0;if(void 0!==o){if(!l(o))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(e=arguments[2])}for(var n,r=d(a.length),s=l(this)?Object(new this(r)):new Array(r),i=0;i<r;)n=a[i],s[i]=o?void 0===e?o(n,i):o.call(e,n,i):n,i+=1;return s.length=r,s}}());var almGetParameterByName=function(t,a){a||(a=window.location.href),t=t.replace(/[\[\]]/g,"\\$&");var e=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)").exec(a);return e?e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):"":null},almGetAjaxParams=function(t,a,e){var o={action:a,nonce:alm_localize.alm_nonce,query_type:e,id:t.id,post_id:t.post_id,slug:t.slug,canonical_url:t.canonical_url,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,post_type:t.post_type,repeater:t.repeater,seo_start_page:t.start_page};return t.theme_repeater&&(o.theme_repeater=t.theme_repeater),t.paging&&(o.paging=t.paging),t.preloaded&&(o.preloaded=t.preloaded,o.preloaded_amount=t.preloaded_amount),"true"===t.cache&&(o.cache_id=t.cache_id,o.cache_logged_in=t.cache_logged_in),t.acf_array&&(o.acf=t.acf_array),t.cta_array&&(o.cta=t.cta_array),t.comments_array&&(o.comments=t.comments_array),t.nextpage_array&&(o.nextpage=t.nextpage_array),t.previous_post_array&&(o.previous_post=t.previous_post_array),t.users_array&&(o.users=t.users_array),t.content.attr("data-lang")&&(o.lang=t.content.attr("data-lang")),t.content.attr("data-sticky-posts")&&(o.sticky_posts=t.content.attr("data-sticky-posts")),t.content.attr("data-post-format")&&(o.post_format=t.content.attr("data-post-format")),t.content.attr("data-category")&&(o.category=t.content.attr("data-category")),t.content.attr("data-category-not-in")&&(o.category__not_in=t.content.attr("data-category-not-in")),t.content.attr("data-tag")&&(o.tag=t.content.attr("data-tag")),t.content.attr("data-tag-not-in")&&(o.tag__not_in=t.content.attr("data-tag-not-in")),t.content.attr("data-taxonomy")&&(o.taxonomy=t.content.attr("data-taxonomy")),t.content.attr("data-taxonomy-terms")&&(o.taxonomy_terms=t.content.attr("data-taxonomy-terms")),t.content.attr("data-taxonomy-operator")&&(o.taxonomy_operator=t.content.attr("data-taxonomy-operator")),t.content.attr("data-taxonomy-relation")&&(o.taxonomy_relation=t.content.attr("data-taxonomy-relation")),t.content.attr("data-meta-key")&&(o.meta_key=t.content.attr("data-meta-key")),t.content.attr("data-meta-value")&&(o.meta_value=t.content.attr("data-meta-value")),t.content.attr("data-meta-compare")&&(o.meta_compare=t.content.attr("data-meta-compare")),t.content.attr("data-meta-relation")&&(o.meta_relation=t.content.attr("data-meta-relation")),t.content.attr("data-meta-type")&&(o.meta_type=t.content.attr("data-meta-type")),t.content.attr("data-author")&&(o.author=t.content.attr("data-author")),t.content.attr("data-year")&&(o.year=t.content.attr("data-year")),t.content.attr("data-month")&&(o.month=t.content.attr("data-month")),t.content.attr("data-day")&&(o.day=t.content.attr("data-day")),t.content.attr("data-order")&&(o.order=t.content.attr("data-order")),t.content.attr("data-orderby")&&(o.orderby=t.content.attr("data-orderby")),t.content.attr("data-post-status")&&(o.post_status=t.content.attr("data-post-status")),t.content.attr("data-post-in")&&(o.post__in=t.content.attr("data-post-in")),t.content.attr("data-post-not-in")&&(o.post__not_in=t.content.attr("data-post-not-in")),t.content.attr("data-exclude")&&(o.exclude=t.content.attr("data-exclude")),t.content.attr("data-search")&&(o.search=t.content.attr("data-search")),t.content.attr("data-s")&&(o.search=t.content.attr("data-s")),t.content.attr("data-custom-args")&&(o.custom_args=t.content.attr("data-custom-args")),o},almGetRestParams=function(t){return{id:t.id,post_id:t.post_id,posts_per_page:t.posts_per_page,page:t.page,offset:t.offset,slug:t.slug,canonical_url:t.canonical_url,post_type:t.post_type,post_format:t.content.attr("data-post-format"),category:t.content.attr("data-category"),category__not_in:t.content.attr("data-category-not-in"),tag:t.content.attr("data-tag"),tag__not_in:t.content.attr("data-tag-not-in"),taxonomy:t.content.attr("data-taxonomy"),taxonomy_terms:t.content.attr("data-taxonomy-terms"),taxonomy_operator:t.content.attr("data-taxonomy-operator"),taxonomy_relation:t.content.attr("data-taxonomy-relation"),meta_key:t.content.attr("data-meta-key"),meta_value:t.content.attr("data-meta-value"),meta_compare:t.content.attr("data-meta-compare"),meta_relation:t.content.attr("data-meta-relation"),meta_type:t.content.attr("data-meta-type"),author:t.content.attr("data-author"),year:t.content.attr("data-year"),month:t.content.attr("data-month"),day:t.content.attr("data-day"),post_status:t.content.attr("data-post-status"),order:t.content.attr("data-order"),orderby:t.content.attr("data-orderby"),post__in:t.content.attr("data-post-in"),post__not_in:t.content.attr("data-post-not-in"),search:t.content.attr("data-search"),custom_args:t.content.attr("data-custom-args"),lang:t.lang,preloaded:t.preloaded,preloaded_amount:t.preloaded_amount,seo_start_page:t.start_page}};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}var alm_is_filtering=!1;!function(r){r.fn.almFilter=function(e,o,n){n.target?r(".ajax-load-more-wrap[data-id='"+n.target+"']").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)}):r(".ajax-load-more-wrap").each(function(t){var a=r(this);r.fn.almFilterTransition(e,o,n,a)})},r.fn.almFilterTransition=function(t,a,e,o){"slide"===t?o.slideUp(a,function(){n(a,e,o)}):"fade"===t||"masonry"===t?o.fadeOut(a,function(){n(a,e,o)}):n(a,e,o)};var n=function(t,a,e){var o=e.get(0),n=o.querySelectorAll(".alm-listing");[].concat(_toConsumableArray(n)).forEach(function(t){t.innerHTML=""});var r=o.querySelector(".alm-load-more-btn");r&&r.classList.remove("done"),s(t,a,e)},s=function(t,a,e){r.each(a,function(t,a){t=t.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),r(".alm-listing",e).attr("data-"+t,a)}),r.isFunction(r.fn.almFilterComplete)&&r.fn.almFilterComplete(),"function"==typeof almFiltersAddonComplete&&almFiltersAddonComplete(e),alm_is_filtering=!0,e.fadeIn(t),a.target?r(".ajax-load-more-wrap[data-id="+a.target+"]").ajaxloadmore():r(".ajax-load-more-wrap").ajaxloadmore()}}(jQuery);var almMasonry=function t(o,a,n,r,e,s,i,l,d,p){var c=(i+100)/1e3+"s",_="scale(0.5)",g="scale(1)";"zoom-out"===e&&(_="translateY(-20px) scale(1.25)",g="translateY(0) scale(1)"),"slide-up"===e&&(_="translateY(50px)",g="translateY(0)"),"slide-down"===e&&(_="translateY(-50px)",g="translateY(0)"),"none"===e&&(g=_="translateY(0)"),r?isNaN(r)||(r=parseInt(r)):r=n,s="true"===s,p?(o.masonry("destroy"),o[0].parentNode.style.opacity=0,o.append(a),t(o,a,n,r,e,s,i,!0,!0,!1)):l&&d?o.imagesLoaded(function(){var a={itemSelector:n,transitionDuration:c,columnWidth:r,horizontalOrder:s,hiddenStyle:{transform:_,opacity:0},visibleStyle:{transform:g,opacity:1}},e=e;e&&Object.keys(e).forEach(function(t){a[t]=e[t]}),o.masonry(a),almMasonryFadeIn(o[0].parentNode,i)}):a.imagesLoaded(function(){o.append(a).masonry("appended",a)})},almMasonryFadeIn=function(t,a){a/=10;var e=parseInt(t.style.opacity),o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a)};function _toConsumableArray(t){if(Array.isArray(t)){for(var a=0,e=Array(t.length);a<t.length;a++)e[a]=t[a];return e}return Array.from(t)}!function(x){x.ajaxloadmore=function(t,a){"true"===alm_localize.scrolltop&&x(window).scrollTop(0);var h=this;if(h.AjaxLoadMore={},h.window=x(window),h.page=0,h.posts=0,h.totalposts=0,h.proceed=!1,h.disable_ajax=!1,h.init=!0,h.loading=!0,h.finished=!1,h.prefix="alm-",h.el=t,h.master_id=h.el.get(0).id,h.container=t,h.container.addClass("alm-"+a).attr("data-alm-id",a),h.content=x(".alm-ajax",h.container),h.content_preloaded=x(".alm-preloaded",h.container),h.canonical_url=h.el.attr("data-canonical-url"),h.is_search=h.el.attr("data-search"),h.slug=h.el.attr("data-slug"),h.post_id=h.el.attr("data-post-id"),h.id=h.el.attr("data-id")?h.el.attr("data-id"):"",h.repeater=h.content.attr("data-repeater"),h.theme_repeater=h.content.attr("data-theme-repeater"),h.post_type=h.content.attr("data-post-type"),h.post_type=h.post_type.split(","),h.sticky_posts=h.content.attr("data-sticky-posts"),h.btnWrap=x(".alm-btn-wrap",h.container),h.btnWrap.get(0).style.visibility="visible",h.button_label=h.content.attr("data-button-label"),h.button_loading_label=h.content.attr("data-button-loading-label"),h.scroll_distance=h.content.attr("data-scroll-distance"),h.scroll_distance=h.scroll_distance?parseInt(h.scroll_distance):150,h.scroll_container=h.content.attr("data-scroll-container"),h.max_pages=h.content.attr("data-max-pages"),h.max_pages=h.max_pages?parseInt(h.max_pages):0,h.pause_override=h.content.attr("data-pause-override"),h.pause=h.content.attr("data-pause"),h.transition=h.content.attr("data-transition"),h.transition_container=h.content.attr("data-transition-container"),h.tcc=h.content.attr("data-transition-container-classes"),h.speed=250,h.images_loaded=h.content.attr("data-images-loaded"),h.destroy_after=h.content.attr("data-destroy-after"),h.orginal_posts_per_page=h.content.attr("data-posts-per-page"),h.posts_per_page=h.content.attr("data-posts-per-page"),h.offset=h.content.attr("data-offset"),h.cache=h.content.attr("data-cache"),h.cache_id=h.content.attr("data-cache-id"),h.cache_path=h.content.attr("data-cache-path"),h.cache_logged_in=h.content.attr("data-cache-logged-in"),h.cta=h.content.attr("data-cta"),h.cta_position=h.content.attr("data-cta-position"),h.cta_repeater=h.content.attr("data-cta-repeater"),h.cta_theme_repeater=h.content.attr("data-cta-theme-repeater"),h.acf=h.content.attr("data-acf"),h.acf_field_type=h.content.attr("data-acf-field-type"),h.acf_field_name=h.content.attr("data-acf-field-name"),h.acf_post_id=h.content.attr("data-acf-post-id"),h.nextpage=h.content.attr("data-nextpage"),h.nextpage_urls=h.content.attr("data-nextpage-urls"),h.nextpage_scroll=h.content.attr("data-nextpage-scroll"),h.nextpage_pageviews=h.content.attr("data-nextpage-pageviews"),h.nextpage_post_id=h.content.attr("data-nextpage-post-id"),h.nextpage_startpage=h.content.attr("data-nextpage-startpage"),h.previous_post=h.content.attr("data-previous-post"),h.previous_post_id=h.content.attr("data-previous-post-id"),h.previous_post_taxonomy=h.content.attr("data-previous-post-taxonomy"),h.previous_post_excluded_terms=h.content.attr("data-previous-post-excluded-terms"),h.comments=h.content.attr("data-comments"),"true"===h.comments&&(h.content=x(".alm-comments",h.container)),h.comments_post_id=h.content.attr("data-comments_post_id"),h.comments_per_page=h.content.attr("data-comments_per_page"),h.comments_type=h.content.attr("data-comments_type"),h.comments_style=h.content.attr("data-comments_style"),h.comments_template=h.content.attr("data-comments_template"),h.comments_callback=h.content.attr("data-comments_callback"),h.filters=h.content.attr("data-filters"),h.restapi=h.content.attr("data-restapi"),h.restapi_base_url=h.content.attr("data-restapi-base-url"),h.restapi_namespace=h.content.attr("data-restapi-namespace"),h.restapi_endpoint=h.content.attr("data-restapi-endpoint"),h.restapi_template_id=h.content.attr("data-restapi-template-id"),h.restapi_debug=h.content.attr("data-restapi-debug"),h.seo=h.content.attr("data-seo"),h.preloaded=h.content.attr("data-preloaded"),h.preloaded_amount=h.content.attr("data-preloaded-amount"),h.is_preloaded="true"===h.content.attr("data-is-preloaded"),h.paging=h.content.attr("data-paging"),h.users="true"===h.content.attr("data-users"),h.users&&(h.orginal_posts_per_page=h.content.attr("data-users-per-page"),h.posts_per_page=h.content.attr("data-users-per-page")),"true"===h.filters){h.filters=!0,h.filters_analtyics=h.content.attr("data-filters-analtyics"),h.filters_debug=h.content.attr("data-filters-debug"),h.filters_startpage=0;var e=almGetParameterByName("pg");null!==e&&(h.filters_startpage=parseInt(e),h.page=h.filters_startpage),h.isPaged=!1,0<h.filters_startpage&&(h.isPaged=!0,h.page=h.filters_startpage-1)}else h.filters=!1;if("true"===h.restapi?(h.restapi=!0,void 0===h.restapi_debug&&(h.restapi_debug=!1),""===h.restapi_template_id&&(h.restapi=!1)):h.restapi=!1,"true"===h.paging?(h.paging=!0,h.paging_controls=!!h.content.attr("data-paging-controls"),h.paging_show_at_most=h.content.attr("data-paging-show-at-most"),h.paging_classes=h.content.attr("data-paging-classes"),h.paging_init=!0,h.paging_show_at_most=void 0===h.paging_show_at_most?7:h.paging_show_at_most,h.pause="true"===h.preloaded||h.pause):h.paging=!1,void 0===h.cache&&(h.cache=!1),void 0===h.cache_logged_in&&(h.cache_logged_in=!1),void 0===h.comments_per_page&&(h.comments_per_page="5"),"true"===h.preloaded){h.preloaded_amount=void 0===h.preloaded_amount?h.posts_per_page:h.preloaded_amount;var o=h.master_id.replace(/-/g,"_");o+="_vars";var n=window[o];n&&n.total_posts&&parseInt(n.total_posts)<=parseInt(h.preloaded_amount)&&(h.preloaded_total_posts=n.total_posts,h.disable_ajax=!0)}else h.preloaded="false";void 0===h.seo&&(h.seo=!1),"true"===h.seo&&(h.seo=!0),void 0===h.is_search&&(h.is_search=!1),h.search_value="true"===h.is_search?h.slug:"",h.permalink=h.content.attr("data-seo-permalink"),h.pageview=h.content.attr("data-seo-pageview"),h.start_page=h.content.attr("data-seo-start-page"),h.seo_trailing_slash="false"===h.content.attr("data-seo-trailing-slash")?"":"/",h.seo_leading_slash="true"===h.content.attr("data-seo-leading-slash")?"/":"",h.start_page?(h.seo_scroll=h.content.attr("data-seo-scroll"),h.seo_scroll_speed=h.content.attr("data-seo-scroll-speed"),h.seo_scrolltop=h.content.attr("data-seo-scrolltop"),h.seo_controls=h.content.attr("data-seo-controls"),h.isPaged=!1,1<h.start_page&&(h.isPaged=!0,h.posts_per_page=h.start_page*h.posts_per_page),h.paging&&(h.posts_per_page=h.orginal_posts_per_page)):h.start_page=1,"true"===h.nextpage?(h.nextpage=!0,h.posts_per_page=1):h.nextpage=!1,void 0===h.nextpage_urls&&(h.nextpage_urls="true"),void 0===h.nextpage_scroll&&(h.nextpage_scroll="250:30"),void 0===h.nextpage_pageviews&&(h.nextpage_pageviews="true"),void 0===h.nextpage_post_id&&(h.nextpage=!1,h.nextpage_post_id=null),void 0===h.nextpage_startpage&&(h.nextpage_startpage=1),1<h.nextpage_startpage&&(h.isPaged=!0),h.acf="true"===h.acf,void 0!==h.acf_field_type&&void 0!==h.acf_field_name&&void 0!==h.acf_post_id||(h.acf=!1),"true"===h.previous_post?(h.previous_post=!0,h.previous_post_permalink="",h.previous_post_title="",h.previous_post_slug=""):h.previous_post=!1,void 0===h.previous_post_id&&(h.previous_post_id=""),void 0===h.previous_post_taxonomy&&(h.previous_post_taxonomy=""),void 0===h.previous_post_excluded_terms&&(h.previous_post_excluded_terms=""),h.previous_post_title_template=h.content.attr("data-previous-post-title-template"),h.siteTitle=h.content.attr("data-previous-post-site-title"),h.siteTagline=h.content.attr("data-previous-post-site-tagline"),h.previous_post_pageview=h.content.attr("data-previous-post-pageview"),h.previous_post_scroll=h.content.attr("data-previous-post-scroll"),h.previous_post_scroll_speed=h.content.attr("data-previous-post-scroll-speed"),h.previous_post_scroll_top=h.content.attr("data-previous-post-scrolltop"),h.previous_post_controls=h.content.attr("data-previous-post-controls"),h.offset=void 0===h.offset?0:h.offset,(void 0===h.pause||h.seo&&1<h.start_page)&&(h.pause=!1),"true"===h.preloaded&&h.seo&&0<h.start_page&&(h.pause=!1),"true"===h.preloaded&&h.paging&&(h.pause=!0),void 0===h.repeater&&(h.repeater="default"),h.theme_repeater=void 0!==h.theme_repeater&&h.theme_repeater,h.max_pages=void 0===h.max_pages||0===h.max_pages?1e4:h.max_pages,h.scroll_distance=void 0===h.scroll_distance?150:h.scroll_distance,h.scroll_container=void 0===h.scroll_container?"":h.scroll_container,h.transition=void 0===h.transition?"fade":h.transition,h.tcc=void 0===h.tcc?"":h.tcc,h.is_masonry_preloaded=!1,"masonry"===h.transition&&(h.masonry_init=!0,h.masonry_selector=h.content.attr("data-masonry-selector"),h.masonry_columnwidth=h.content.attr("data-masonry-columnwidth"),h.masonry_animation=h.content.attr("data-masonry-animation"),h.masonry_horizontalorder=h.content.attr("data-masonry-horizontalorder"),void 0===h.masonry_animation&&(h.masonry_animation="standard"),void 0===h.masonry_horizontalorder&&(h.masonry_horizontalorder="true"),h.masonry_wrap=h.content,h.transition_container=!1,"true"===h.preloaded&&(h.is_masonry_preloaded=!0)),void 0===h.content.attr("data-scroll")?h.scroll=!0:"false"===h.content.attr("data-scroll")?h.scroll=!1:h.scroll=!0,h.transition_container=void 0===h.transition_container||"true"===h.transition_container,h.images_loaded=void 0===h.images_loaded?"false":h.images_loaded,h.button_label=void 0===h.button_label?"Older Posts":h.button_label,h.button_loading_label=void 0!==h.button_loading_label&&h.button_loading_label,h.paging?h.content.parent().addClass("loading"):h.button=x(".alm-load-more-btn",h.container),h.AjaxLoadMore.loadPosts=function(){if(!h.disable_ajax)if(h.paging||(h.button.addClass("loading"),!1!==h.button_loading_label&&h.button.html(h.button_loading_label)),h.container.addClass("alm-loading"),h.loading=!0,"true"!==h.cache||h.cache_logged_in)h.AjaxLoadMore.ajax("standard");else{var t;if(h.init&&h.seo&&h.isPaged){t=h.cache_path+h.cache_id+"/page-1-"+h.start_page+".html"}else if(h.nextpage){var a;h.paging?a=parseInt(h.page)+1:(a=parseInt(h.page)+2,h.isPaged&&(a=parseInt(h.page)+parseInt(h.nextpage_startpage)+1)),t=h.cache_path+h.cache_id+"/page-"+a+".html"}else t=h.previous_post?h.cache_path+h.cache_id+"/"+h.previous_post_id+".html":h.cache_path+h.cache_id+"/page-"+(h.page+1)+".html";x.get(t,function(t){h.AjaxLoadMore.success(t,!0)}).fail(function(){h.AjaxLoadMore.ajax("standard")})}},h.AjaxLoadMore.ajax=function(a){var t="alm_query_posts";if(h.acf_array="",h.acf&&("relationship"!==h.acf_field_type&&(t="alm_acf_query"),h.acf_array={acf:"true",post_id:h.acf_post_id,field_type:h.acf_field_type,field_name:h.acf_field_name}),h.nextpage_array="",h.nextpage&&(t="alm_nextpage_query",h.nextpage_array={nextpage:"true",urls:h.nextpage_urls,scroll:h.nextpage_scroll,pageviews:h.nextpage_pageviews,post_id:h.nextpage_post_id,startpage:h.nextpage_startpage}),h.previous_post_array="",h.previous_post&&(h.previous_post_array={previous_post:"true",id:h.previous_post_id,slug:h.previous_post_slug}),h.comments_array="","true"===h.comments&&(t="alm_comments_query",h.posts_per_page=h.comments_per_page,h.comments_array={comments:"true",post_id:h.comments_post_id,per_page:h.comments_per_page,type:h.comments_type,style:h.comments_style,template:h.comments_template,callback:h.comments_callback}),h.users_array="",h.users&&(t="alm_users_query",h.users_array={users:"true",role:h.content.attr("data-users-role"),include:h.content.attr("data-users-include"),exclude:h.content.attr("data-users-exclude"),per_page:h.posts_per_page,order:h.content.attr("data-users-order"),orderby:h.content.attr("data-users-orderby")}),h.cta_array="","true"===h.cta&&(h.cta_array={cta:"true",cta_position:h.cta_position,cta_repeater:h.cta_repeater,cta_theme_repeater:h.cta_theme_repeater}),h.restapi){var i=wp.template(h.restapi_template_id),e=h.restapi_base_url+"/"+h.restapi_namespace+"/"+h.restapi_endpoint,o=almGetRestParams(h);x.ajax({type:"GET",url:e,data:o,dataType:"JSON",beforeSend:function(){1==h.page||h.paging||h.button.addClass("loading")},success:function(t){var e="",o=t.html,a=t.meta,n=a.postcount,r=a.totalposts;x.each(o,function(t){var a=o[t];"true"===h.restapi_debug&&console.log(a),e+=i(a)});var s={html:e,meta:{postcount:n,totalposts:r}};h.AjaxLoadMore.success(s,!1)}})}else{var n=almGetAjaxParams(h,t,a);x.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:n,beforeSend:function(){1==h.page||h.paging||h.button.addClass("loading")},success:function(t){"standard"===a?h.AjaxLoadMore.success(t,!1):"totalpages"===a&&h.paging&&h.nextpage?x.isFunction(x.fn.almBuildPagination)&&x.fn.almBuildPagination(t,h):"totalposts"===a&&h.paging&&x.isFunction(x.fn.almBuildPagination)&&x.fn.almBuildPagination(t,h)},error:function(t,a,e){h.AjaxLoadMore.error(t,a,e)}})}},h.paging&&(h.nextpage?h.AjaxLoadMore.ajax("totalpages"):h.AjaxLoadMore.ajax("totalposts")),h.AjaxLoadMore.success=function(t,a){h.previous_post&&h.AjaxLoadMore.getPreviousPost();var e,o,n,r='style="opacity: 0; height: 0;"';if(a?e=t:(e=t.html,o=t.meta,h.posts=h.posts+o.postcount,n=o.postcount,h.totalposts=o.totalposts,"true"===h.preloaded&&(h.totalposts=h.totalposts-h.preloaded_amount)),h.data=x(e),a&&(n=h.data.length),h.init&&(o&&o.totalposts&&h.el.attr("data-total-posts",o.totalposts),h.paging?0<n&&(h.el=x('<div class="alm-reveal'+h.tcc+'" '+r+"/>"),h.el.append('<div class="alm-paging-content'+h.tcc+'"></div><div class="alm-paging-loading"></div>'),x(".alm-paging-content",h.el).append(h.data),h.content.append(h.el),h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText(),setTimeout(function(){x(".alm-paging-content",h.el).fadeIn(h.speed,"alm_easeInOutQuad",function(){var t=parseInt(h.content.css("padding-top")),a=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+t+a+"px"),x.isFunction(x.fn.almFadePageControls)&&x.fn.almFadePageControls(h.btnWrap)})},h.speed)):h.button.html(h.button_label),0===n&&(h.paging&&x.isFunction(x.fn.almPagingEmpty)&&x.fn.almPagingEmpty(h),x.isFunction(x.fn.almEmpty)&&x.fn.almEmpty(h)),h.isPaged&&(h.posts_per_page=h.users?h.content.attr("data-users-per-page"):h.content.attr("data-posts-per-page"),h.page=h.start_page?h.start_page-1:h.page,h.filters&&h.filters_startpage&&(h.page=h.filters_startpage-1,h.posts_per_page=h.content.attr("data-posts-per-page")))),0<n){if(h.paging)h.init?(h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h)):x(".alm-paging-content",h.el).html("").append(h.data).almWaitForImages().done(function(){x(".alm-paging-loading",h.el).fadeOut(h.speed),x.isFunction(x.fn.almOnPagingComplete)&&x.fn.almOnPagingComplete(h),h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h)});else{if(h.previous_post)h.el=x('<div class="alm-reveal alm-previous-post post-'+h.previous_post_id+'" '+r+' data-id="'+h.previous_post_id+'" data-title="'+h.previous_post_title+'" data-url="'+h.previous_post_permalink+'" data-page="'+h.page+'"/>'),h.el.append(h.data);else if(h.transition_container){var s=void 0,i=window.location.search;if(h.init&&1<h.start_page){var l=[],d=[],p=parseInt(h.posts_per_page);Math.ceil(n/p);h.el=h.content,"true"===h.cta&&(p+=1,n=Math.ceil(n/p)+n);for(var c=0;c<n;c+=p)l.push(h.data.slice(c,p+c));for(var _=0;_<l.length;_++){var g="true"===h.preloaded?1:0,m=void 0;if(0<_||"true"===h.preloaded)s=_+1+g,m="default"===h.permalink?x('<div class="alm-reveal alm-seo'+h.tcc+'" data-url="'+h.canonical_url+h.search_value+"&paged="+s+'" data-page="'+s+'" />'):x('<div class="alm-reveal alm-seo'+h.tcc+'" data-url="'+h.canonical_url+h.seo_leading_slash+"page/"+s+h.seo_trailing_slash+h.search_value+'" data-page="'+s+'" />');else{var u=h.is_preloaded?" alm-preloaded":"";m=x('<div class="alm-reveal alm-seo'+u+h.tcc+'" data-url="'+h.canonical_url+h.search_value+'" data-page="1" />')}d.push(m.append(l[_]))}for(var f=0;f<d.length;f++)h.el.append(d[f]);h.el.get(0).style.opacity=0,h.el.get(0).style.height=0}else{if(h.seo&&0<h.page||"true"===h.preloaded){var y="true"===h.preloaded?1:0;s=h.page+1+y,h.seo?"default"===h.permalink?h.el=x('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.search_value+"&paged="+s+'" data-page="'+s+'" />'):h.el=x('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.seo_leading_slash+"page/"+s+h.seo_trailing_slash+h.search_value+'" data-page="'+s+'" />'):h.filters?h.el=x('<div class="alm-reveal alm-filters'+h.tcc+'" '+r+' data-url="'+h.canonical_url+i+'" data-page="'+s+'" />'):h.el=x('<div class="alm-reveal'+h.tcc+'" '+r+" />")}else h.filters?h.el=x('<div class="alm-reveal alm-filters'+h.tcc+'" '+r+' data-url="'+h.canonical_url+i+'" data-page="'+(h.page+1)+'" />'):h.seo?h.el=x('<div class="alm-reveal alm-seo'+h.tcc+'" '+r+' data-url="'+h.canonical_url+h.search_value+'" data-page="1" />'):h.el=x('<div class="alm-reveal'+h.tcc+'" '+r+" />");h.el.append(h.data)}}else h.el=h.data;("masonry"!==h.transition||h.init&&!h.is_masonry_preloaded)&&h.content.append(h.el),"masonry"===h.transition?(almMasonry(h.masonry_wrap,h.el,h.masonry_selector,h.masonry_columnwidth,h.masonry_animation,h.masonry_horizontalorder,h.speed,h.masonry_init,h.init,alm_is_filtering),h.masonry_init=!1,h.AjaxLoadMore.transitionEnd()):"none"===h.transition?(h.AjaxLoadMore.fadeIn(h.el.get(0),0),h.AjaxLoadMore.transitionEnd()):"true"===h.images_loaded?h.el.almWaitForImages().done(function(){h.transition_container&&h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.AjaxLoadMore.transitionEnd()}):(h.transition_container&&h.AjaxLoadMore.fadeIn(h.el.get(0),h.speed),h.AjaxLoadMore.transitionEnd())}x.isFunction(x.fn.almComplete)&&("true"===h.images_loaded?h.el.almWaitForImages().done(function(){x.fn.almComplete(h)}):x.fn.almComplete(h)),h.cache?n<h.posts_per_page&&h.AjaxLoadMore.triggerDone():h.posts>=h.totalposts&&!h.previous_post&&h.AjaxLoadMore.triggerDone()}else h.paging||(h.button.delay(h.speed).removeClass("loading").addClass("done"),h.AjaxLoadMore.resetBtnText()),h.AjaxLoadMore.triggerDone();if(void 0!==h.destroy_after&&""!==h.destroy_after){var v=h.page+1;"true"===h.preloaded&&v++,v==h.destroy_after&&h.AjaxLoadMore.destroyed()}alm_is_filtering=!1,h.init=!1},h.AjaxLoadMore.pagingPreloadedInit=function(t){t=null==t?"":t,h.el=x('<div class="alm-reveal'+h.tcc+'"/>'),h.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),h.content.append(h.el),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText();var a=parseInt(h.content.css("padding-top")),e=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+a+e+"px"),""===t&&(x.isFunction(x.fn.almPagingEmpty)&&x.fn.almPagingEmpty(h),x.isFunction(x.fn.almEmpty)&&x.fn.almEmpty(h)),setTimeout(function(){x.isFunction(x.fn.almFadePageControls)&&x.fn.almFadePageControls(h.btnWrap)},h.speed)},h.AjaxLoadMore.pagingNextpageInit=function(t){h.el=x('<div class="alm-reveal alm-nextpage"/>'),h.el.append('<div class="alm-paging-content">'+t+'</div><div class="alm-paging-loading"></div>'),h.el.appendTo(h.content),h.content.parent().removeClass("loading"),h.AjaxLoadMore.resetBtnText();var a=parseInt(h.content.css("padding-top")),e=parseInt(h.content.css("padding-bottom"));h.content.css("height",h.el.height()+a+e+"px"),x.isFunction(x.fn.almSetNextPageVars)&&x.fn.almSetNextPageVars(h),setTimeout(function(){x.isFunction(x.fn.almFadePageControls)&&x.fn.almFadePageControls(h.btnWrap),x.isFunction(x.fn.almOnWindowResize)&&x.fn.almOnWindowResize(h)},h.speed)},h.fetchingPreviousPost=!1,h.AjaxLoadMore.getPreviousPost=function(){h.fetchingPreviousPost=!0;var t={action:"alm_query_previous_post",id:h.previous_post_id,taxonomy:h.previous_post_taxonomy,excluded_terms:h.previous_post_excluded_terms};x.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:t,success:function(t){t.has_previous_post?(h.content.attr("data-previous-post-id",t.prev_id),h.previous_post_id=t.prev_id,h.previous_post_permalink=t.prev_permalink,h.previous_post_title=t.prev_title,h.previous_post_slug=t.prev_slug):t.has_previous_post||h.AjaxLoadMore.triggerDone(),x.isFunction(x.fn.almSetPreviousPost)&&x.fn.almSetPreviousPost(h,t.current_id,t.permalink,t.title),h.fetchingPreviousPost=!1},error:function(t,a,e){h.AjaxLoadMore.error(t,a,e),h.fetchingPreviousPost=!1}})},h.AjaxLoadMore.triggerAddons=function(t){x.isFunction(x.fn.almSEO)&&t.seo&&x.fn.almSEO(t,!1),x.isFunction(x.fn.almSetNextPage)&&x.fn.almSetNextPage(t)},h.AjaxLoadMore.triggerDone=function(){h.loading=!1,h.finished=!0,h.paging||h.button.addClass("done"),x.isFunction(x.fn.almDone)&&setTimeout(function(){x.fn.almDone(h)},h.speed+10)},h.AjaxLoadMore.resetBtnText=function(){!1===h.button_loading_label||h.paging||h.button.html(h.button_label)},h.AjaxLoadMore.error=function(t,a,e){h.loading=!1,h.paging||(h.button.removeClass("loading"),h.AjaxLoadMore.resetBtnText()),console.log(e)},h.paging||h.fetchingPreviousPost||(h.button.unbind("click"),h.button.on("click",function(t){t.preventDefault(),"true"===h.pause&&(h.pause=!1,h.pause_override=!1,h.AjaxLoadMore.loadPosts()),h.loading||h.finished||x(this).hasClass("done")||(h.loading=!0,h.page++,h.AjaxLoadMore.loadPosts()),h.filters&&"function"==typeof almFiltersPaged&&almFiltersPaged(h)})),h.paging&&(h.window.unbind("resizeEnd"),h.window.bind("resizeEnd",function(){x.isFunction(x.fn.almOnWindowResize)&&x.fn.almOnWindowResize(h)}),h.window.unbind("resize"),h.window.bind("resize",function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){x(this).trigger("resizeEnd")},h.speed)})),h.AjaxLoadMore.isVisible=function(){return h.visible=!1,h.el.is(":visible")&&(h.visible=!0),h.visible},h.scroll&&!h.paging&&(""!==h.scroll_container&&x(h.scroll_container).length&&(h.window=x(h.scroll_container)),h.window.bind("scroll touchstart",function(){if(h.AjaxLoadMore.isVisible()&&!h.fetchingPreviousPost){var t=h.button.offset().top,a=Math.round(t-(h.window.height()-h.scroll_distance)),e=h.window.scrollTop()>=a;""!==h.scroll_container&&(e=h.button.offset().top-(h.window.height()-h.scroll_distance)<h.window.offset().top),!h.loading&&!h.finished&&e&&h.page<h.max_pages-1&&h.proceed&&"true"===h.pause&&"true"===h.pause_override?h.button.trigger("click"):!h.loading&&!h.finished&&e&&h.page<h.max_pages-1&&h.proceed&&"true"!==h.pause&&h.button.trigger("click")}})),h.AjaxLoadMore.destroyed=function(){h.disable_ajax=!0,h.paging||(h.button.delay(h.speed).fadeOut(h.speed),x.isFunction(x.fn.almDestroyed)&&x.fn.almDestroyed(h))},h.AjaxLoadMore.fadeIn=function(t,a){if(0==a)t.style.opacity=1,t.style.height="auto";else{a/=10;var e=0,o=setInterval(function(){.9<e&&(t.style.opacity=1,clearInterval(o)),t.style.opacity=e,e+=.1},a);t.style.height="auto"}},h.AjaxLoadMore.transitionEnd=function(){setTimeout(function(){h.loading=!1,h.container.removeClass("alm-loading"),h.AjaxLoadMore.triggerAddons(h),h.paging||(h.button.delay(h.speed).removeClass("loading"),h.AjaxLoadMore.resetBtnText())},h.speed)},h.AjaxLoadMore.init=function(){("true"===h.preloaded&&1==h.destroy_after&&h.AjaxLoadMore.destroyed(),h.paging||h.previous_post||(h.disable_ajax?(h.finished=!0,h.button.addClass("done")):"true"===h.pause?(h.button.html(h.button_label),h.loading=!1):h.AjaxLoadMore.loadPosts()),h.previous_post&&(h.AjaxLoadMore.getPreviousPost(),h.loading=!1),"true"===h.preloaded&&h.seo&&!h.paging&&setTimeout(function(){x.isFunction(x.fn.almSEO)&&h.start_page<1&&x.fn.almSEO(h,!0)},h.speed),"true"!==h.preloaded||h.paging||setTimeout(function(){h.preloaded_total_posts<=parseInt(h.preloaded_amount)&&h.AjaxLoadMore.triggerDone(),0==h.preloaded_total_posts&&x.isFunction(x.fn.almEmpty)&&x.fn.almEmpty(h)},h.speed),h.nextpage)&&(1<x(".alm-nextpage").length&&x(".alm-nextpage").length==x(".alm-nextpage").eq(0).data("total-pages")&&h.AjaxLoadMore.triggerDone());h.window.bind("load",function(){h.is_masonry_preloaded&&(almMasonry(h.masonry_wrap,h.el,h.masonry_selector,h.masonry_columnwidth,h.masonry_animation,h.masonry_horizontalorder,h.speed,h.masonry_init,!0,!1),h.masonry_init=!1)})},h.AjaxLoadMore.init(),setTimeout(function(){h.proceed=!0},150),x.fn.almUpdateCurrentPage=function(t,a,e){e.page=t,e.nextpage&&!e.paging&&(e.page=e.page-1);var o="";e.paging_init&&"true"===e.preloaded?(o=x(".alm-reveal",e.el).html(),x(".alm-reveal",e.el).remove(),e.preloaded_amount=0,e.AjaxLoadMore.pagingPreloadedInit(o),e.paging_init=!1,e.init=!1):e.paging_init&&e.nextpage?(o=x(".alm-nextpage",e.el).html(),x(".alm-nextpage",e.el).remove(),e.AjaxLoadMore.pagingNextpageInit(o),e.paging_init=!1,e.init=!1):e.AjaxLoadMore.loadPosts()},x.fn.almGetParentContainer=function(){return h.el.closest("#ajax-load-more")},x.fn.almGetObj=function(){return h},x.fn.almTriggerClick=function(){h.button.trigger("click")},x.easing.alm_easeInOutQuad=function(t,a,e,o,n){return(a/=n/2)<1?o/2*a*a+e:-o/2*(--a*(a-2)-1)+e}},x.fn.ajaxloadmore=function(){return this.each(function(t){new x.ajaxloadmore(x(this),t)})};var t=document.querySelectorAll(".ajax-load-more-wrap");t.length&&[].concat(_toConsumableArray(t)).forEach(function(t,a){new x.ajaxloadmore(x(t),a)})}(jQuery);var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"===("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=t(require("jquery")):t(jQuery)}(function(g){var m="almWaitForImages";g.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},g.expr[":"]["has-src"]=function(t){return g(t).is('img[src][src!=""]')},g.expr[":"].uncached=function(t){return!!g(t).is(":has-src")&&!t.complete},g.fn.almWaitForImages=function(){var l,d,e,p=0,c=0,_=g.Deferred();if(g.isPlainObject(arguments[0])?(e=arguments[0].waitForAll,d=arguments[0].each,l=arguments[0].finished):1===arguments.length&&"boolean"===g.type(arguments[0])?e=arguments[0]:(l=arguments[0],d=arguments[1],e=arguments[2]),l=l||g.noop,d=d||g.noop,e=!!e,!g.isFunction(l)||!g.isFunction(d))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var r=g(this),s=[],t=g.almWaitForImages.hasImageProperties||[],a=g.almWaitForImages.hasImageAttributes||[],i=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?r.find("*").addBack().each(function(){var n=g(this);n.is("img:has-src")&&s.push({src:n.attr("src"),element:n[0]}),g.each(t,function(t,a){var e,o=n.css(a);if(!o)return!0;for(;e=i.exec(o);)s.push({src:e[2],element:n[0]})}),g.each(a,function(t,a){var e,o=n.attr(a);if(!o)return!0;e=o.split(","),g.each(e,function(t,a){a=g.trim(a).split(" ")[0],s.push({src:a,element:n[0]})})})}):r.find("img:has-src").each(function(){s.push({src:this.src,element:this})}),p=s.length,(c=0)===p&&(l.call(r[0]),_.resolveWith(r[0])),g.each(s,function(t,o){var a=new Image,n="load."+m+" error."+m;g(a).one(n,function t(a){var e=[c,p,"load"==a.type];if(c++,d.apply(o.element,e),_.notifyWith(o.element,e),g(this).off(n,t),c==p)return l.call(r[0]),_.resolveWith(r[0]),!1}),a.src=o.src})}),_.promise()}});
|
core/functions.php
CHANGED
@@ -327,6 +327,34 @@ function alm_do_inline_css($setting) {
|
|
327 |
return $inline;
|
328 |
}
|
329 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
|
332 |
/*
|
@@ -787,9 +815,12 @@ function alm_get_canonical_url(){
|
|
787 |
* @since 2.13.0
|
788 |
*/
|
789 |
function alm_get_page_slug($post){
|
|
|
|
|
|
|
790 |
|
791 |
-
if(!is_archive()){
|
792 |
-
|
793 |
if(is_front_page() || is_home()){
|
794 |
$slug = 'home';
|
795 |
}else{
|
@@ -860,7 +891,10 @@ function alm_get_page_slug($post){
|
|
860 |
* @return $post_id;
|
861 |
* @since 3.0.1
|
862 |
*/
|
863 |
-
function alm_get_page_id($post){
|
|
|
|
|
|
|
864 |
|
865 |
$post_id = '';
|
866 |
|
@@ -934,60 +968,58 @@ function alm_get_startpage(){
|
|
934 |
|
935 |
|
936 |
|
|
|
937 |
/*
|
938 |
-
*
|
939 |
-
*
|
940 |
*
|
941 |
-
* @
|
942 |
-
* @since 2.8.3
|
943 |
*/
|
944 |
-
function
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
|
950 |
-
|
951 |
-
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
$
|
|
|
|
|
983 |
}
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
$content .= '</div>';
|
990 |
-
$content .= '</noscript>';
|
991 |
-
}
|
992 |
-
return $content;
|
993 |
}
|
327 |
return $inline;
|
328 |
}
|
329 |
|
330 |
+
/*
|
331 |
+
* alm_loop
|
332 |
+
* This function will return HTML of a looped item
|
333 |
+
*
|
334 |
+
* @param $repeater string
|
335 |
+
* @param $type string
|
336 |
+
* @param $theme_repeater string
|
337 |
+
* @return html
|
338 |
+
* @since 3.7
|
339 |
+
*/
|
340 |
+
function alm_loop($repeater, $type, $theme_repeater, $alm_found_posts = '', $alm_page = '', $alm_item = '', $alm_current = ''){
|
341 |
+
ob_start();
|
342 |
+
|
343 |
+
// Theme Repeater
|
344 |
+
if($theme_repeater !== 'null' && has_filter('alm_get_theme_repeater')){
|
345 |
+
do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current); // Returns an include file
|
346 |
+
}
|
347 |
+
// Standard Repeater Templates
|
348 |
+
else {
|
349 |
+
$file = alm_get_current_repeater($repeater, $type);
|
350 |
+
include($file);
|
351 |
+
}
|
352 |
+
|
353 |
+
$return = ob_get_contents();
|
354 |
+
ob_end_clean();
|
355 |
+
return $return;
|
356 |
+
}
|
357 |
+
|
358 |
|
359 |
|
360 |
/*
|
815 |
* @since 2.13.0
|
816 |
*/
|
817 |
function alm_get_page_slug($post){
|
818 |
+
|
819 |
+
// Exit if admin
|
820 |
+
if(is_admin()) return false;
|
821 |
|
822 |
+
if(!is_archive()){
|
823 |
+
// If not archive, set the post slug
|
824 |
if(is_front_page() || is_home()){
|
825 |
$slug = 'home';
|
826 |
}else{
|
891 |
* @return $post_id;
|
892 |
* @since 3.0.1
|
893 |
*/
|
894 |
+
function alm_get_page_id($post){
|
895 |
+
|
896 |
+
// Exit if admin
|
897 |
+
if(is_admin()) return false;
|
898 |
|
899 |
$post_id = '';
|
900 |
|
968 |
|
969 |
|
970 |
|
971 |
+
|
972 |
/*
|
973 |
+
* alm_pretty_print
|
974 |
+
* Debug helper for printing variables to screen
|
975 |
*
|
976 |
+
* @since 3.7
|
|
|
977 |
*/
|
978 |
+
function alm_pretty_print($query){
|
979 |
+
if($query){
|
980 |
+
echo '<pre>';
|
981 |
+
print_r($query);
|
982 |
+
echo '</pre>';
|
983 |
+
}
|
984 |
+
}
|
985 |
+
|
986 |
+
|
987 |
+
|
988 |
+
/*
|
989 |
+
* alm_convert_dashes_to_underscore
|
990 |
+
* Convert dashes to underscores
|
991 |
+
*
|
992 |
+
* @param $string string
|
993 |
+
* @return string
|
994 |
+
* @since 3.7
|
995 |
+
*/
|
996 |
+
function alm_convert_dashes_to_underscore($string = ''){
|
997 |
+
return str_replace('-', '_', $string);
|
998 |
+
}
|
999 |
+
|
1000 |
+
|
1001 |
+
|
1002 |
+
/*
|
1003 |
+
* alm_sticky_post__not_in
|
1004 |
+
* Remove posts if post__not_in is set in the ALM shortcode
|
1005 |
+
*
|
1006 |
+
* @param $ids array
|
1007 |
+
* @param $not_in array
|
1008 |
+
* @return array
|
1009 |
+
* @since 3.7
|
1010 |
+
*/
|
1011 |
+
function alm_sticky_post__not_in($ids = '', $not_in = ''){
|
1012 |
+
|
1013 |
+
if(!empty($not_in)){
|
1014 |
+
$new_array = array();
|
1015 |
+
foreach($ids as $id){
|
1016 |
+
if(!in_array($id, $not_in)){
|
1017 |
+
array_push($new_array, $id);
|
1018 |
+
}
|
1019 |
}
|
1020 |
+
$ids = $new_array;
|
1021 |
+
|
1022 |
+
}
|
1023 |
+
|
1024 |
+
return $ids;
|
|
|
|
|
|
|
|
|
1025 |
}
|
core/src/js/ajax-load-more.js
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
*/
|
13 |
|
14 |
(function ($) {
|
|
|
15 |
"use strict";
|
16 |
|
17 |
$.ajaxloadmore = function (el, e) {
|
@@ -33,10 +34,11 @@
|
|
33 |
alm.finished = false;
|
34 |
alm.prefix = 'alm-';
|
35 |
alm.el = el;
|
|
|
36 |
alm.container = el;
|
37 |
alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
|
38 |
alm.content = $('.alm-ajax', alm.container);
|
39 |
-
alm.content_preloaded = $('.alm-
|
40 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
41 |
alm.is_search = alm.el.attr('data-search');
|
42 |
alm.slug = alm.el.attr('data-slug');
|
@@ -50,6 +52,7 @@
|
|
50 |
alm.post_type = alm.post_type.split(",");
|
51 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
52 |
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
|
|
53 |
alm.button_label = alm.content.attr('data-button-label');
|
54 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
55 |
alm.scroll_distance = alm.content.attr('data-scroll-distance');
|
@@ -120,6 +123,7 @@
|
|
120 |
|
121 |
alm.preloaded = alm.content.attr('data-preloaded'); // Preloaded add-on
|
122 |
alm.preloaded_amount = alm.content.attr('data-preloaded-amount');
|
|
|
123 |
|
124 |
alm.paging = alm.content.attr('data-paging'); // Paging add-on
|
125 |
|
@@ -190,9 +194,7 @@
|
|
190 |
alm.paging_show_at_most = (alm.paging_show_at_most === undefined) ? 7 : alm.paging_show_at_most;
|
191 |
|
192 |
// If preloaded, pause ALM
|
193 |
-
|
194 |
-
alm.pause = true;
|
195 |
-
}
|
196 |
|
197 |
}else{
|
198 |
alm.paging = false;
|
@@ -220,16 +222,26 @@
|
|
220 |
/* Preloaded */
|
221 |
/* If posts_per_page <= preloaded_total_posts disable ajax load more */
|
222 |
if (alm.preloaded === 'true'){
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
}
|
234 |
/* End Preloaded */
|
235 |
|
@@ -388,8 +400,7 @@
|
|
388 |
}
|
389 |
alm.masonry_wrap = alm.content;
|
390 |
alm.transition_container = false;
|
391 |
-
if(
|
392 |
-
alm.masonry_wrap = alm.content_preloaded;
|
393 |
alm.is_masonry_preloaded = true;
|
394 |
}
|
395 |
}
|
@@ -741,7 +752,7 @@
|
|
741 |
|
742 |
} else {
|
743 |
|
744 |
-
//
|
745 |
if (total > 0) {
|
746 |
alm.el = $('<div class="alm-reveal'+alm.tcc+'" '+ loadingStyle +'/>');
|
747 |
alm.el.append('<div class="alm-paging-content'+alm.tcc+'"></div><div class="alm-paging-loading"></div>');
|
@@ -763,6 +774,7 @@
|
|
763 |
});
|
764 |
}, alm.speed);
|
765 |
}
|
|
|
766 |
}
|
767 |
|
768 |
// ALM Empty
|
@@ -784,19 +796,16 @@
|
|
784 |
alm.posts_per_page = (alm.users) ? alm.content.attr('data-users-per-page') : alm.content.attr('data-posts-per-page');
|
785 |
|
786 |
// SEO add-on
|
787 |
-
|
788 |
-
// Set new page #
|
789 |
-
alm.page = alm.start_page - 1;
|
790 |
-
}
|
791 |
|
792 |
// Filters add-on
|
793 |
if(alm.filters){
|
794 |
|
795 |
if(alm.filters_startpage){
|
796 |
-
|
797 |
-
alm.page = alm.filters_startpage - 1;
|
798 |
-
|
799 |
-
// Reset filters-startpage data
|
800 |
alm.posts_per_page = alm.content.attr('data-posts-per-page');
|
801 |
}
|
802 |
}
|
@@ -825,51 +834,75 @@
|
|
825 |
} else { // Standard container
|
826 |
|
827 |
let pagenum;
|
828 |
-
let querystring = window.location.search;
|
829 |
-
|
830 |
|
831 |
-
// SEO
|
832 |
if (alm.init && alm.start_page > 1){
|
833 |
-
// loop through items and break into separate alm-reveal divs for paging
|
834 |
-
|
835 |
let seo_data = [];
|
|
|
836 |
let posts_per_page = parseInt(alm.posts_per_page);
|
837 |
-
|
|
|
|
|
|
|
|
|
|
|
838 |
if(alm.cta === 'true'){
|
839 |
-
|
840 |
-
|
|
|
841 |
}
|
842 |
-
|
843 |
-
|
|
|
844 |
for (var i = 0; i < total; i += posts_per_page) {
|
845 |
seo_data.push(alm.data.slice(i, posts_per_page + i));
|
846 |
}
|
847 |
-
|
848 |
-
alm.el = alm.content; // Set alm.el to be alm-listing div
|
849 |
|
|
|
|
|
850 |
for (var k = 0; k < seo_data.length; k++){
|
851 |
-
|
852 |
let p = (alm.preloaded === 'true') ? 1 : 0; // Add 1 page if items are preloaded.
|
853 |
-
let
|
854 |
|
855 |
-
if(k > 0 || alm.preloaded === 'true'){
|
|
|
856 |
// > Paged
|
857 |
pagenum = (k + 1 + p);
|
|
|
858 |
if(alm.permalink === 'default'){
|
859 |
-
|
860 |
}else{
|
861 |
-
|
862 |
}
|
|
|
863 |
}else{
|
864 |
-
|
865 |
-
|
|
|
866 |
}
|
867 |
|
868 |
-
|
869 |
-
|
870 |
-
|
871 |
-
|
872 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
873 |
}
|
874 |
// End SEO
|
875 |
|
@@ -927,14 +960,17 @@
|
|
927 |
}
|
928 |
}
|
929 |
|
|
|
930 |
// Append alm.el to ALM container
|
931 |
// Do not append when transtion == masonry OR init and !preloaded
|
932 |
if (alm.transition !== 'masonry' || (alm.init && !alm.is_masonry_preloaded)){
|
933 |
alm.content.append(alm.el);
|
934 |
}
|
935 |
|
|
|
936 |
// Transitions
|
937 |
|
|
|
938 |
// Masonry
|
939 |
if(alm.transition === 'masonry') {
|
940 |
almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_columnwidth, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.masonry_init, alm.init, alm_is_filtering);
|
@@ -1548,8 +1584,8 @@
|
|
1548 |
if(alm.paging_init && alm.preloaded === 'true'){
|
1549 |
|
1550 |
// Paging + Preloaded Firstrun
|
1551 |
-
data = $('.alm-
|
1552 |
-
$('.alm-
|
1553 |
alm.preloaded_amount = 0; // Reset
|
1554 |
alm.AjaxLoadMore.pagingPreloadedInit(data);
|
1555 |
alm.paging_init = false;
|
12 |
*/
|
13 |
|
14 |
(function ($) {
|
15 |
+
|
16 |
"use strict";
|
17 |
|
18 |
$.ajaxloadmore = function (el, e) {
|
34 |
alm.finished = false;
|
35 |
alm.prefix = 'alm-';
|
36 |
alm.el = el;
|
37 |
+
alm.master_id = alm.el.get(0).id; // the actual ALM div#id
|
38 |
alm.container = el;
|
39 |
alm.container.addClass('alm-'+e).attr('data-alm-id', e); // Add unique classname and data id
|
40 |
alm.content = $('.alm-ajax', alm.container);
|
41 |
+
alm.content_preloaded = $('.alm-preloaded', alm.container);
|
42 |
alm.canonical_url = alm.el.attr('data-canonical-url');
|
43 |
alm.is_search = alm.el.attr('data-search');
|
44 |
alm.slug = alm.el.attr('data-slug');
|
52 |
alm.post_type = alm.post_type.split(",");
|
53 |
alm.sticky_posts = alm.content.attr('data-sticky-posts');
|
54 |
alm.btnWrap = $('.alm-btn-wrap', alm.container);
|
55 |
+
alm.btnWrap.get(0).style.visibility = 'visible';
|
56 |
alm.button_label = alm.content.attr('data-button-label');
|
57 |
alm.button_loading_label = alm.content.attr('data-button-loading-label');
|
58 |
alm.scroll_distance = alm.content.attr('data-scroll-distance');
|
123 |
|
124 |
alm.preloaded = alm.content.attr('data-preloaded'); // Preloaded add-on
|
125 |
alm.preloaded_amount = alm.content.attr('data-preloaded-amount');
|
126 |
+
alm.is_preloaded = (alm.content.attr('data-is-preloaded') === 'true') ? true : false;
|
127 |
|
128 |
alm.paging = alm.content.attr('data-paging'); // Paging add-on
|
129 |
|
194 |
alm.paging_show_at_most = (alm.paging_show_at_most === undefined) ? 7 : alm.paging_show_at_most;
|
195 |
|
196 |
// If preloaded, pause ALM
|
197 |
+
alm.pause = (alm.preloaded === 'true') ? true : alm.pause;
|
|
|
|
|
198 |
|
199 |
}else{
|
200 |
alm.paging = false;
|
222 |
/* Preloaded */
|
223 |
/* If posts_per_page <= preloaded_total_posts disable ajax load more */
|
224 |
if (alm.preloaded === 'true'){
|
225 |
+
|
226 |
+
// Get Preloaded Amount
|
227 |
+
alm.preloaded_amount = (alm.preloaded_amount === undefined) ? alm.posts_per_page : alm.preloaded_amount;
|
228 |
+
|
229 |
+
// Get the preloaded localized <script> object to get total_posts
|
230 |
+
let var_master_id = alm.master_id.replace(/-/g, '_'); // Convert dashes to underscores for the var name
|
231 |
+
var_master_id = var_master_id +'_vars'; // This is the localize variable on the screen (ajax_load_more_vars)
|
232 |
+
|
233 |
+
let preloaded_vars = window[var_master_id]; // Get localize vars
|
234 |
+
|
235 |
+
// Disable ALM if total_posts is </= preloaded_amount
|
236 |
+
if(preloaded_vars && preloaded_vars.total_posts){
|
237 |
+
if (parseInt(preloaded_vars.total_posts) <= parseInt(alm.preloaded_amount)){
|
238 |
+
alm.preloaded_total_posts = preloaded_vars.total_posts;
|
239 |
+
alm.disable_ajax = true;
|
240 |
+
}
|
241 |
+
}
|
242 |
+
|
243 |
+
}else{
|
244 |
+
alm.preloaded = 'false';
|
245 |
}
|
246 |
/* End Preloaded */
|
247 |
|
400 |
}
|
401 |
alm.masonry_wrap = alm.content;
|
402 |
alm.transition_container = false;
|
403 |
+
if(alm.preloaded === 'true'){
|
|
|
404 |
alm.is_masonry_preloaded = true;
|
405 |
}
|
406 |
}
|
752 |
|
753 |
} else {
|
754 |
|
755 |
+
// Paging
|
756 |
if (total > 0) {
|
757 |
alm.el = $('<div class="alm-reveal'+alm.tcc+'" '+ loadingStyle +'/>');
|
758 |
alm.el.append('<div class="alm-paging-content'+alm.tcc+'"></div><div class="alm-paging-loading"></div>');
|
774 |
});
|
775 |
}, alm.speed);
|
776 |
}
|
777 |
+
|
778 |
}
|
779 |
|
780 |
// ALM Empty
|
796 |
alm.posts_per_page = (alm.users) ? alm.content.attr('data-users-per-page') : alm.content.attr('data-posts-per-page');
|
797 |
|
798 |
// SEO add-on
|
799 |
+
alm.page = (alm.start_page) ? alm.start_page - 1 : alm.page; // Set new page #
|
|
|
|
|
|
|
800 |
|
801 |
// Filters add-on
|
802 |
if(alm.filters){
|
803 |
|
804 |
if(alm.filters_startpage){
|
805 |
+
// Set new page #
|
806 |
+
alm.page = alm.filters_startpage - 1;
|
807 |
+
|
808 |
+
// Reset filters-startpage data after the first run
|
809 |
alm.posts_per_page = alm.content.attr('data-posts-per-page');
|
810 |
}
|
811 |
}
|
834 |
} else { // Standard container
|
835 |
|
836 |
let pagenum;
|
837 |
+
let querystring = window.location.search;
|
|
|
838 |
|
839 |
+
// SEO, init and paged
|
840 |
if (alm.init && alm.start_page > 1){
|
841 |
+
// loop through items and break into separate .alm-reveal divs for paging
|
842 |
+
|
843 |
let seo_data = [];
|
844 |
+
let container_array = [];
|
845 |
let posts_per_page = parseInt(alm.posts_per_page);
|
846 |
+
let pages = Math.ceil(total/posts_per_page);
|
847 |
+
|
848 |
+
// Set alm.el to be .alm-listing div
|
849 |
+
alm.el = alm.content;
|
850 |
+
|
851 |
+
// Call to Actions
|
852 |
if(alm.cta === 'true'){
|
853 |
+
posts_per_page = posts_per_page + 1; // Add 1 to posts_per_page for CTAs
|
854 |
+
pages = Math.ceil(total/posts_per_page); // Update pages var with new posts_per_page
|
855 |
+
total = pages + total; // Get new total w/ CTAs added
|
856 |
}
|
857 |
+
|
858 |
+
|
859 |
+
// Slice seo_data array into induvidual pages
|
860 |
for (var i = 0; i < total; i += posts_per_page) {
|
861 |
seo_data.push(alm.data.slice(i, posts_per_page + i));
|
862 |
}
|
|
|
|
|
863 |
|
864 |
+
|
865 |
+
// Loop seo_data to build .alm-reveal data attributes
|
866 |
for (var k = 0; k < seo_data.length; k++){
|
867 |
+
|
868 |
let p = (alm.preloaded === 'true') ? 1 : 0; // Add 1 page if items are preloaded.
|
869 |
+
let div_reveal;
|
870 |
|
871 |
+
if(k > 0 || alm.preloaded === 'true'){
|
872 |
+
|
873 |
// > Paged
|
874 |
pagenum = (k + 1 + p);
|
875 |
+
|
876 |
if(alm.permalink === 'default'){
|
877 |
+
div_reveal = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
|
878 |
}else{
|
879 |
+
div_reveal = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+ alm.canonical_url + alm.seo_leading_slash +'page/'+ pagenum + alm.seo_trailing_slash + alm.search_value +'" data-page="'+ pagenum +'" />');
|
880 |
}
|
881 |
+
|
882 |
}else{
|
883 |
+
// First Page
|
884 |
+
let preloaded_class = (alm.is_preloaded) ? ' alm-preloaded' : '';
|
885 |
+
div_reveal = $('<div class="alm-reveal alm-seo'+preloaded_class+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
|
886 |
}
|
887 |
|
888 |
+
// Append data to div_reveal and add to container_array
|
889 |
+
container_array.push(div_reveal.append(seo_data[k]));
|
890 |
+
|
|
|
891 |
}
|
892 |
+
|
893 |
+
// Reverse the container_array so we start at page 1
|
894 |
+
//container_array.reverse();
|
895 |
+
for (var x = 0; x < container_array.length; x++){
|
896 |
+
//alm.el.prepend(container_array[x]);
|
897 |
+
alm.el.append(container_array[x]);
|
898 |
+
}
|
899 |
+
|
900 |
+
|
901 |
+
|
902 |
+
// Set opacity and height of .alm-listing div to allow for fadein.
|
903 |
+
alm.el.get(0).style.opacity = 0;
|
904 |
+
alm.el.get(0).style.height = 0;
|
905 |
+
|
906 |
}
|
907 |
// End SEO
|
908 |
|
960 |
}
|
961 |
}
|
962 |
|
963 |
+
|
964 |
// Append alm.el to ALM container
|
965 |
// Do not append when transtion == masonry OR init and !preloaded
|
966 |
if (alm.transition !== 'masonry' || (alm.init && !alm.is_masonry_preloaded)){
|
967 |
alm.content.append(alm.el);
|
968 |
}
|
969 |
|
970 |
+
|
971 |
// Transitions
|
972 |
|
973 |
+
|
974 |
// Masonry
|
975 |
if(alm.transition === 'masonry') {
|
976 |
almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_columnwidth, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.masonry_init, alm.init, alm_is_filtering);
|
1584 |
if(alm.paging_init && alm.preloaded === 'true'){
|
1585 |
|
1586 |
// Paging + Preloaded Firstrun
|
1587 |
+
data = $('.alm-reveal', alm.el).html(); // Content of preloaded page
|
1588 |
+
$('.alm-reveal', alm.el).remove();
|
1589 |
alm.preloaded_amount = 0; // Reset
|
1590 |
alm.AjaxLoadMore.pagingPreloadedInit(data);
|
1591 |
alm.paging_init = false;
|
core/src/js/helpers/queryParams.js
CHANGED
@@ -146,6 +146,9 @@ let almGetAjaxParams = function(alm, action, queryType){
|
|
146 |
if(alm.content.attr('data-search')){
|
147 |
data.search = alm.content.attr('data-search');
|
148 |
}
|
|
|
|
|
|
|
149 |
if(alm.content.attr('data-custom-args')){
|
150 |
data.custom_args = alm.content.attr('data-custom-args');
|
151 |
}
|
146 |
if(alm.content.attr('data-search')){
|
147 |
data.search = alm.content.attr('data-search');
|
148 |
}
|
149 |
+
if(alm.content.attr('data-s')){
|
150 |
+
data.search = alm.content.attr('data-s');
|
151 |
+
}
|
152 |
if(alm.content.attr('data-custom-args')){
|
153 |
data.custom_args = alm.content.attr('data-custom-args');
|
154 |
}
|
lang/ajax-load-more.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Ajax Load More\n"
|
5 |
-
"POT-Creation-Date: 2018-
|
6 |
"PO-Revision-Date: 2018-06-20 13:05-0500\n"
|
7 |
"Last-Translator: Darren Cooney <darren@connekthq.com>\n"
|
8 |
"Language-Team: \n"
|
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.0.
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"X-Poedit-KeywordsList: __;_e\n"
|
@@ -34,255 +34,255 @@ msgid ""
|
|
34 |
"load-more-licenses\">Licenses</a> section and input your keys."
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: admin/admin.php:162 admin/admin.php:
|
38 |
-
#: admin/admin.php:
|
39 |
msgid "You don't belong here."
|
40 |
msgstr ""
|
41 |
|
42 |
-
#: admin/admin.php:
|
43 |
msgid "Ajax Load More"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: admin/admin.php:
|
47 |
#: admin/views/licenses.php:83
|
48 |
msgid "Active"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: admin/admin.php:
|
52 |
#: admin/views/licenses.php:87
|
53 |
msgid "Inactive"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: admin/admin.php:
|
57 |
msgid "Applying layout"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: admin/admin.php:
|
61 |
#: admin/views/repeater-templates.php:421
|
62 |
msgid "Template Updated"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: admin/admin.php:
|
66 |
msgid "Select Author(s)"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: admin/admin.php:
|
70 |
msgid "Select Categories"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: admin/admin.php:
|
74 |
msgid "Select Tags"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: admin/admin.php:
|
78 |
#: admin/editor/editor-build.php:77
|
79 |
msgid "Jump to Option"
|
80 |
msgstr ""
|
81 |
|
82 |
-
#: admin/admin.php:
|
83 |
msgid "Jump to Template"
|
84 |
msgstr ""
|
85 |
|
86 |
-
#: admin/admin.php:
|
87 |
msgid "Are you sure you want to install this Ajax Load More extension?"
|
88 |
msgstr ""
|
89 |
|
90 |
-
#: admin/admin.php:
|
91 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:51
|
92 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:379
|
93 |
msgid "Install Now"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: admin/admin.php:
|
97 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:90
|
98 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:380
|
99 |
msgid "Activate"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: admin/admin.php:
|
103 |
msgid "Saving Settings"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: admin/admin.php:
|
107 |
msgid "Settings Saved Successfully"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: admin/admin.php:
|
111 |
msgid "Error Saving Settings"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: admin/admin.php:
|
115 |
msgid ""
|
116 |
"[Ajax Load More] Error opening default repeater template - Please check your "
|
117 |
"file path and ensure your server is configured to allow Ajax Load More to "
|
118 |
"read and write files within the /ajax-load-more/core/repeater directory"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: admin/admin.php:
|
122 |
msgid ""
|
123 |
"[Ajax Load More] Error updating default repeater template - Please check "
|
124 |
"your file path and ensure your server is configured to allow Ajax Load More "
|
125 |
"to read and write files within the /ajax-load-more/core/repeater directory."
|
126 |
msgstr ""
|
127 |
|
128 |
-
#: admin/admin.php:
|
129 |
msgid "Settings"
|
130 |
msgstr ""
|
131 |
|
132 |
-
#: admin/admin.php:
|
133 |
#: admin/views/repeater-templates.php:14 admin/views/repeater-templates.php:25
|
134 |
msgid "Repeater Templates"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: admin/admin.php:
|
138 |
msgid "Shortcode Builder"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: admin/admin.php:
|
142 |
msgid "Add-ons"
|
143 |
msgstr ""
|
144 |
|
145 |
-
#: admin/admin.php:
|
146 |
msgid "Extensions"
|
147 |
msgstr ""
|
148 |
|
149 |
-
#: admin/admin.php:
|
150 |
msgid "Help"
|
151 |
msgstr ""
|
152 |
|
153 |
-
#: admin/admin.php:
|
154 |
msgid "License"
|
155 |
msgstr ""
|
156 |
|
157 |
-
#: admin/admin.php:
|
158 |
msgid "Licenses"
|
159 |
msgstr ""
|
160 |
|
161 |
-
#: admin/admin.php:
|
162 |
msgid "Pro"
|
163 |
msgstr ""
|
164 |
|
165 |
-
#: admin/admin.php:
|
166 |
-
#: admin/shortcode-builder/components/cache.php:3 admin/views/settings.php:
|
167 |
#: core/functions.php:47
|
168 |
msgid "Cache"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: admin/admin.php:
|
172 |
-
#: admin/shortcode-builder/components/filters.php:3 admin/views/settings.php:
|
173 |
#: core/functions.php:103
|
174 |
msgid "Filters"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: admin/admin.php:
|
178 |
msgid "[Ajax Load More] Unable to open repeater template - "
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: admin/admin.php:
|
182 |
msgid "[Ajax Load More] Error saving repeater template - "
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: admin/admin.php:
|
186 |
msgid "Template Saved Successfully"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: admin/admin.php:
|
190 |
msgid "Error Writing File"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: admin/admin.php:
|
194 |
msgid "Something went wrong and the data could not be saved."
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: admin/admin.php:
|
198 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:170
|
199 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:241
|
200 |
msgid "Error - unable to verify nonce, please try again."
|
201 |
msgstr ""
|
202 |
|
203 |
-
#: admin/admin.php:
|
204 |
msgid "Container Type"
|
205 |
msgstr ""
|
206 |
|
207 |
-
#: admin/admin.php:
|
208 |
msgid "Container Classes"
|
209 |
msgstr ""
|
210 |
|
211 |
-
#: admin/admin.php:
|
212 |
msgid "Disable CSS"
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: admin/admin.php:
|
216 |
msgid "Button/Loading Style"
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: admin/admin.php:
|
220 |
msgid "Button Classes"
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: admin/admin.php:
|
224 |
msgid "Load CSS Inline"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: admin/admin.php:
|
228 |
msgid "Top of Page"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: admin/admin.php:
|
232 |
msgid "Dynamic Content"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: admin/admin.php:
|
236 |
msgid "Editor Button"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: admin/admin.php:
|
240 |
msgid "Error Notices"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: admin/admin.php:
|
244 |
msgid ""
|
245 |
"Customize the user experience of Ajax Load More by updating the fields below."
|
246 |
msgstr ""
|
247 |
|
248 |
-
#: admin/admin.php:
|
249 |
msgid "The following settings affect the WordPress admin area only."
|
250 |
msgstr ""
|
251 |
|
252 |
-
#: admin/admin.php:
|
253 |
msgid "I want to use my own CSS styles."
|
254 |
msgstr ""
|
255 |
|
256 |
-
#: admin/admin.php:
|
257 |
msgid "View Ajax Load More CSS"
|
258 |
msgstr ""
|
259 |
|
260 |
-
#: admin/admin.php:
|
261 |
msgid "Hide shortcode button in WYSIWYG editor."
|
262 |
msgstr ""
|
263 |
|
264 |
-
#: admin/admin.php:
|
265 |
msgid ""
|
266 |
"Display error messaging regarding repeater template updates in the browser "
|
267 |
"console."
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: admin/admin.php:
|
271 |
msgid ""
|
272 |
"Disable dynamic population of categories, tags and authors in the Shortcode "
|
273 |
"Builder.<span style=\"display:block\">Recommended if you have a large number "
|
274 |
"of categories, tags and/or authors."
|
275 |
msgstr ""
|
276 |
|
277 |
-
#: admin/admin.php:
|
278 |
msgid "Ajax Posts Here"
|
279 |
msgstr ""
|
280 |
|
281 |
-
#: admin/admin.php:
|
282 |
msgid "You can modify the container type when building a shortcode."
|
283 |
msgstr ""
|
284 |
|
285 |
-
#: admin/admin.php:
|
286 |
msgid ""
|
287 |
"Add custom classes to the <i>.alm-listing</i> container - classes are "
|
288 |
"applied globally and will appear with every instance of Ajax Load More. "
|
@@ -290,45 +290,45 @@ msgid ""
|
|
290 |
"shortcode.</span>"
|
291 |
msgstr ""
|
292 |
|
293 |
-
#: admin/admin.php:
|
294 |
msgid ""
|
295 |
"Select an Ajax loading style - you can choose between a <strong>Button</"
|
296 |
"strong> or <strong>Infinite Scroll</strong>"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: admin/admin.php:
|
300 |
msgid "Button"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: admin/admin.php:
|
304 |
msgid "Infinite Scroll (No Button)"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: admin/admin.php:
|
308 |
msgid "Preview"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: admin/admin.php:
|
312 |
-
#: core/classes/class.alm-shortcode.php:
|
313 |
msgid "Older Posts"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: admin/admin.php:
|
317 |
msgid "Improve site performance by loading Ajax Load More CSS inline"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: admin/admin.php:
|
321 |
msgid "Add classes to your <strong>Load More</strong> button"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: admin/admin.php:
|
325 |
msgid ""
|
326 |
"On initial page load, move the user's browser window to the top of the "
|
327 |
"screen.<span style=\"display:block\">This <u>may</u> help prevent the "
|
328 |
"loading of unnecessary posts.</span>"
|
329 |
msgstr ""
|
330 |
|
331 |
-
#: admin/admin.php:
|
332 |
msgid ""
|
333 |
"Enable <a href=\"https://codex.wordpress.org/WordPress_Nonces\" target="
|
334 |
"\"_blank\">WP nonce</a> verification to help protect URLs against certain "
|
@@ -535,12 +535,8 @@ msgstr ""
|
|
535 |
msgid "Write Review"
|
536 |
msgstr ""
|
537 |
|
538 |
-
#: admin/includes/cta/sharing.php:
|
539 |
-
msgid "
|
540 |
-
msgstr ""
|
541 |
-
|
542 |
-
#: admin/includes/cta/sharing.php:4
|
543 |
-
msgid "Help spread the word by sharing Ajax Load More on Twitter and Facebook."
|
544 |
msgstr ""
|
545 |
|
546 |
#: admin/includes/cta/writeable.php:2
|
@@ -1006,7 +1002,7 @@ msgid ""
|
|
1006 |
"\"_blank\">View documentation</a>"
|
1007 |
msgstr ""
|
1008 |
|
1009 |
-
#: admin/shortcode-builder/components/paging.php:3 admin/views/settings.php:
|
1010 |
#: core/functions.php:145
|
1011 |
msgid "Paging"
|
1012 |
msgstr ""
|
@@ -1057,7 +1053,7 @@ msgid "Enter the number of posts to preload."
|
|
1057 |
msgstr ""
|
1058 |
|
1059 |
#: admin/shortcode-builder/components/previous-post.php:3
|
1060 |
-
#: admin/views/settings.php:
|
1061 |
msgid "Previous Post"
|
1062 |
msgstr ""
|
1063 |
|
@@ -1120,7 +1116,7 @@ msgid ""
|
|
1120 |
msgstr ""
|
1121 |
|
1122 |
#: admin/shortcode-builder/components/rest-api.php:18
|
1123 |
-
#: admin/views/settings.php:
|
1124 |
msgid "REST API"
|
1125 |
msgstr ""
|
1126 |
|
@@ -2066,7 +2062,7 @@ msgstr ""
|
|
2066 |
msgid "The library of editable templates for use within your theme"
|
2067 |
msgstr ""
|
2068 |
|
2069 |
-
#: admin/views/repeater-templates.php:26 admin/views/settings.php:
|
2070 |
#: core/functions.php:201
|
2071 |
msgid "Theme Repeaters"
|
2072 |
msgstr ""
|
@@ -2139,27 +2135,23 @@ msgstr ""
|
|
2139 |
msgid "A powerful plugin to add infinite scroll functionality to your website."
|
2140 |
msgstr ""
|
2141 |
|
2142 |
-
#: admin/views/settings.php:
|
2143 |
-
msgid "Don't show me this again!"
|
2144 |
-
msgstr ""
|
2145 |
-
|
2146 |
-
#: admin/views/settings.php:49 admin/views/settings.php:52
|
2147 |
msgid "Jump to Setting"
|
2148 |
msgstr ""
|
2149 |
|
2150 |
-
#: admin/views/settings.php:
|
2151 |
msgid "Global Settings"
|
2152 |
msgstr ""
|
2153 |
|
2154 |
-
#: admin/views/settings.php:
|
2155 |
msgid "Admin"
|
2156 |
msgstr ""
|
2157 |
|
2158 |
-
#: admin/views/settings.php:
|
2159 |
msgid "Layouts"
|
2160 |
msgstr ""
|
2161 |
|
2162 |
-
#: admin/views/settings.php:
|
2163 |
msgid "SEO"
|
2164 |
msgstr ""
|
2165 |
|
@@ -2191,10 +2183,14 @@ msgstr ""
|
|
2191 |
msgid "Copy Shortcode"
|
2192 |
msgstr ""
|
2193 |
|
2194 |
-
#: ajax-load-more.php:
|
2195 |
msgid "Error creating repeater template directory"
|
2196 |
msgstr ""
|
2197 |
|
|
|
|
|
|
|
|
|
2198 |
#: core/functions.php:16
|
2199 |
msgid "Ajax Load More Pro"
|
2200 |
msgstr ""
|
@@ -2338,10 +2334,6 @@ msgid ""
|
|
2338 |
"WP_User_Query."
|
2339 |
msgstr ""
|
2340 |
|
2341 |
-
#: core/functions.php:973
|
2342 |
-
msgid "Pages:"
|
2343 |
-
msgstr ""
|
2344 |
-
|
2345 |
#: vendor/EDD_SL_Plugin_Updater.php:210
|
2346 |
#, php-format
|
2347 |
msgid ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Ajax Load More\n"
|
5 |
+
"POT-Creation-Date: 2018-09-18 12:06-0400\n"
|
6 |
"PO-Revision-Date: 2018-06-20 13:05-0500\n"
|
7 |
"Last-Translator: Darren Cooney <darren@connekthq.com>\n"
|
8 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.0.9\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
16 |
"X-Poedit-KeywordsList: __;_e\n"
|
34 |
"load-more-licenses\">Licenses</a> section and input your keys."
|
35 |
msgstr ""
|
36 |
|
37 |
+
#: admin/admin.php:162 admin/admin.php:220 admin/admin.php:892
|
38 |
+
#: admin/admin.php:937 admin/admin.php:987
|
39 |
msgid "You don't belong here."
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: admin/admin.php:251
|
43 |
msgid "Ajax Load More"
|
44 |
msgstr ""
|
45 |
|
46 |
+
#: admin/admin.php:252 admin/editor/editor-build.php:69
|
47 |
#: admin/views/licenses.php:83
|
48 |
msgid "Active"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: admin/admin.php:253 admin/editor/editor-build.php:70
|
52 |
#: admin/views/licenses.php:87
|
53 |
msgid "Inactive"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: admin/admin.php:254 admin/editor/editor-build.php:71
|
57 |
msgid "Applying layout"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: admin/admin.php:255 admin/editor/editor-build.php:72
|
61 |
#: admin/views/repeater-templates.php:421
|
62 |
msgid "Template Updated"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: admin/admin.php:257 admin/editor/editor-build.php:74
|
66 |
msgid "Select Author(s)"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: admin/admin.php:258 admin/editor/editor-build.php:75
|
70 |
msgid "Select Categories"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: admin/admin.php:259 admin/editor/editor-build.php:76
|
74 |
msgid "Select Tags"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: admin/admin.php:260 admin/editor/editor-build.php:41
|
78 |
#: admin/editor/editor-build.php:77
|
79 |
msgid "Jump to Option"
|
80 |
msgstr ""
|
81 |
|
82 |
+
#: admin/admin.php:261 admin/editor/editor-build.php:78
|
83 |
msgid "Jump to Template"
|
84 |
msgstr ""
|
85 |
|
86 |
+
#: admin/admin.php:262
|
87 |
msgid "Are you sure you want to install this Ajax Load More extension?"
|
88 |
msgstr ""
|
89 |
|
90 |
+
#: admin/admin.php:263
|
91 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:51
|
92 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:379
|
93 |
msgid "Install Now"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: admin/admin.php:264
|
97 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:90
|
98 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:380
|
99 |
msgid "Activate"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: admin/admin.php:265
|
103 |
msgid "Saving Settings"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: admin/admin.php:266
|
107 |
msgid "Settings Saved Successfully"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: admin/admin.php:267
|
111 |
msgid "Error Saving Settings"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: admin/admin.php:367
|
115 |
msgid ""
|
116 |
"[Ajax Load More] Error opening default repeater template - Please check your "
|
117 |
"file path and ensure your server is configured to allow Ajax Load More to "
|
118 |
"read and write files within the /ajax-load-more/core/repeater directory"
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: admin/admin.php:371
|
122 |
msgid ""
|
123 |
"[Ajax Load More] Error updating default repeater template - Please check "
|
124 |
"your file path and ensure your server is configured to allow Ajax Load More "
|
125 |
"to read and write files within the /ajax-load-more/core/repeater directory."
|
126 |
msgstr ""
|
127 |
|
128 |
+
#: admin/admin.php:411 admin/admin.php:412 ajax-load-more.php:364
|
129 |
msgid "Settings"
|
130 |
msgstr ""
|
131 |
|
132 |
+
#: admin/admin.php:420 admin/admin.php:421
|
133 |
#: admin/views/repeater-templates.php:14 admin/views/repeater-templates.php:25
|
134 |
msgid "Repeater Templates"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: admin/admin.php:429 admin/admin.php:430 admin/views/shortcode-builder.php:6
|
138 |
msgid "Shortcode Builder"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: admin/admin.php:439 admin/admin.php:440 admin/views/add-ons.php:6
|
142 |
msgid "Add-ons"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: admin/admin.php:449 admin/admin.php:450 admin/views/extensions.php:5
|
146 |
msgid "Extensions"
|
147 |
msgstr ""
|
148 |
|
149 |
+
#: admin/admin.php:458 admin/admin.php:459 admin/views/help.php:18
|
150 |
msgid "Help"
|
151 |
msgstr ""
|
152 |
|
153 |
+
#: admin/admin.php:465
|
154 |
msgid "License"
|
155 |
msgstr ""
|
156 |
|
157 |
+
#: admin/admin.php:465 admin/views/licenses.php:2
|
158 |
msgid "Licenses"
|
159 |
msgstr ""
|
160 |
|
161 |
+
#: admin/admin.php:485 admin/admin.php:486
|
162 |
msgid "Pro"
|
163 |
msgstr ""
|
164 |
|
165 |
+
#: admin/admin.php:498 admin/admin.php:499
|
166 |
+
#: admin/shortcode-builder/components/cache.php:3 admin/views/settings.php:32
|
167 |
#: core/functions.php:47
|
168 |
msgid "Cache"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: admin/admin.php:519 admin/admin.php:520
|
172 |
+
#: admin/shortcode-builder/components/filters.php:3 admin/views/settings.php:34
|
173 |
#: core/functions.php:103
|
174 |
msgid "Filters"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: admin/admin.php:848
|
178 |
msgid "[Ajax Load More] Unable to open repeater template - "
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: admin/admin.php:852
|
182 |
msgid "[Ajax Load More] Error saving repeater template - "
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: admin/admin.php:884
|
186 |
msgid "Template Saved Successfully"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: admin/admin.php:886
|
190 |
msgid "Error Writing File"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: admin/admin.php:886 admin/views/repeater-templates.php:362
|
194 |
msgid "Something went wrong and the data could not be saved."
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: admin/admin.php:1031
|
198 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:170
|
199 |
#: vendor/connekt-plugin-installer/class-connekt-plugin-installer.php:241
|
200 |
msgid "Error - unable to verify nonce, please try again."
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: admin/admin.php:1092 admin/shortcode-builder/shortcode-builder.php:73
|
204 |
msgid "Container Type"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: admin/admin.php:1100 admin/shortcode-builder/shortcode-builder.php:104
|
208 |
msgid "Container Classes"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: admin/admin.php:1108
|
212 |
msgid "Disable CSS"
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: admin/admin.php:1116
|
216 |
msgid "Button/Loading Style"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: admin/admin.php:1124
|
220 |
msgid "Button Classes"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: admin/admin.php:1132
|
224 |
msgid "Load CSS Inline"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: admin/admin.php:1140
|
228 |
msgid "Top of Page"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: admin/admin.php:1148
|
232 |
msgid "Dynamic Content"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: admin/admin.php:1156
|
236 |
msgid "Editor Button"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: admin/admin.php:1164
|
240 |
msgid "Error Notices"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: admin/admin.php:1241
|
244 |
msgid ""
|
245 |
"Customize the user experience of Ajax Load More by updating the fields below."
|
246 |
msgstr ""
|
247 |
|
248 |
+
#: admin/admin.php:1254
|
249 |
msgid "The following settings affect the WordPress admin area only."
|
250 |
msgstr ""
|
251 |
|
252 |
+
#: admin/admin.php:1285
|
253 |
msgid "I want to use my own CSS styles."
|
254 |
msgstr ""
|
255 |
|
256 |
+
#: admin/admin.php:1285
|
257 |
msgid "View Ajax Load More CSS"
|
258 |
msgstr ""
|
259 |
|
260 |
+
#: admin/admin.php:1305
|
261 |
msgid "Hide shortcode button in WYSIWYG editor."
|
262 |
msgstr ""
|
263 |
|
264 |
+
#: admin/admin.php:1326
|
265 |
msgid ""
|
266 |
"Display error messaging regarding repeater template updates in the browser "
|
267 |
"console."
|
268 |
msgstr ""
|
269 |
|
270 |
+
#: admin/admin.php:1347
|
271 |
msgid ""
|
272 |
"Disable dynamic population of categories, tags and authors in the Shortcode "
|
273 |
"Builder.<span style=\"display:block\">Recommended if you have a large number "
|
274 |
"of categories, tags and/or authors."
|
275 |
msgstr ""
|
276 |
|
277 |
+
#: admin/admin.php:1368 admin/admin.php:1371
|
278 |
msgid "Ajax Posts Here"
|
279 |
msgstr ""
|
280 |
|
281 |
+
#: admin/admin.php:1373
|
282 |
msgid "You can modify the container type when building a shortcode."
|
283 |
msgstr ""
|
284 |
|
285 |
+
#: admin/admin.php:1390
|
286 |
msgid ""
|
287 |
"Add custom classes to the <i>.alm-listing</i> container - classes are "
|
288 |
"applied globally and will appear with every instance of Ajax Load More. "
|
290 |
"shortcode.</span>"
|
291 |
msgstr ""
|
292 |
|
293 |
+
#: admin/admin.php:1452
|
294 |
msgid ""
|
295 |
"Select an Ajax loading style - you can choose between a <strong>Button</"
|
296 |
"strong> or <strong>Infinite Scroll</strong>"
|
297 |
msgstr ""
|
298 |
|
299 |
+
#: admin/admin.php:1457
|
300 |
msgid "Button"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: admin/admin.php:1465
|
304 |
msgid "Infinite Scroll (No Button)"
|
305 |
msgstr ""
|
306 |
|
307 |
+
#: admin/admin.php:1478
|
308 |
msgid "Preview"
|
309 |
msgstr ""
|
310 |
|
311 |
+
#: admin/admin.php:1478 admin/shortcode-builder/shortcode-builder.php:171
|
312 |
+
#: core/classes/class.alm-shortcode.php:157
|
313 |
msgid "Older Posts"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: admin/admin.php:1499
|
317 |
msgid "Improve site performance by loading Ajax Load More CSS inline"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: admin/admin.php:1519
|
321 |
msgid "Add classes to your <strong>Load More</strong> button"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: admin/admin.php:1564
|
325 |
msgid ""
|
326 |
"On initial page load, move the user's browser window to the top of the "
|
327 |
"screen.<span style=\"display:block\">This <u>may</u> help prevent the "
|
328 |
"loading of unnecessary posts.</span>"
|
329 |
msgstr ""
|
330 |
|
331 |
+
#: admin/admin.php:1585
|
332 |
msgid ""
|
333 |
"Enable <a href=\"https://codex.wordpress.org/WordPress_Nonces\" target="
|
334 |
"\"_blank\">WP nonce</a> verification to help protect URLs against certain "
|
535 |
msgid "Write Review"
|
536 |
msgstr ""
|
537 |
|
538 |
+
#: admin/includes/cta/sharing.php:22
|
539 |
+
msgid "Don't show me this again!"
|
|
|
|
|
|
|
|
|
540 |
msgstr ""
|
541 |
|
542 |
#: admin/includes/cta/writeable.php:2
|
1002 |
"\"_blank\">View documentation</a>"
|
1003 |
msgstr ""
|
1004 |
|
1005 |
+
#: admin/shortcode-builder/components/paging.php:3 admin/views/settings.php:38
|
1006 |
#: core/functions.php:145
|
1007 |
msgid "Paging"
|
1008 |
msgstr ""
|
1053 |
msgstr ""
|
1054 |
|
1055 |
#: admin/shortcode-builder/components/previous-post.php:3
|
1056 |
+
#: admin/views/settings.php:40 core/functions.php:173
|
1057 |
msgid "Previous Post"
|
1058 |
msgstr ""
|
1059 |
|
1116 |
msgstr ""
|
1117 |
|
1118 |
#: admin/shortcode-builder/components/rest-api.php:18
|
1119 |
+
#: admin/views/settings.php:42
|
1120 |
msgid "REST API"
|
1121 |
msgstr ""
|
1122 |
|
2062 |
msgid "The library of editable templates for use within your theme"
|
2063 |
msgstr ""
|
2064 |
|
2065 |
+
#: admin/views/repeater-templates.php:26 admin/views/settings.php:46
|
2066 |
#: core/functions.php:201
|
2067 |
msgid "Theme Repeaters"
|
2068 |
msgstr ""
|
2135 |
msgid "A powerful plugin to add infinite scroll functionality to your website."
|
2136 |
msgstr ""
|
2137 |
|
2138 |
+
#: admin/views/settings.php:24 admin/views/settings.php:27
|
|
|
|
|
|
|
|
|
2139 |
msgid "Jump to Setting"
|
2140 |
msgstr ""
|
2141 |
|
2142 |
+
#: admin/views/settings.php:28
|
2143 |
msgid "Global Settings"
|
2144 |
msgstr ""
|
2145 |
|
2146 |
+
#: admin/views/settings.php:29
|
2147 |
msgid "Admin"
|
2148 |
msgstr ""
|
2149 |
|
2150 |
+
#: admin/views/settings.php:36 core/functions.php:117
|
2151 |
msgid "Layouts"
|
2152 |
msgstr ""
|
2153 |
|
2154 |
+
#: admin/views/settings.php:44
|
2155 |
msgid "SEO"
|
2156 |
msgstr ""
|
2157 |
|
2183 |
msgid "Copy Shortcode"
|
2184 |
msgstr ""
|
2185 |
|
2186 |
+
#: ajax-load-more.php:309
|
2187 |
msgid "Error creating repeater template directory"
|
2188 |
msgstr ""
|
2189 |
|
2190 |
+
#: core/classes/class.alm-noscript.php:177
|
2191 |
+
msgid "Pages: "
|
2192 |
+
msgstr ""
|
2193 |
+
|
2194 |
#: core/functions.php:16
|
2195 |
msgid "Ajax Load More Pro"
|
2196 |
msgstr ""
|
2334 |
"WP_User_Query."
|
2335 |
msgstr ""
|
2336 |
|
|
|
|
|
|
|
|
|
2337 |
#: vendor/EDD_SL_Plugin_Updater.php:210
|
2338 |
#, php-format
|
2339 |
msgid ""
|