WordPress Infinite Scroll – Ajax Load More - Version 3.2.1

Version Description

  • October 5, 2017 =

  • NEW - Added new filter to optionally remove the trailing slash in URL of the SEO add-on. add_filter('alm_seo_remove_trailing_slash', '__return_true');

  • NEW - Added new transition_container_classes parameter that allows for custom classes to be added to the .alm-reveal container div.

  • NEW - Added new almDestroyed callback function that is dispatched after destroy_after has been triggered. ADD-ONS

  • NEW - Added horizontalOrder support for built in Masonry. The masonry_horizontalorder shortcode param will lay out items to maintain horizontal left-to-right order.

  • FIX - Fix for font icons not showing in shortcode builder.

  • FIX - Fix for issue with cache being created by logged in users even if 'Don't cache files for logged in users' is selected in the ALM settings.

  • UPDATE - Removed Nonce security option from ALM Settings.

  • UPDATE - Code cleanup, updating HTML markup in some areas.

  • UPDATE - Various UI/UX enhancements

Download this release

Release Info

Developer dcooney
Plugin Icon 128x128 WordPress Infinite Scroll – Ajax Load More
Version 3.2.1
Comparing to
See all releases

Code changes from version 3.2 to 3.2.1

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney, connekthq
3
  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, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
- Tested up to: 4.8.1
7
- Stable tag: 3.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,8 +107,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
107
  * **transition** - Choose a posts reveal transition (slide/fade/masonry/none). Default = 'slide'
108
  * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
109
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
 
110
  * **masonry_selector** - The target classname of each masonry item. Default = null
111
  * **masonry_animation** - Select a loading transition type for Masonry items. (default/zoom-out/slide-up/slide-down/none). Default = default
 
112
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
113
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
114
  * **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
@@ -200,7 +202,14 @@ The following [functions](https://connekthq.com/plugins/ajax-load-more/docs/call
200
  };
201
 
202
 
203
- **Done** - The almDone() function is triggered after all posts have been loaded..
 
 
 
 
 
 
 
204
 
205
  $.fn.almDone = function(alm){
206
  console.log('All posts have been loaded!');
@@ -356,6 +365,20 @@ How to install Ajax Load More.
356
 
357
  == Changelog ==
358
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  = 3.2.0 - August 8, 2017 =
360
 
361
  * NEW - Added new `masonry_animation` setting to allow for adjusting of Masonry transitions (Default, zoom-out, slide-up, slide-down, none).
3
  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, ajax load posts, woocommerce, ajax load more
5
  Requires at least: 3.6
6
+ Tested up to: 4.8.2
7
+ Stable tag: 3.2.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
  * **transition** - Choose a posts reveal transition (slide/fade/masonry/none). Default = 'slide'
108
  * **transition_speed** - The speed of the loading transition in milliseconds. (slide/fade/none). Default = '250'
109
  * **transition_container** - Display the Ajax Load More (.alm-reveal) loading container. Default = 'true'
110
+ * **transition_container_classes** - Add classes to the `.alm-reveal` transition div.
111
  * **masonry_selector** - The target classname of each masonry item. Default = null
112
  * **masonry_animation** - Select a loading transition type for Masonry items. (default/zoom-out/slide-up/slide-down/none). Default = default
113
+ * **masonry_horizontalorder** - Maintain horizontal order. Default = true
114
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
115
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
116
  * **progress_bar** - Display progress bar indicator at the top of the window while loading Ajax content. Default = 'false'
202
  };
203
 
204
 
205
+ **Destroyed** - The almDestroyed() function is dispatched after the destroy_after shortcode parameter is triggered.
206
+
207
+ $.fn.almDestroyed = function(alm){
208
+ console.log('"Ajax Load More functionality has been destroyed!');
209
+ };
210
+
211
+
212
+ **Done** - The almDone() function is triggered after all posts have been loaded.
213
 
214
  $.fn.almDone = function(alm){
215
  console.log('All posts have been loaded!');
365
 
366
  == Changelog ==
367
 
368
+ = 3.2.1 - October 5, 2017 =
369
+
370
+ * NEW - Added new filter to optionally remove the trailing slash in URL of the SEO add-on. `add_filter('alm_seo_remove_trailing_slash', '__return_true');`
371
+ * NEW - Added new `transition_container_classes` parameter that allows for custom classes to be added to the `.alm-reveal` container div.
372
+ * NEW - Added new `almDestroyed` callback function that is dispatched after destroy_after has been triggered.
373
+ ADD-ONS
374
+ * NEW - Added `horizontalOrder` support for built in Masonry. The `masonry_horizontalorder` shortcode param will lay out items to maintain horizontal left-to-right order.
375
+ * FIX - Fix for font icons not showing in shortcode builder.
376
+ * FIX - Fix for issue with cache being created by logged in users even if 'Don't cache files for logged in users' is selected in the ALM settings.
377
+ * UPDATE - Removed Nonce security option from ALM Settings.
378
+ * UPDATE - Code cleanup, updating HTML markup in some areas.
379
+ * UPDATE - Various UI/UX enhancements
380
+
381
+
382
  = 3.2.0 - August 8, 2017 =
383
 
384
  * NEW - Added new `masonry_animation` setting to allow for adjusting of Masonry transitions (Default, zoom-out, slide-up, slide-down, none).
admin/admin.php CHANGED
@@ -969,7 +969,9 @@ function alm_admin_init(){
969
  'ajax-load-more',
970
  'alm_general_settings'
971
  );
972
-
 
 
973
  add_settings_field( // Nonce security
974
  '_alm_nonce_security',
975
  __('Ajax Security', 'ajax-load-more' ),
@@ -977,6 +979,7 @@ function alm_admin_init(){
977
  'ajax-load-more',
978
  'alm_general_settings'
979
  );
 
980
 
981
  add_settings_field( // Scroll to top on load
982
  '_alm_scroll_top',
@@ -1181,7 +1184,7 @@ function alm_disable_dynamic_callback(){
1181
 
1182
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
1183
  $html .= '<input type="checkbox" name="alm_settings[_alm_disable_dynamic]" id="_alm_disable_dynamic" value="1"'. (($options['_alm_disable_dynamic']) ? ' checked="checked"' : '') .' />';
1184
- $html .= '<label for="_alm_disable_dynamic">'.__('Disable dynamic population of categories, tags and authors in the Shortcode Builder.<span style="display:block">Recommended if you have an extraordinary number of categories, tags and/or authors.', 'ajax-load-more').'</label>';
1185
 
1186
  echo $html;
1187
  }
@@ -1224,7 +1227,7 @@ function alm_container_type_callback() {
1224
  function alm_class_callback(){
1225
  $options = get_option( 'alm_settings' );
1226
 
1227
- $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - classes are applied globally and will appear with every instance of Ajax Load More. <span style="display:block">You can also add classes when building a shortcode.</span>', 'ajax-load-more').'</label><br/>';
1228
  $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
1229
 
1230
  echo $html;
969
  'ajax-load-more',
970
  'alm_general_settings'
971
  );
972
+
973
+ /*
974
+ Removed in 3.2.1
975
  add_settings_field( // Nonce security
976
  '_alm_nonce_security',
977
  __('Ajax Security', 'ajax-load-more' ),
979
  'ajax-load-more',
980
  'alm_general_settings'
981
  );
982
+ */
983
 
984
  add_settings_field( // Scroll to top on load
985
  '_alm_scroll_top',
1184
 
1185
  $html = '<input type="hidden" name="alm_settings[_alm_disable_dynamic]" value="0" />';
1186
  $html .= '<input type="checkbox" name="alm_settings[_alm_disable_dynamic]" id="_alm_disable_dynamic" value="1"'. (($options['_alm_disable_dynamic']) ? ' checked="checked"' : '') .' />';
1187
+ $html .= '<label for="_alm_disable_dynamic">'.__('Disable dynamic population of categories, tags and authors in the Shortcode Builder.<span style="display:block">Recommended if you have a large number of categories, tags and/or authors.', 'ajax-load-more').'</label>';
1188
 
1189
  echo $html;
1190
  }
1227
  function alm_class_callback(){
1228
  $options = get_option( 'alm_settings' );
1229
 
1230
+ $html = '<label for="alm_settings[_alm_classname]">'.__('Add custom classes to the <i>.alm-listing</i> container - classes are applied globally and will appear with every instance of Ajax Load More. <span style="display:block">You can also add classes when building a shortcode.</span>', 'ajax-load-more').'</label><br/>';
1231
  $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
1232
 
1233
  echo $html;
admin/dist/css/admin.css CHANGED
@@ -889,7 +889,7 @@ a.layout-hover:hover img {
889
  .ajax-load-more .toggle-all.closed .inner-wrap:before {
890
  content: '\f067'; }
891
 
892
- #alm-builder{
893
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; }
894
 
895
  .ajax-load-more ul {
@@ -1216,6 +1216,8 @@ a.layout-hover:hover img {
1216
  box-shadow: none !important; }
1217
 
1218
  .ajax-load-more input[type=text]:focus,
 
 
1219
  .ajax-load-more textarea:focus {
1220
  border-color: #999;
1221
  -webkit-box-shadow: 0 0 3px #ccc;
@@ -1330,6 +1332,10 @@ a.layout-hover:hover img {
1330
  border-top: 1px solid rgba(0, 0, 0, 0.1);
1331
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
1332
 
 
 
 
 
1333
  .ajax-load-more .section-title {
1334
  float: left;
1335
  padding: 20px 0 20px 36px;
@@ -1340,7 +1346,7 @@ a.layout-hover:hover img {
1340
  float: none; }
1341
 
1342
  .ajax-load-more .section-title h4 {
1343
- font-size: 15px;
1344
  margin-bottom: 13px; }
1345
 
1346
  .ajax-load-more .section-title p,
@@ -1928,7 +1934,7 @@ table.highlight {
1928
 
1929
  /* Repeaters */
1930
  .repeaters .repeater-wrap {
1931
- padding: 12px 15px 8px !important; }
1932
 
1933
  .repeater-wrap label {
1934
  cursor: default; }
889
  .ajax-load-more .toggle-all.closed .inner-wrap:before {
890
  content: '\f067'; }
891
 
892
+ #alm-builder {
893
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; }
894
 
895
  .ajax-load-more ul {
1216
  box-shadow: none !important; }
1217
 
1218
  .ajax-load-more input[type=text]:focus,
1219
+ .ajax-load-more input[type=number]:focus,
1220
+ .ajax-load-more input[type=email]:focus,
1221
  .ajax-load-more textarea:focus {
1222
  border-color: #999;
1223
  -webkit-box-shadow: 0 0 3px #ccc;
1332
  border-top: 1px solid rgba(0, 0, 0, 0.1);
1333
  border-bottom: 1px solid rgba(255, 255, 255, 0.3); }
1334
 
1335
+ hr.indented {
1336
+ width: calc(100% - 72px);
1337
+ margin-left: 36px; }
1338
+
1339
  .ajax-load-more .section-title {
1340
  float: left;
1341
  padding: 20px 0 20px 36px;
1346
  float: none; }
1347
 
1348
  .ajax-load-more .section-title h4 {
1349
+ font-size: 16px;
1350
  margin-bottom: 13px; }
1351
 
1352
  .ajax-load-more .section-title p,
1934
 
1935
  /* Repeaters */
1936
  .repeaters .repeater-wrap {
1937
+ padding: 12px 15px 10px !important; }
1938
 
1939
  .repeater-wrap label {
1940
  cursor: default; }
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -358,8 +358,10 @@ jQuery(document).ready(function($) {
358
  var paging_classes = $('#alm-paging input#paging-classes').val();
359
  if(paging !== 'false' && paging != undefined){
360
  output += ' paging="'+paging+'"';
361
- output += ' paging_controls="'+paging_controls+'"';
362
- output += ' paging_show_at_most="'+paging_show_at_most+'"';
 
 
363
  if(paging_classes !== ''){
364
  output += ' paging_classes="'+paging_classes+'"';
365
  }
@@ -939,12 +941,16 @@ jQuery(document).ready(function($) {
939
  $('.masonry-options-hide').slideUp(150, 'alm_easeInOutQuad');
940
  var masonry_selector = $('.transition input#masonry-item').val();
941
  var masonry_animation = $('input[name=masonry-animation]:checked').val();
 
942
  if(masonry_selector !== ''){
943
  output += ' masonry_selector="'+ masonry_selector +'"';
944
  }
945
  if(masonry_animation !== '' && masonry_animation !== 'default'){
946
  output += ' masonry_animation="'+ masonry_animation +'"';
947
  }
 
 
 
948
 
949
  }else{
950
 
@@ -953,8 +959,18 @@ jQuery(document).ready(function($) {
953
 
954
  // Hide transition_container if masonry is selected
955
  var transition_container = $('.transition input[name=remove_container]:checked').val();
956
- if(transition_container === 'f' && seo !== 'true' && previous !== 'true')
 
957
  output += ' transition_container="false"';
 
 
 
 
 
 
 
 
 
958
 
959
  }
960
  // Speed
358
  var paging_classes = $('#alm-paging input#paging-classes').val();
359
  if(paging !== 'false' && paging != undefined){
360
  output += ' paging="'+paging+'"';
361
+ output += ' paging_controls="'+paging_controls+'"';
362
+ if(paging_show_at_most !== ''){
363
+ output += ' paging_show_at_most="'+paging_show_at_most+'"';
364
+ }
365
  if(paging_classes !== ''){
366
  output += ' paging_classes="'+paging_classes+'"';
367
  }
941
  $('.masonry-options-hide').slideUp(150, 'alm_easeInOutQuad');
942
  var masonry_selector = $('.transition input#masonry-item').val();
943
  var masonry_animation = $('input[name=masonry-animation]:checked').val();
944
+ var masonry_horizontalorder = $('input[name=masonry-horizontalorder]:checked').val();
945
  if(masonry_selector !== ''){
946
  output += ' masonry_selector="'+ masonry_selector +'"';
947
  }
948
  if(masonry_animation !== '' && masonry_animation !== 'default'){
949
  output += ' masonry_animation="'+ masonry_animation +'"';
950
  }
951
+ if(masonry_horizontalorder !== 't'){
952
+ output += ' masonry_horizontalorder="false"';
953
+ }
954
 
955
  }else{
956
 
959
 
960
  // Hide transition_container if masonry is selected
961
  var transition_container = $('.transition input[name=remove_container]:checked').val();
962
+ var transition_container_classes = $('.transition input#transition-container-classes').val();
963
+ if(transition_container === 'f' && seo !== 'true' && previous !== 'true'){
964
  output += ' transition_container="false"';
965
+ $('.transition-container-classes-wrap').slideUp(150, 'alm_easeInOutQuad');
966
+ }else{
967
+ $('.transition-container-classes-wrap').slideDown(150, 'alm_easeInOutQuad');
968
+ }
969
+
970
+ // Hide transition_container_classes if Previous Post or Next Page is true.
971
+ if(transition_container_classes !== '' && transition_container !== 'f' && previous !== 'true' && nextpage !== 'true'){
972
+ output += ' transition_container_classes="'+ transition_container_classes +'"';
973
+ }
974
 
975
  }
976
  // Speed
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -7,9 +7,9 @@
7
 
8
  <?php
9
  $alm_options = get_option( 'alm_settings' );
10
- if(!isset($alm_options['_alm_disable_dynamic'])) // Check if '_alm_disable_dynamic is set within settings
11
  $alm_options['_alm_disable_dynamic'] = '0';
12
-
13
  $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
14
  ?>
15
 
@@ -49,7 +49,7 @@
49
  <div class="clear"></div>
50
  <hr>
51
  <div class="section-title">
52
- <h4><?php _e('Post ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave this field blank and Ajax Load More will get the ID from the global $post object','ajax-load-more'); ?>"></a></h4>
53
  <p><?php _e('The ID of the current page/post.', 'ajax-load-more'); ?></p>
54
  </div>
55
  <div class="wrap">
@@ -453,7 +453,7 @@
453
  <div class="section-title">
454
  <h4>
455
  <?php _e('Google Analytics', 'ajax-load-more'); ?>
456
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You must have a reference to your Google Analytics tracking code already on the page','ajax-load-more'); ?>"></a>
457
  </h4>
458
  <p><?php _e('Each time a page is loaded it will count as a pageview', 'ajax-load-more'); ?>.</p>
459
  </div>
@@ -474,7 +474,7 @@
474
  <div class="section-title">
475
  <h4>
476
  <?php _e('Scroll to Page', 'ajax-load-more'); ?>
477
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set Scroll Speed to 0 to disable scrolling to page','ajax-load-more'); ?>"></a>
478
  </h4>
479
  <p>
480
  <?php _e('Scroll users automatically to the next page on \'Load More\' button click', 'ajax-load-more'); ?>.
@@ -484,14 +484,14 @@
484
  <div class="inner half">
485
  <label for="next-page-scroll-speed" class="full">
486
  <?php _e('Scroll Speed', 'ajax-load-more'); ?>
487
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>"></a>
488
  </label>
489
  <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
490
  </div>
491
  <div class="inner half">
492
  <label for="next-page-scroll-top" class="full">
493
  <?php _e('Scroll Top', 'ajax-load-more'); ?>
494
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The scrolltop position of the window (used with scrolling and fwd/back browser buttons)','ajax-load-more'); ?>"></a>
495
  </label>
496
  <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
497
  </div>
@@ -664,7 +664,7 @@
664
  <div class="clear"></div>
665
  <hr>
666
  <div class="section-title">
667
- <h4><?php _e('Taxonomy', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Selecting a taxonomy means only previous posts from the same taxonomy term will be returned. If a post has multiple terms attached, each term will be considered using an OR relationship query','ajax-load-more'); ?>"></a></h4>
668
  <p><?php _e('Query previous posts from the same taxonomy term(s).', 'ajax-load-more'); ?></p>
669
  </div>
670
  <div class="wrap">
@@ -697,7 +697,7 @@
697
  <div class="clear"></div>
698
  <hr>
699
  <div class="section-title">
700
- <h4><?php _e('Excluded Terms ', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A comma-separated list of excluded terms by ID','ajax-load-more'); ?>"></a></h4>
701
  <p><?php _e('Exclude posts by term ID from the previous post query.', 'ajax-load-more'); ?></p>
702
  </div>
703
  <div class="wrap">
@@ -761,7 +761,7 @@
761
 
762
  <div class="section-title">
763
  <h4><?php _e('Base URL', 'ajax-load-more'); ?>
764
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Base URL in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
765
  <p><?php _e('Enter the base URL to your installation of the REST API.', 'ajax-load-more'); ?></p>
766
  </div>
767
  <div class="wrap">
@@ -775,7 +775,7 @@
775
 
776
  <div class="section-title">
777
  <h4><?php _e('Namespace', 'ajax-load-more'); ?>
778
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Namespace in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
779
  <p><?php _e('Enter the custom namespace for this Ajax Load More query.', 'ajax-load-more'); ?></p>
780
  </div>
781
  <div class="wrap">
@@ -789,7 +789,7 @@
789
 
790
  <div class="section-title">
791
  <h4><?php _e('Endpoint', 'ajax-load-more'); ?>
792
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Endpoint in the Ajax Load More settings panel','ajax-load-more'); ?>"></a></h4>
793
  <p><?php _e('Enter your custom endpoint for this Ajax Load More query.', 'ajax-load-more'); ?></p>
794
  </div>
795
  <div class="wrap">
@@ -928,7 +928,7 @@
928
 
929
  <!-- ID -->
930
  <div class="section-title">
931
- <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter.','ajax-load-more'); ?>"></a></h4>
932
  <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?><br/>
933
  &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args_[id]" target="_blank">Learn More</a></p>
934
  </div>
@@ -945,7 +945,7 @@
945
 
946
  <!-- Container Type -->
947
  <div class="section-title">
948
- <h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
949
  <p><?php _e('Override the global Container Type set on the <a href="admin.php?page=ajax-load-more">ALM Settings page</a>.', 'ajax-load-more'); ?></p>
950
  </div>
951
  <div class="wrap">
@@ -976,12 +976,12 @@
976
 
977
  <!-- Container Classes -->
978
  <div class="section-title">
979
- <h4><?php _e('Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define global container classes on the Ajax Load More settings screen','ajax-load-more'); ?>"></a></h4>
980
- <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', 'ajax-load-more'); ?></p>
981
  </div>
982
  <div class="wrap">
983
  <div class="inner">
984
- <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
985
  </div>
986
  </div>
987
  </div>
@@ -1008,7 +1008,7 @@
1008
  <hr/>
1009
 
1010
  <div class="section-title">
1011
- <h4><?php _e('Loading Label', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave field empty to not update text while loading content','ajax-load-more'); ?>"></a></h4>
1012
  <p><?php _e('Update the text of the <em>Load More</em> button while content is loading.', 'ajax-load-more'); ?></p>
1013
  </div>
1014
  <div class="wrap">
@@ -1048,7 +1048,7 @@
1048
  <div class="clear"></div>
1049
  <hr>
1050
  <div class="section-title">
1051
- <h4><?php _e('Scroll Distance', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Distance is based on the position of the loading button from the bottom of the screen','ajax-load-more'); ?>"></a></h4>
1052
  <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 150)', 'ajax-load-more'); ?></p>
1053
  </div>
1054
  <div class="wrap">
@@ -1061,7 +1061,7 @@
1061
  <div class="clear"></div>
1062
  <hr>
1063
  <div class="section-title">
1064
- <h4><?php _e('Scroll Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Confine Ajax Load More scrolling to a parent container.','ajax-load-more'); ?>"></a></h4>
1065
  <p><?php _e('Enter the ID or classname of the parent container', 'ajax-load-more'); ?></p>
1066
  </div>
1067
  <div class="wrap">
@@ -1074,7 +1074,7 @@
1074
  <div class="clear"></div>
1075
  <hr>
1076
  <div class="section-title">
1077
- <h4><?php _e('Maximum Pages', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('If using an Infinite Scroll button style you should set this to 0','ajax-load-more'); ?>"></a></h4>
1078
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', 'ajax-load-more'); ?></p>
1079
  </div>
1080
  <div class="wrap">
@@ -1132,9 +1132,14 @@
1132
 
1133
  <div class="clear"></div>
1134
  <hr>
 
 
 
 
 
1135
 
1136
  <div class="section-title">
1137
- <h4><?php _e('Masonry Item Selector', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Item Selector is required for Masonry to target each element loaded with Ajax','ajax-load-more'); ?>"></a></h4>
1138
  <p><?php _e('Enter the target classname of each masonry item', 'ajax-load-more'); ?>.<br/>
1139
  e.g <span>.grid-item</span>
1140
  </p>
@@ -1144,43 +1149,43 @@
1144
  <input type="text" class="alm_element" name="masonry-item" id="masonry-item" placeholder=".grid-item">
1145
  </div>
1146
  </div>
 
1147
  <div class="clear"></div>
1148
- <hr>
1149
 
1150
  <div class="section-title">
1151
- <h4><?php _e('Masonry Animation', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('All Masonry animations include a fade-in effect as items are loaded','ajax-load-more'); ?>"></a></h4>
1152
- <p><?php _e('Select a loading transition for Masonry items', 'ajax-load-more'); ?>.
1153
- </p>
1154
- </div>
1155
- <div class="wrap">
1156
  <div class="inner">
1157
  <ul>
1158
  <li style="width:100%;">
1159
  <input class="alm_element" type="radio" name="masonry-animation" value="default" id="masonry-animation-default" checked>
1160
  <label for="masonry-animation-default">
1161
  <?php _e('Default (Zoom)', 'ajax-load-more'); ?>
1162
- <span class="description"><?php _e('Items will scale up from 50% to 100% size on load','ajax-load-more'); ?>.</span>
1163
  </label>
1164
  </li>
1165
  <li style="width:100%;">
1166
  <input class="alm_element" type="radio" name="masonry-animation" value="zoom-out" id="masonry-animation-zoom-out">
1167
  <label for="masonry-animation-zoom-out">
1168
- <?php _e('Zoom Out', 'ajax-load-more'); ?>
1169
- <span class="description"><?php _e('The reverse of the Default animation - Items will scale down from 125% to 100% size on load','ajax-load-more'); ?>.</span>
1170
  </label>
1171
  </li>
1172
  <li style="width:100%;">
1173
  <input class="alm_element" type="radio" name="masonry-animation" value="slide-up" id="masonry-animation-up">
1174
  <label for="masonry-animation-up">
1175
  <?php _e('Slide Up', 'ajax-load-more'); ?>
1176
- <span class="description"><?php _e('Items will animate up as they are loaded into view.','ajax-load-more'); ?></span>
1177
  </label>
1178
  </li>
1179
  <li style="width:100%;">
1180
  <input class="alm_element" type="radio" name="masonry-animation" value="slide-down" id="masonry-animation-down">
1181
  <label for="masonry-animation-down">
1182
  <?php _e('Slide Down', 'ajax-load-more'); ?>
1183
- <span class="description"><?php _e('Items will animate down as they are loaded into view.','ajax-load-more'); ?></span>
1184
  </label>
1185
  </li>
1186
  <li style="width:100%;">
@@ -1192,6 +1197,29 @@
1192
  </ul>
1193
  </div>
1194
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1195
 
1196
  </div>
1197
 
@@ -1202,7 +1230,7 @@
1202
  <hr>
1203
 
1204
  <div class="section-title">
1205
- <h4><?php _e('Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Removing the transition container may have undesired results and is not recommended.','ajax-load-more'); ?>"></a></h4>
1206
  <p><?php _e('Remove the <span>.alm-reveal</span> loading container from Ajax Load More', 'ajax-load-more'); ?>.</p>
1207
  </div>
1208
  <div class="wrap">
@@ -1215,6 +1243,22 @@
1215
  </ul>
1216
  </div>
1217
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1218
  </div>
1219
  <!-- End Hide transition_container if Masonry is selected -->
1220
 
@@ -1222,7 +1266,7 @@
1222
  <hr>
1223
 
1224
  <div class="section-title">
1225
- <h4><?php _e('Speed', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('0.5 seconds = 500, 1 second = 1000 etc.','ajax-load-more'); ?>"></a></h4>
1226
  <p><?php _e('The speed of the loading transition in milliseconds', 'ajax-load-more'); ?>.<br/></p>
1227
  </div>
1228
  <div class="wrap">
@@ -1250,7 +1294,7 @@
1250
  <label for="pause_t"><?php _e('True', 'ajax-load-more'); ?></label>
1251
  </li>
1252
  <li>
1253
- <input class="alm_element" type="radio" name="pause" value="f" id="pause_f" checked>
1254
  <label for="pause_f"><?php _e('False', 'ajax-load-more'); ?></label>
1255
  </li>
1256
  </ul>
@@ -1316,7 +1360,7 @@
1316
  <h3 class="heading"><?php _e('Images Loaded', 'ajax-load-more'); ?></h3>
1317
  <div class="expand-wrap">
1318
  <div class="section-title">
1319
- <p><?php _e('Wait for all images to load before displaying ajax loaded content', 'ajax-load-more'); ?>. <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Background images are not supported','ajax-load-more'); ?>"></a></p>
1320
  </div>
1321
  <div class="wrap">
1322
  <div class="inner">
@@ -1343,7 +1387,7 @@
1343
  <!-- Destroy After -->
1344
  <div class="expand-wrap">
1345
  <div class="section-title">
1346
- <p><?php _e('Remove Ajax Load More functionality after \'<em>n</em>\' number of pages have been loaded.', 'ajax-load-more'); ?></p>
1347
  </div>
1348
  <div class="wrap">
1349
  <div class="inner">
@@ -1420,7 +1464,7 @@
1420
  <hr/>
1421
 
1422
  <div class="section-title">
1423
- <h4><?php _e('Sticky Posts', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Sticky posts are only available for Posts.','ajax-load-more'); ?>"></a></h4>
1424
  <p><?php _e('Preserve the ordering of sticky posts by having them appear first in the Ajax listing.', 'ajax-load-more'); ?></p>
1425
  </div>
1426
  <div class="wrap">
@@ -1484,7 +1528,7 @@
1484
  <div class="section-title">
1485
  <h4>Include</h4>
1486
  <p><?php _e('A comma separated list of categories to include by slug. (design, research etc...)', 'ajax-load-more'); ?><br/>
1487
- &raquo; <a href="admin.php?page=ajax-load-more-examples#example-category"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1488
  </div>
1489
  <div class="wrap">
1490
  <div class="inner">
@@ -1543,7 +1587,7 @@
1543
  <div class="expand-wrap">
1544
  <div class="section-title">
1545
  <h4><?php _e('Include', 'ajax-load-more'); ?></h4>
1546
- <p><?php _e('A comma separated list of tags to include by slug. (toronto, canada etc...)', 'ajax-load-more'); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-tag"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1547
  </div>
1548
  <div class="wrap">
1549
  <div class="inner">
@@ -1619,7 +1663,7 @@
1619
  <h3 class="heading"><?php _e('Date', 'ajax-load-more'); ?></h3>
1620
  <div class="expand-wrap">
1621
  <div class="section-title">
1622
- <p><?php _e('Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-date">View Example</a>', 'ajax-load-more'); ?></p>
1623
  </div>
1624
  <div class="wrap">
1625
  <div class="inner">
@@ -1658,7 +1702,7 @@
1658
  <div id="meta-query-relation">
1659
  <div class="inner border-top highlighted">
1660
  <div class="wrap-30 wrap-50">
1661
- <label for="meta-relation" class="full"><?php _e('Relation:', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The logical relationship between each custom field when there is more than one.','ajax-load-more'); ?>"></a></label>
1662
  <select class="alm_element meta-relation" name="meta-relation">
1663
  <option value="AND" selected="selected">AND</option>
1664
  <option value="OR">OR</option>
@@ -1691,7 +1735,7 @@
1691
  echo '<h3 class="heading">' . __('Author', 'ajax-load-more') . '</h3>';
1692
  echo '<div class="expand-wrap">';
1693
  echo '<div class="section-title">';
1694
- echo '<p>' . __('Select an Author to query(by ID).', 'ajax-load-more') . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-author">View Example</a></p>';
1695
  echo '</div>';
1696
  echo '<div class="wrap"><div class="inner">';
1697
  if(!$disable_dynamic_content){
@@ -1743,7 +1787,7 @@
1743
  <hr/>
1744
  <div class="section-title">
1745
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1746
- <p><?php _e('A comma separated list of post ID\'s to exclude from query.', 'ajax-load-more'); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-exclude"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1747
  </div>
1748
  <div class="wrap">
1749
  <div class="inner">
@@ -1753,7 +1797,7 @@
1753
  <div class="clear"></div>
1754
  <hr/>
1755
  <div class="section-title">
1756
- <h4><?php _e('Post Status', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Post Status parameters are only available for logged in (admin) users. Non logged in users will only have access to view content in a \'publish\' or \'inherit\' state. ','ajax-load-more'); ?>"></a></h4>
1757
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1758
  </div>
1759
  <div class="wrap">
@@ -1830,7 +1874,7 @@
1830
  <h3 class="heading"><?php _e('Custom Arguments', 'ajax-load-more'); ?></h3>
1831
  <div class="expand-wrap">
1832
  <div class="section-title">
1833
- <p><?php _e('A semicolon separated list of custom value:pair arguments.', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Custom Arguments can be used to query by parameters not available in the Shortcode Builder.','ajax-load-more'); ?>"></a><br/><br/>e.g. tag_slug__and:design,development; event_display:upcoming</p>
1834
  </div>
1835
  <div class="wrap">
1836
  <div class="inner">
7
 
8
  <?php
9
  $alm_options = get_option( 'alm_settings' );
10
+ if(!isset($alm_options['_alm_disable_dynamic'])){ // Check if '_alm_disable_dynamic is set within settings
11
  $alm_options['_alm_disable_dynamic'] = '0';
12
+ }
13
  $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
14
  ?>
15
 
49
  <div class="clear"></div>
50
  <hr>
51
  <div class="section-title">
52
+ <h4><?php _e('Post ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave this field blank and Ajax Load More will get the ID from the global $post object','ajax-load-more'); ?>."></a></h4>
53
  <p><?php _e('The ID of the current page/post.', 'ajax-load-more'); ?></p>
54
  </div>
55
  <div class="wrap">
453
  <div class="section-title">
454
  <h4>
455
  <?php _e('Google Analytics', 'ajax-load-more'); ?>
456
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You must have a reference to your Google Analytics tracking code already on the page','ajax-load-more'); ?>."></a>
457
  </h4>
458
  <p><?php _e('Each time a page is loaded it will count as a pageview', 'ajax-load-more'); ?>.</p>
459
  </div>
474
  <div class="section-title">
475
  <h4>
476
  <?php _e('Scroll to Page', 'ajax-load-more'); ?>
477
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set Scroll Speed to 0 to disable scrolling to page','ajax-load-more'); ?>."></a>
478
  </h4>
479
  <p>
480
  <?php _e('Scroll users automatically to the next page on \'Load More\' button click', 'ajax-load-more'); ?>.
484
  <div class="inner half">
485
  <label for="next-page-scroll-speed" class="full">
486
  <?php _e('Scroll Speed', 'ajax-load-more'); ?>
487
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>."></a>
488
  </label>
489
  <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
490
  </div>
491
  <div class="inner half">
492
  <label for="next-page-scroll-top" class="full">
493
  <?php _e('Scroll Top', 'ajax-load-more'); ?>
494
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The scrolltop position of the window (used with scrolling and fwd/back browser buttons)','ajax-load-more'); ?>."></a>
495
  </label>
496
  <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
497
  </div>
664
  <div class="clear"></div>
665
  <hr>
666
  <div class="section-title">
667
+ <h4><?php _e('Taxonomy', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Selecting a taxonomy means only previous posts from the same taxonomy term will be returned. If a post has multiple terms attached, each term will be considered using an OR relationship query','ajax-load-more'); ?>."></a></h4>
668
  <p><?php _e('Query previous posts from the same taxonomy term(s).', 'ajax-load-more'); ?></p>
669
  </div>
670
  <div class="wrap">
697
  <div class="clear"></div>
698
  <hr>
699
  <div class="section-title">
700
+ <h4><?php _e('Excluded Terms ', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A comma-separated list of excluded terms by ID','ajax-load-more'); ?>."></a></h4>
701
  <p><?php _e('Exclude posts by term ID from the previous post query.', 'ajax-load-more'); ?></p>
702
  </div>
703
  <div class="wrap">
761
 
762
  <div class="section-title">
763
  <h4><?php _e('Base URL', 'ajax-load-more'); ?>
764
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Base URL in the Ajax Load More settings panel','ajax-load-more'); ?>."></a></h4>
765
  <p><?php _e('Enter the base URL to your installation of the REST API.', 'ajax-load-more'); ?></p>
766
  </div>
767
  <div class="wrap">
775
 
776
  <div class="section-title">
777
  <h4><?php _e('Namespace', 'ajax-load-more'); ?>
778
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Namespace in the Ajax Load More settings panel','ajax-load-more'); ?>."></a></h4>
779
  <p><?php _e('Enter the custom namespace for this Ajax Load More query.', 'ajax-load-more'); ?></p>
780
  </div>
781
  <div class="wrap">
789
 
790
  <div class="section-title">
791
  <h4><?php _e('Endpoint', 'ajax-load-more'); ?>
792
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set a default Endpoint in the Ajax Load More settings panel','ajax-load-more'); ?>."></a></h4>
793
  <p><?php _e('Enter your custom endpoint for this Ajax Load More query.', 'ajax-load-more'); ?></p>
794
  </div>
795
  <div class="wrap">
928
 
929
  <!-- ID -->
930
  <div class="section-title">
931
+ <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter','ajax-load-more'); ?>."></a></h4>
932
  <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?><br/>
933
  &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args_[id]" target="_blank">Learn More</a></p>
934
  </div>
945
 
946
  <!-- Container Type -->
947
  <div class="section-title">
948
+ <h4><?php _e('Container Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define a global container type on the Ajax Load More settings screen','ajax-load-more'); ?>."></a></h4>
949
  <p><?php _e('Override the global Container Type set on the <a href="admin.php?page=ajax-load-more">ALM Settings page</a>.', 'ajax-load-more'); ?></p>
950
  </div>
951
  <div class="wrap">
976
 
977
  <!-- Container Classes -->
978
  <div class="section-title">
979
+ <h4><?php _e('Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You can define global container classes on the Ajax Load More settings screen','ajax-load-more'); ?>."></a></h4>
980
+ <p><?php _e('Add custom CSS classes to the <span>.alm-listing</span> container. <br/><br/> e.g. portfolio-listing large-12 etc', 'ajax-load-more'); ?></p>
981
  </div>
982
  <div class="wrap">
983
  <div class="inner">
984
+ <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="listing large-12 columns">
985
  </div>
986
  </div>
987
  </div>
1008
  <hr/>
1009
 
1010
  <div class="section-title">
1011
+ <h4><?php _e('Loading Label', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Leave field empty to not update text while loading content','ajax-load-more'); ?>."></a></h4>
1012
  <p><?php _e('Update the text of the <em>Load More</em> button while content is loading.', 'ajax-load-more'); ?></p>
1013
  </div>
1014
  <div class="wrap">
1048
  <div class="clear"></div>
1049
  <hr>
1050
  <div class="section-title">
1051
+ <h4><?php _e('Scroll Distance', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Distance is based on the position of the loading button from the bottom of the screen','ajax-load-more'); ?>."></a></h4>
1052
  <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 150)', 'ajax-load-more'); ?></p>
1053
  </div>
1054
  <div class="wrap">
1061
  <div class="clear"></div>
1062
  <hr>
1063
  <div class="section-title">
1064
+ <h4><?php _e('Scroll Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Confine Ajax Load More scrolling to a parent container','ajax-load-more'); ?>."></a></h4>
1065
  <p><?php _e('Enter the ID or classname of the parent container', 'ajax-load-more'); ?></p>
1066
  </div>
1067
  <div class="wrap">
1074
  <div class="clear"></div>
1075
  <hr>
1076
  <div class="section-title">
1077
+ <h4><?php _e('Maximum Pages', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('If using an Infinite Scroll button style you should set this to 0','ajax-load-more'); ?>."></a></h4>
1078
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', 'ajax-load-more'); ?></p>
1079
  </div>
1080
  <div class="wrap">
1132
 
1133
  <div class="clear"></div>
1134
  <hr>
1135
+ <div class="section-title full" style="padding-bottom: 10px;">
1136
+ <h4><?php _e('Masonry Options', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Ajax Load More does not support all available Masonry options','ajax-load-more'); ?>."></a></h4>
1137
+ <p><?php _e('The following Masonry <a href="https://masonry.desandro.com/options.html" target="_blank">options</a> are supported by Ajax Load More', 'ajax-load-more'); ?>.</p>
1138
+ </div>
1139
+ <div class="clear"></div>
1140
 
1141
  <div class="section-title">
1142
+ <h4><?php _e('Item Selector', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Item Selector is required for Masonry to target each element loaded with Ajax','ajax-load-more'); ?>."></a></h4>
1143
  <p><?php _e('Enter the target classname of each masonry item', 'ajax-load-more'); ?>.<br/>
1144
  e.g <span>.grid-item</span>
1145
  </p>
1149
  <input type="text" class="alm_element" name="masonry-item" id="masonry-item" placeholder=".grid-item">
1150
  </div>
1151
  </div>
1152
+
1153
  <div class="clear"></div>
1154
+ <hr class="indented" />
1155
 
1156
  <div class="section-title">
1157
+ <h4><?php _e('Animation Type', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('All Masonry animations include a fade-in effect as items are loaded','ajax-load-more'); ?>."></a></h4>
1158
+ <p><?php _e('Select a loading transition for Masonry items', 'ajax-load-more'); ?>.</p>
1159
+ </div>
1160
+ <div class="wrap">
 
1161
  <div class="inner">
1162
  <ul>
1163
  <li style="width:100%;">
1164
  <input class="alm_element" type="radio" name="masonry-animation" value="default" id="masonry-animation-default" checked>
1165
  <label for="masonry-animation-default">
1166
  <?php _e('Default (Zoom)', 'ajax-load-more'); ?>
1167
+ <span class="description"><?php _e('Items scale up from 50% to 100% size on load','ajax-load-more'); ?>.</span>
1168
  </label>
1169
  </li>
1170
  <li style="width:100%;">
1171
  <input class="alm_element" type="radio" name="masonry-animation" value="zoom-out" id="masonry-animation-zoom-out">
1172
  <label for="masonry-animation-zoom-out">
1173
+ <?php _e('Zoom Out', 'ajax-load-more'); ?>
1174
+ <span class="description"><?php _e('Items scale down from 125% to 100% size on load','ajax-load-more'); ?>.</span>
1175
  </label>
1176
  </li>
1177
  <li style="width:100%;">
1178
  <input class="alm_element" type="radio" name="masonry-animation" value="slide-up" id="masonry-animation-up">
1179
  <label for="masonry-animation-up">
1180
  <?php _e('Slide Up', 'ajax-load-more'); ?>
1181
+ <span class="description"><?php _e('Items animate up as they are loaded into view.','ajax-load-more'); ?></span>
1182
  </label>
1183
  </li>
1184
  <li style="width:100%;">
1185
  <input class="alm_element" type="radio" name="masonry-animation" value="slide-down" id="masonry-animation-down">
1186
  <label for="masonry-animation-down">
1187
  <?php _e('Slide Down', 'ajax-load-more'); ?>
1188
+ <span class="description"><?php _e('Items animate down when loaded into view.','ajax-load-more'); ?></span>
1189
  </label>
1190
  </li>
1191
  <li style="width:100%;">
1197
  </ul>
1198
  </div>
1199
  </div>
1200
+
1201
+ <div class="clear"></div>
1202
+ <hr class="indented" />
1203
+
1204
+ <div class="section-title">
1205
+ <h4><?php _e('Horizontal Order', 'ajax-load-more'); ?></h4>
1206
+ <p><?php _e('Lays out items to maintain left-to-right order', 'ajax-load-more'); ?>.
1207
+ </p>
1208
+ </div>
1209
+ <div class="wrap">
1210
+ <div class="inner">
1211
+ <ul>
1212
+ <li>
1213
+ <input class="alm_element" type="radio" name="masonry-horizontalorder" value="t" id="horizontalOrder_t" checked="checked">
1214
+ <label for="horizontalOrder_t"><?php _e('True', 'ajax-load-more'); ?></label>
1215
+ </li>
1216
+ <li>
1217
+ <input class="alm_element" type="radio" name="masonry-horizontalorder" value="f" id="horizontalOrder_f">
1218
+ <label for="horizontalOrder_f"><?php _e('False', 'ajax-load-more'); ?></label>
1219
+ </li>
1220
+ </ul>
1221
+ </div>
1222
+ </div>
1223
 
1224
  </div>
1225
 
1230
  <hr>
1231
 
1232
  <div class="section-title">
1233
+ <h4><?php _e('Transition Container', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Removing the transition container may have undesired results and is not recommended','ajax-load-more'); ?>."></a></h4>
1234
  <p><?php _e('Remove the <span>.alm-reveal</span> loading container from Ajax Load More', 'ajax-load-more'); ?>.</p>
1235
  </div>
1236
  <div class="wrap">
1243
  </ul>
1244
  </div>
1245
  </div>
1246
+
1247
+ <div class="transition-container-classes-wrap">
1248
+ <div class="clear"></div>
1249
+ <hr>
1250
+
1251
+ <div class="section-title">
1252
+ <h4><?php _e('Transition Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('This setting is not available with the Previous Post or Next Page add-ons','ajax-load-more'); ?>."></a></h4>
1253
+ <p><?php _e('Add custom classes to the <span>.alm-reveal</span> loading container', 'ajax-load-more'); ?>.</p>
1254
+ </div>
1255
+ <div class="wrap">
1256
+ <div class="inner">
1257
+ <input type="text" class="alm_element" name="transition-container-classes" id="transition-container-classes" placeholder="row large-12 etc">
1258
+ </div>
1259
+ </div>
1260
+ </div>
1261
+
1262
  </div>
1263
  <!-- End Hide transition_container if Masonry is selected -->
1264
 
1266
  <hr>
1267
 
1268
  <div class="section-title">
1269
+ <h4><?php _e('Speed', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('0.5 seconds = 500, 1 second = 1000 etc','ajax-load-more'); ?>."></a></h4>
1270
  <p><?php _e('The speed of the loading transition in milliseconds', 'ajax-load-more'); ?>.<br/></p>
1271
  </div>
1272
  <div class="wrap">
1294
  <label for="pause_t"><?php _e('True', 'ajax-load-more'); ?></label>
1295
  </li>
1296
  <li>
1297
+ <input class="alm_element" type="radio" name="pause" value="f" id="pause_f" checked="checked">
1298
  <label for="pause_f"><?php _e('False', 'ajax-load-more'); ?></label>
1299
  </li>
1300
  </ul>
1360
  <h3 class="heading"><?php _e('Images Loaded', 'ajax-load-more'); ?></h3>
1361
  <div class="expand-wrap">
1362
  <div class="section-title">
1363
+ <p><?php _e('Wait for all images to load before displaying ajax loaded content', 'ajax-load-more'); ?>. <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Background images are not supported','ajax-load-more'); ?>."></a></p>
1364
  </div>
1365
  <div class="wrap">
1366
  <div class="inner">
1387
  <!-- Destroy After -->
1388
  <div class="expand-wrap">
1389
  <div class="section-title">
1390
+ <p><?php _e('Remove Ajax Load More functionality after {<em>n</em>} number of pages have been loaded.', 'ajax-load-more'); ?></p>
1391
  </div>
1392
  <div class="wrap">
1393
  <div class="inner">
1464
  <hr/>
1465
 
1466
  <div class="section-title">
1467
+ <h4><?php _e('Sticky Posts', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Sticky posts are only available for Posts','ajax-load-more'); ?>."></a></h4>
1468
  <p><?php _e('Preserve the ordering of sticky posts by having them appear first in the Ajax listing.', 'ajax-load-more'); ?></p>
1469
  </div>
1470
  <div class="wrap">
1528
  <div class="section-title">
1529
  <h4>Include</h4>
1530
  <p><?php _e('A comma separated list of categories to include by slug. (design, research etc...)', 'ajax-load-more'); ?><br/>
1531
+ &raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-category" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1532
  </div>
1533
  <div class="wrap">
1534
  <div class="inner">
1587
  <div class="expand-wrap">
1588
  <div class="section-title">
1589
  <h4><?php _e('Include', 'ajax-load-more'); ?></h4>
1590
+ <p><?php _e('A comma separated list of tags to include by slug. (toronto, canada etc...)', 'ajax-load-more'); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-tag" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1591
  </div>
1592
  <div class="wrap">
1593
  <div class="inner">
1663
  <h3 class="heading"><?php _e('Date', 'ajax-load-more'); ?></h3>
1664
  <div class="expand-wrap">
1665
  <div class="section-title">
1666
+ <p><?php _e('Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-date" target="_blank">View Example</a>', 'ajax-load-more'); ?></p>
1667
  </div>
1668
  <div class="wrap">
1669
  <div class="inner">
1702
  <div id="meta-query-relation">
1703
  <div class="inner border-top highlighted">
1704
  <div class="wrap-30 wrap-50">
1705
+ <label for="meta-relation" class="full"><?php _e('Relation:', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The logical relationship between each custom field when there is more than one','ajax-load-more'); ?>."></a></label>
1706
  <select class="alm_element meta-relation" name="meta-relation">
1707
  <option value="AND" selected="selected">AND</option>
1708
  <option value="OR">OR</option>
1735
  echo '<h3 class="heading">' . __('Author', 'ajax-load-more') . '</h3>';
1736
  echo '<div class="expand-wrap">';
1737
  echo '<div class="section-title">';
1738
+ echo '<p>' . __('Select an Author to query(by ID).', 'ajax-load-more') . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-author" target="_blank">View Example</a></p>';
1739
  echo '</div>';
1740
  echo '<div class="wrap"><div class="inner">';
1741
  if(!$disable_dynamic_content){
1787
  <hr/>
1788
  <div class="section-title">
1789
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1790
+ <p><?php _e('A comma separated list of post ID\'s to exclude from query.', 'ajax-load-more'); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-exclude" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1791
  </div>
1792
  <div class="wrap">
1793
  <div class="inner">
1797
  <div class="clear"></div>
1798
  <hr/>
1799
  <div class="section-title">
1800
+ <h4><?php _e('Post Status', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Post Status parameters are only available for logged in (admin) users. Non logged in users will only have access to view content in a \'publish\' or \'inherit\' state.','ajax-load-more'); ?>."></a></h4>
1801
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1802
  </div>
1803
  <div class="wrap">
1874
  <h3 class="heading"><?php _e('Custom Arguments', 'ajax-load-more'); ?></h3>
1875
  <div class="expand-wrap">
1876
  <div class="section-title">
1877
+ <p><?php _e('A semicolon separated list of custom value:pair arguments.', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Custom Arguments can be used to query by parameters not available in the Shortcode Builder','ajax-load-more'); ?>."></a><br/><br/>e.g. tag_slug__and:design,development; event_display:upcoming</p>
1878
  </div>
1879
  <div class="wrap">
1880
  <div class="inner">
admin/src/scss/admin.scss CHANGED
@@ -354,7 +354,7 @@ a.layout-hover{
354
  content:'\f067';
355
  }
356
 
357
- #alm-builder * {
358
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
359
  }
360
 
@@ -709,6 +709,8 @@ a.layout-hover{
709
  box-shadow: none !important;
710
  }
711
  .ajax-load-more input[type=text]:focus,
 
 
712
  .ajax-load-more textarea:focus{
713
  border-color: #999;
714
  box-shadow: 0 0 3px #ccc;
@@ -837,6 +839,10 @@ a.layout-hover{
837
  border-top: 1px solid rgba(0, 0, 0, 0.1);
838
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
839
  }
 
 
 
 
840
 
841
  .ajax-load-more .section-title {
842
  float: left;
@@ -849,7 +855,7 @@ a.layout-hover{
849
  float: none;
850
  }
851
  .ajax-load-more .section-title h4{
852
- font-size: 15px;
853
  margin-bottom: 13px;
854
  }
855
  .ajax-load-more .section-title p,
@@ -924,7 +930,7 @@ a.layout-hover{
924
  .acf-options,
925
  .masonry-options,
926
  .progress-bar-options{
927
- display: none;
928
  }
929
 
930
 
@@ -1493,7 +1499,7 @@ table.highlight{
1493
  /* Repeaters */
1494
  .repeaters {}
1495
  .repeaters .repeater-wrap{
1496
- padding: 12px 15px 8px !important;
1497
  }
1498
  .repeater-wrap label{
1499
  cursor: default;
354
  content:'\f067';
355
  }
356
 
357
+ #alm-builder{
358
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
359
  }
360
 
709
  box-shadow: none !important;
710
  }
711
  .ajax-load-more input[type=text]:focus,
712
+ .ajax-load-more input[type=number]:focus,
713
+ .ajax-load-more input[type=email]:focus,
714
  .ajax-load-more textarea:focus{
715
  border-color: #999;
716
  box-shadow: 0 0 3px #ccc;
839
  border-top: 1px solid rgba(0, 0, 0, 0.1);
840
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
841
  }
842
+ hr.indented{ // Indented as fake padding in shortcode builder
843
+ width: calc(100% - 72px);
844
+ margin-left: 36px;
845
+ }
846
 
847
  .ajax-load-more .section-title {
848
  float: left;
855
  float: none;
856
  }
857
  .ajax-load-more .section-title h4{
858
+ font-size: 16px;
859
  margin-bottom: 13px;
860
  }
861
  .ajax-load-more .section-title p,
930
  .acf-options,
931
  .masonry-options,
932
  .progress-bar-options{
933
+ display: none;
934
  }
935
 
936
 
1499
  /* Repeaters */
1500
  .repeaters {}
1501
  .repeaters .repeater-wrap{
1502
+ padding: 12px 15px 10px !important;
1503
  }
1504
  .repeater-wrap label{
1505
  cursor: default;
admin/views/repeater-templates.php CHANGED
@@ -197,17 +197,22 @@
197
  extraKeys: {"Ctrl-Space": "autocomplete"},
198
  });
199
  </script>
 
200
  <?php if(!$local_template){ ?>
201
 
202
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
203
  <div class="saved-response">&nbsp;</div>
204
  <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
205
 
206
- <?php } else { ?>
207
-
 
 
208
  <p class="warning-callout"><?php _e('It appears you are loading the <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template" target="_blank"><b>default template</b></a> (<em>default.php</em>) from your current theme directory. To modify this template, you must edit the file directly on your server.', 'ajax-load-more'); ?></p>
 
209
 
210
  <?php } ?>
 
211
  </div>
212
  </div>
213
  </div>
197
  extraKeys: {"Ctrl-Space": "autocomplete"},
198
  });
199
  </script>
200
+
201
  <?php if(!$local_template){ ?>
202
 
203
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
204
  <div class="saved-response">&nbsp;</div>
205
  <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
206
 
207
+ <?php } else {
208
+ $file_directory = get_option('stylesheet') .'/'. strtolower(substr(basename($template_dir), strrpos(basename($template_dir), '/')));
209
+ ?>
210
+
211
  <p class="warning-callout"><?php _e('It appears you are loading the <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template" target="_blank"><b>default template</b></a> (<em>default.php</em>) from your current theme directory. To modify this template, you must edit the file directly on your server.', 'ajax-load-more'); ?></p>
212
+ <p class="file-location" title="<?php echo $filename; ?>" style="margin-top: 20px;"><?php _e('File Location', 'ajax-load-more'); ?>:<code><?php echo $file_directory; ?>/default.php</code></p>
213
 
214
  <?php } ?>
215
+
216
  </div>
217
  </div>
218
  </div>
ajax-load-more.php CHANGED
@@ -7,15 +7,16 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
- Version: 3.2.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
 
13
  */
14
 
15
 
16
 
17
- define('ALM_VERSION', '3.2.0');
18
- define('ALM_RELEASE', 'August 8, 2017');
19
  define('ALM_STORE_URL', 'https://connekthq.com');
20
 
21
 
@@ -258,16 +259,13 @@ if( !class_exists('AjaxLoadMore') ):
258
  $dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
259
 
260
 
261
- // Load JS
262
-
263
- // Core JS
264
  wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more.min.js', __FILE__ ), $dependencies, ALM_VERSION, true );
265
 
266
- // Progress Bar JS
267
  wp_register_script( 'ajax-load-more-progress', plugins_url( '/core/src/js/vendor/pace/pace.min.js', __FILE__ ), 'ajax-load-more', ALM_VERSION, true );
268
 
269
-
270
- // Load CSS
271
  if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
272
  $file = plugins_url('/core/dist/css/ajax-load-more.min.css', __FILE__ );
273
  ALM_ENQUEUE::alm_enqueue_css('ajax-load-more', $file);
@@ -321,7 +319,10 @@ if( !class_exists('AjaxLoadMore') ):
321
 
322
  $nonce = $_GET['nonce'];
323
  $options = get_option( 'alm_settings' );
324
- if(!is_user_logged_in()){ // Skip nonce verification if user is logged in
 
 
 
325
  $options = get_option( 'alm_settings' );
326
  // check alm_settings for _alm_nonce_security
327
  if(isset($options['_alm_nonce_security']) & $options['_alm_nonce_security'] == '1'){
@@ -329,6 +330,7 @@ if( !class_exists('AjaxLoadMore') ):
329
  die('Error, could not verify WP nonce.');
330
  }
331
  }
 
332
 
333
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
334
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
@@ -337,6 +339,11 @@ if( !class_exists('AjaxLoadMore') ):
337
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
338
 
339
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
 
 
 
 
 
340
 
341
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
342
  $type = alm_get_repeater_type($repeater);
@@ -738,7 +745,7 @@ if( !class_exists('AjaxLoadMore') ):
738
  *
739
  * @return null
740
  */
741
- if(!empty($cache_id) && has_action('alm_cache_create_dir')){
742
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
743
  }
744
 
@@ -807,9 +814,13 @@ if( !class_exists('AjaxLoadMore') ):
807
  * Cache Add-on hook
808
  * If Cache is enabled, check the cache file
809
  *
 
 
 
 
810
  * @return null
811
  */
812
- if(!empty($cache_id) && has_action('alm_cache_installed')){
813
  if($previous_post){
814
  // Previous Post Cache
815
  apply_filters('alm_previous_post_cache_file', $cache_id, $previous_post_slug, $data);
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: https://connekthq.com
10
+ Version: 3.2.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
+
14
  */
15
 
16
 
17
 
18
+ define('ALM_VERSION', '3.2.1');
19
+ define('ALM_RELEASE', 'October 5, 2017');
20
  define('ALM_STORE_URL', 'https://connekthq.com');
21
 
22
 
259
  $dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
260
 
261
 
262
+ // Load Core JS
 
 
263
  wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more.min.js', __FILE__ ), $dependencies, ALM_VERSION, true );
264
 
265
+ // Load Progress Bar JS
266
  wp_register_script( 'ajax-load-more-progress', plugins_url( '/core/src/js/vendor/pace/pace.min.js', __FILE__ ), 'ajax-load-more', ALM_VERSION, true );
267
 
268
+ // Load Core CSS
 
269
  if(!isset($options['_alm_disable_css']) || $options['_alm_disable_css'] != '1'){
270
  $file = plugins_url('/core/dist/css/ajax-load-more.min.css', __FILE__ );
271
  ALM_ENQUEUE::alm_enqueue_css('ajax-load-more', $file);
319
 
320
  $nonce = $_GET['nonce'];
321
  $options = get_option( 'alm_settings' );
322
+
323
+ // Nonce removed in ALM 3.2.1
324
+ /*
325
+ if(!is_user_logged_in()){ // Skip nonce verification if user is logged in
326
  $options = get_option( 'alm_settings' );
327
  // check alm_settings for _alm_nonce_security
328
  if(isset($options['_alm_nonce_security']) & $options['_alm_nonce_security'] == '1'){
330
  die('Error, could not verify WP nonce.');
331
  }
332
  }
333
+ */
334
 
335
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
336
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
339
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
340
 
341
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
342
+ $cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
343
+ $do_create_cache = true;
344
+ if($cache_logged_in === 'true' && is_user_logged_in()){
345
+ $do_create_cache = false;
346
+ }
347
 
348
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
349
  $type = alm_get_repeater_type($repeater);
745
  *
746
  * @return null
747
  */
748
+ if(!empty($cache_id) && has_action('alm_cache_create_dir') && $do_create_cache){
749
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
750
  }
751
 
814
  * Cache Add-on hook
815
  * If Cache is enabled, check the cache file
816
  *
817
+ * @param $cache_id String ID of the ALM cache
818
+ * @param $do_create_cache Boolean Should cache be created for this user
819
+ *
820
+ * @updated 3.2.1
821
  * @return null
822
  */
823
+ if(!empty($cache_id) && has_action('alm_cache_installed') && $do_create_cache){
824
  if($previous_post){
825
  // Previous Post Cache
826
  apply_filters('alm_previous_post_cache_file', $cache_id, $previous_post_slug, $data);
core/classes/class.alm-shortcode.php CHANGED
@@ -130,8 +130,10 @@ if( !class_exists('ALM_SHORTCODE') ):
130
  'transition' => 'slide',
131
  'transition_speed' => '250',
132
  'transition_container' => 'true',
 
133
  'masonry_selector' => '',
134
  'masonry_animation' => '',
 
135
  'progress_bar' => 'false',
136
  'progress_bar_color' => 'ed7070',
137
  'images_loaded' => 'false',
@@ -181,7 +183,7 @@ if( !class_exists('ALM_SHORTCODE') ):
181
  if(has_action('alm_seo_installed') && $seo === 'true'){
182
  wp_enqueue_script( 'ajax-load-more-seo' );
183
  }
184
-
185
 
186
 
187
  /*
@@ -204,7 +206,10 @@ if( !class_exists('ALM_SHORTCODE') ):
204
  if($seo === "true" || $previous_post){
205
  $transition_container = "true";
206
  }
207
-
 
 
 
208
  if($restapi === 'true'){
209
  $restapi = true;
210
  $preloaded = false;
@@ -216,6 +221,8 @@ if( !class_exists('ALM_SHORTCODE') ):
216
  if($options['_alm_container_type'] == '2' || $previous_post){
217
  $container_element = 'div';
218
  }
 
 
219
 
220
  // override shortcode param
221
  if($container_type){
@@ -236,7 +243,8 @@ if( !class_exists('ALM_SHORTCODE') ):
236
  // Get extra classnames
237
  $classname = '';
238
  if(isset($options['_alm_classname'])){
239
- $classname = ' '.$options['_alm_classname'];
 
240
  }
241
 
242
  // Get button color
@@ -265,17 +273,20 @@ if( !class_exists('ALM_SHORTCODE') ):
265
 
266
  // Language support
267
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
268
- if (function_exists('pll_current_language')) // Polylang - https://wordpress.org/plugins/polylang/
269
  $lang = pll_current_language();
270
- if (function_exists('qtrans_getLanguage')) // qTranslate - https://wordpress.org/plugins/qtranslate/
 
271
  $lang = qtrans_getLanguage();
272
-
 
 
273
  $wp_posts_per_page = get_option( 'posts_per_page' ); // Posts per page - settings -> reading
274
 
275
  /* If $wp_posts_per_page > than shortcode value then $posts_per_page to $wp_posts_per_page */
276
- if(has_action('alm_seo_installed') && $wp_posts_per_page > $posts_per_page && $seo === 'true')
277
  $posts_per_page = $wp_posts_per_page;
278
-
279
 
280
  // Paging
281
  $paging_container_class = '';
@@ -288,7 +299,6 @@ if( !class_exists('ALM_SHORTCODE') ):
288
  $pause = 'true';
289
  $pause_override = 'false';
290
  }
291
-
292
  }
293
 
294
  // Start ALM object
@@ -454,15 +464,14 @@ if( !class_exists('ALM_SHORTCODE') ):
454
  * @return $preloaded_comments;
455
  */
456
  $preloaded_comments = apply_filters('alm_comments_preloaded', $preloaded_arr); // located in comments add-on
457
- $preloaded_output .= '<'.$comments_style.' class="alm-listing alm-preloaded commentlist alm-comments-preloaded '. $classname .' '. $css_classes .'">';
458
- if($seo === "true") $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
459
-
460
- $preloaded_output .= $preloaded_comments;
461
-
462
  if($seo === "true"){
463
  $preloaded_output .= '</div>';
464
  }
465
-
466
  $preloaded_output .= '</'.$container_element.'>';
467
  }
468
 
@@ -480,9 +489,9 @@ if( !class_exists('ALM_SHORTCODE') ):
480
  */
481
  $preloaded_acf = apply_filters('alm_acf_preloaded', $preloaded_arr, $repeater, $theme_repeater); //located in ACF add-on
482
 
483
- $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded alm-acf-preloaded '. $classname .' '. $css_classes .'" data-total-posts="'. apply_filters('alm_acf_total_rows', $preloaded_arr) .'">';
484
  if($seo === "true"){
485
- $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
486
  }
487
 
488
  $preloaded_output .= $preloaded_acf;
@@ -572,18 +581,18 @@ if( !class_exists('ALM_SHORTCODE') ):
572
 
573
  endif;
574
 
575
- $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
576
 
577
  if($seo === "true" && $paging === 'false'){
578
  if(is_search()){
579
  // If search, append slug (?s=term) to data-url
580
- $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.''. $slug .'">';
581
  }else{
582
- $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
583
  }
584
  }
585
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
586
- $preloaded_output .= '<div class="alm-reveal">';
587
  }
588
 
589
  $preloaded_output .= $output;
@@ -615,7 +624,7 @@ if( !class_exists('ALM_SHORTCODE') ):
615
  $listing_class = 'commentlist alm-comments';
616
  }
617
 
618
- $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class .' '. $classname . ' '. $css_classes .'"'; // Build ALM container
619
 
620
 
621
  // Cache Add-on
@@ -629,6 +638,7 @@ if( !class_exists('ALM_SHORTCODE') ):
629
  $ajaxloadmore .= $cache_return;
630
  }
631
 
 
632
  // CTA Add-on
633
  if(has_action('alm_cta_installed') && $cta === 'true'){
634
  $cta_return = apply_filters(
@@ -640,8 +650,9 @@ if( !class_exists('ALM_SHORTCODE') ):
640
  );
641
  $ajaxloadmore .= $cta_return;
642
  }
 
643
 
644
- // Advanced Custom Fields Add-on
645
  if(has_action('alm_acf_installed') && $acf === 'true'){
646
  $acf_return = apply_filters(
647
  'alm_acf_shortcode',
@@ -653,6 +664,7 @@ if( !class_exists('ALM_SHORTCODE') ):
653
  );
654
  $ajaxloadmore .= $acf_return;
655
  }
 
656
 
657
  // Comments Add-on
658
  if(has_action('alm_comments_installed') && $comments === 'true'){
@@ -669,6 +681,7 @@ if( !class_exists('ALM_SHORTCODE') ):
669
  $ajaxloadmore .= $comments_return;
670
  }
671
 
 
672
  // REST API Add-on
673
  if(has_action('alm_rest_api_installed') && $restapi === true){
674
  $restapi_return = apply_filters(
@@ -799,12 +812,18 @@ if( !class_exists('ALM_SHORTCODE') ):
799
  }
800
  if($transition_container === 'false'){
801
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
 
 
 
802
  }
803
  if(!empty($masonry_selector)){
804
  $ajaxloadmore .= ' data-masonry-selector="'.$masonry_selector.'"';
805
  }
806
  if(!empty($masonry_animation)){
807
  $ajaxloadmore .= ' data-masonry-animation="'.$masonry_animation.'"';
 
 
 
808
  }
809
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
810
 
130
  'transition' => 'slide',
131
  'transition_speed' => '250',
132
  'transition_container' => 'true',
133
+ 'transition_container_classes' => '',
134
  'masonry_selector' => '',
135
  'masonry_animation' => '',
136
+ 'masonry_horizontalorder' => 'true',
137
  'progress_bar' => 'false',
138
  'progress_bar_color' => 'ed7070',
139
  'images_loaded' => 'false',
183
  if(has_action('alm_seo_installed') && $seo === 'true'){
184
  wp_enqueue_script( 'ajax-load-more-seo' );
185
  }
186
+
187
 
188
 
189
  /*
206
  if($seo === "true" || $previous_post){
207
  $transition_container = "true";
208
  }
209
+ if(!empty($transition_container_classes)){
210
+ $transition_container_classes = ' '. $transition_container_classes;
211
+ }
212
+
213
  if($restapi === 'true'){
214
  $restapi = true;
215
  $preloaded = false;
221
  if($options['_alm_container_type'] == '2' || $previous_post){
222
  $container_element = 'div';
223
  }
224
+
225
+ $css_classes = (!empty($css_classes)) ? ' ' . $css_classes : '';
226
 
227
  // override shortcode param
228
  if($container_type){
243
  // Get extra classnames
244
  $classname = '';
245
  if(isset($options['_alm_classname'])){
246
+ $classname = $options['_alm_classname'];
247
+ $classname = (empty($classname)) ? '' : ' '.$classname;
248
  }
249
 
250
  // Get button color
273
 
274
  // Language support
275
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
276
+ if (function_exists('pll_current_language')){ // Polylang - https://wordpress.org/plugins/polylang/
277
  $lang = pll_current_language();
278
+ }
279
+ if (function_exists('qtrans_getLanguage')){ // qTranslate - https://wordpress.org/plugins/qtranslate/
280
  $lang = qtrans_getLanguage();
281
+ }
282
+
283
+ // Global Posts Per Page
284
  $wp_posts_per_page = get_option( 'posts_per_page' ); // Posts per page - settings -> reading
285
 
286
  /* If $wp_posts_per_page > than shortcode value then $posts_per_page to $wp_posts_per_page */
287
+ if(has_action('alm_seo_installed') && $wp_posts_per_page > $posts_per_page && $seo === 'true'){
288
  $posts_per_page = $wp_posts_per_page;
289
+ }
290
 
291
  // Paging
292
  $paging_container_class = '';
299
  $pause = 'true';
300
  $pause_override = 'false';
301
  }
 
302
  }
303
 
304
  // Start ALM object
464
  * @return $preloaded_comments;
465
  */
466
  $preloaded_comments = apply_filters('alm_comments_preloaded', $preloaded_arr); // located in comments add-on
467
+ $preloaded_output .= '<'.$comments_style.' class="alm-listing alm-preloaded commentlist alm-comments-preloaded'. $classname . $css_classes .'">';
468
+ if($seo === "true"){
469
+ $preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.'">';
470
+ }
471
+ $preloaded_output .= $preloaded_comments;
472
  if($seo === "true"){
473
  $preloaded_output .= '</div>';
474
  }
 
475
  $preloaded_output .= '</'.$container_element.'>';
476
  }
477
 
489
  */
490
  $preloaded_acf = apply_filters('alm_acf_preloaded', $preloaded_arr, $repeater, $theme_repeater); //located in ACF add-on
491
 
492
+ $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded alm-acf-preloaded'. $classname . $css_classes .'" data-total-posts="'. apply_filters('alm_acf_total_rows', $preloaded_arr) .'">';
493
  if($seo === "true"){
494
+ $preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.'">';
495
  }
496
 
497
  $preloaded_output .= $preloaded_acf;
581
 
582
  endif;
583
 
584
+ $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname . $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
585
 
586
  if($seo === "true" && $paging === 'false'){
587
  if(is_search()){
588
  // If search, append slug (?s=term) to data-url
589
+ $preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.''. $slug .'">';
590
  }else{
591
+ $preloaded_output .= '<div class="alm-reveal alm-seo'. $transition_container_classes .'" data-page="1" data-url="'.$canonicalURL.'">';
592
  }
593
  }
594
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
595
+ $preloaded_output .= '<div class="alm-reveal'. $transition_container_classes .'">';
596
  }
597
 
598
  $preloaded_output .= $output;
624
  $listing_class = 'commentlist alm-comments';
625
  }
626
 
627
+ $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class . $classname . $css_classes .'"'; // Build ALM container
628
 
629
 
630
  // Cache Add-on
638
  $ajaxloadmore .= $cache_return;
639
  }
640
 
641
+
642
  // CTA Add-on
643
  if(has_action('alm_cta_installed') && $cta === 'true'){
644
  $cta_return = apply_filters(
650
  );
651
  $ajaxloadmore .= $cta_return;
652
  }
653
+
654
 
655
+ // Advanced Custom Fields Extension
656
  if(has_action('alm_acf_installed') && $acf === 'true'){
657
  $acf_return = apply_filters(
658
  'alm_acf_shortcode',
664
  );
665
  $ajaxloadmore .= $acf_return;
666
  }
667
+
668
 
669
  // Comments Add-on
670
  if(has_action('alm_comments_installed') && $comments === 'true'){
681
  $ajaxloadmore .= $comments_return;
682
  }
683
 
684
+
685
  // REST API Add-on
686
  if(has_action('alm_rest_api_installed') && $restapi === true){
687
  $restapi_return = apply_filters(
812
  }
813
  if($transition_container === 'false'){
814
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
815
+ }
816
+ if(!empty($transition_container_classes)){
817
+ $ajaxloadmore .= ' data-transition-container-classes="'.$transition_container_classes.'"';
818
  }
819
  if(!empty($masonry_selector)){
820
  $ajaxloadmore .= ' data-masonry-selector="'.$masonry_selector.'"';
821
  }
822
  if(!empty($masonry_animation)){
823
  $ajaxloadmore .= ' data-masonry-animation="'.$masonry_animation.'"';
824
+ }
825
+ if(!empty($masonry_horizontalorder)){
826
+ $ajaxloadmore .= ' data-masonry-horizontalorder="'.$masonry_horizontalorder.'"';
827
  }
828
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
829
 
core/dist/js/ajax-load-more.js CHANGED
@@ -18,7 +18,7 @@
18
 
19
  var almMasonryInit = true; // flag
20
 
21
- var almMasonry = function almMasonry(container, items, selector, animation, speed, init, filtering) {
22
 
23
  var duration = (speed + 100) / 1000 + 's'; // Add 100 for some delay
24
  var hidden = 'scale(0.5)';
@@ -44,6 +44,8 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
44
  visible = 'translateY(0)';
45
  }
46
 
 
 
47
  if (!filtering) {
48
 
49
  // First Run
@@ -54,6 +56,8 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
54
  container.masonry({
55
  itemSelector: selector,
56
  transitionDuration: duration,
 
 
57
  hiddenStyle: {
58
  transform: hidden,
59
  opacity: 0
@@ -80,7 +84,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
80
  container.masonry('destroy'); // destroy masonry
81
  almMasonryInit = true; // reset almMasonryInit
82
  container.append(items);
83
- almMasonry(container, items, selector, animation, speed, true, false);
84
  }
85
  };
86
  'use strict';
@@ -147,8 +151,9 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
147
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
148
  alm.pause_override = alm.content.attr('data-pause-override'); // true | false
149
  alm.pause = alm.content.attr('data-pause'); // true | false
150
- alm.transition = alm.content.attr('data-transition');
151
- alm.transition_container = alm.content.attr('data-transition-container');
 
152
  alm.speed = alm.content.attr('data-transition-speed');
153
  alm.images_loaded = alm.content.attr('data-images-loaded');
154
  alm.destroy_after = alm.content.attr('data-destroy-after');
@@ -293,6 +298,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
293
  alm.permalink = alm.content.attr('data-seo-permalink');
294
  alm.pageview = alm.content.attr('data-seo-pageview');
295
  alm.start_page = alm.content.attr('data-seo-start-page');
 
296
 
297
  if (alm.start_page) {
298
 
@@ -437,14 +443,22 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
437
  if (alm.transition === undefined) {
438
  alm.transition = 'slide';
439
  }
 
 
 
 
440
 
441
  alm.is_masonry_preloaded = false;
442
  if (alm.transition === 'masonry') {
443
  alm.masonry_selector = alm.content.attr('data-masonry-selector');
444
  alm.masonry_animation = alm.content.attr('data-masonry-animation');
 
445
  if (alm.masonry_animation === undefined) {
446
  alm.masonry_animation = 'standard';
447
  }
 
 
 
448
  alm.masonry_wrap = alm.content;
449
  alm.transition_container = false;
450
  if (document.body.contains(alm.content_preloaded.get(0))) {
@@ -514,12 +528,10 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
514
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
515
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
516
 
 
517
  if (alm.paging) {
518
-
519
- // Paging add-on
520
  alm.content.parent().addClass('loading'); // add loading class to main container
521
  } else {
522
-
523
  // If paging is false
524
  $('.' + alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more' + alm.button_class + '">' + alm.button_label + '</button>');
525
  alm.button = $('.alm-load-more-btn', alm.container);
@@ -744,7 +756,6 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
744
  }
745
  });
746
  }
747
-
748
  // Standard ALM
749
  else {
750
  $.ajax({
@@ -756,6 +767,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
756
  query_type: queryType,
757
  nonce: alm_localize.alm_nonce,
758
  cache_id: alm.cache_id,
 
759
  repeater: alm.repeater,
760
  theme_repeater: alm.theme_repeater,
761
  acf: alm.acf_array,
@@ -894,7 +906,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
894
 
895
  // Is pagination
896
  if (total > 0) {
897
- alm.el = $('<div class="alm-reveal"/>');
898
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
899
  $('.alm-paging-content', alm.el).append(alm.data).hide();
900
  alm.content.append(alm.el);
@@ -975,13 +987,13 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
975
  // > Paged
976
  pagenum = k + 1 + p;
977
  if (alm.permalink === 'default') {
978
- div = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + '' + alm.search_value + '&paged=' + pagenum + '" data-page="' + pagenum + '" />');
979
  } else {
980
- div = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + 'page/' + pagenum + '/' + alm.search_value + '" data-page="' + pagenum + '" />');
981
  }
982
  } else {
983
  // First Page
984
- div = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + '' + alm.search_value + '" data-page="1" />');
985
  }
986
 
987
  div.append(seo_data[k]);
@@ -1002,22 +1014,22 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1002
 
1003
  if (alm.seo) {
1004
  if (alm.permalink === 'default') {
1005
- alm.el = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + '' + alm.search_value + '&paged=' + pagenum + '" data-page="' + pagenum + '" />');
1006
  } else {
1007
- alm.el = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + 'page/' + pagenum + '/' + alm.search_value + '" data-page="' + pagenum + '" />');
1008
  }
1009
  } else {
1010
  // Basic ALM
1011
- alm.el = $('<div class="alm-reveal" />');
1012
  }
1013
  } else {
1014
 
1015
  if (alm.seo) {
1016
  // SEO [Page 1]
1017
- alm.el = $('<div class="alm-reveal alm-seo" data-url="' + alm.canonical_url + '' + alm.search_value + '" data-page="1" />');
1018
  } else {
1019
  // Basic ALM
1020
- alm.el = $('<div class="alm-reveal" />');
1021
  }
1022
  }
1023
 
@@ -1061,7 +1073,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1061
  } else if (alm.transition === 'masonry') {
1062
  // masonry
1063
 
1064
- almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.speed, alm.init, alm_is_filtering);
1065
 
1066
  if (!alm.paging) {
1067
  alm.button.delay(alm.speed).removeClass('loading');
@@ -1153,7 +1165,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1153
  alm.AjaxLoadMore.triggerDone();
1154
  }
1155
  } else {
1156
- // Cache
1157
  if (total < alm.posts_per_page) {
1158
  alm.AjaxLoadMore.triggerDone();
1159
  }
@@ -1181,6 +1193,9 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1181
  alm.disable_ajax = true;
1182
  if (!alm.paging) {
1183
  alm.button.delay(alm.speed).fadeOut(alm.speed);
 
 
 
1184
  }
1185
  }
1186
  }
@@ -1200,7 +1215,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1200
  */
1201
  alm.AjaxLoadMore.pagingPreloadedInit = function (data) {
1202
 
1203
- alm.el = $('<div class="alm-reveal"/>');
1204
  alm.el.append('<div class="alm-paging-content">' + data + '</div><div class="alm-paging-loading"></div>');
1205
  alm.content.append(alm.el);
1206
  alm.content.parent().removeClass('loading'); // Remove loading class from main container
@@ -1504,7 +1519,7 @@ var almMasonry = function almMasonry(container, items, selector, animation, spee
1504
  // Masonry + Preloaded
1505
  alm.window.bind('load', function () {
1506
  if (alm.is_masonry_preloaded) {
1507
- almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.speed, true, false);
1508
  }
1509
  });
1510
  };
18
 
19
  var almMasonryInit = true; // flag
20
 
21
+ var almMasonry = function almMasonry(container, items, selector, animation, horizontalOrder, speed, init, filtering) {
22
 
23
  var duration = (speed + 100) / 1000 + 's'; // Add 100 for some delay
24
  var hidden = 'scale(0.5)';
44
  visible = 'translateY(0)';
45
  }
46
 
47
+ horizontalOrder = horizontalOrder === 'true' ? true : false;
48
+
49
  if (!filtering) {
50
 
51
  // First Run
56
  container.masonry({
57
  itemSelector: selector,
58
  transitionDuration: duration,
59
+ columnWidth: selector,
60
+ horizontalOrder: horizontalOrder,
61
  hiddenStyle: {
62
  transform: hidden,
63
  opacity: 0
84
  container.masonry('destroy'); // destroy masonry
85
  almMasonryInit = true; // reset almMasonryInit
86
  container.append(items);
87
+ almMasonry(container, items, selector, animation, horizontalOrder, speed, true, false);
88
  }
89
  };
90
  'use strict';
151
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
152
  alm.pause_override = alm.content.attr('data-pause-override'); // true | false
153
  alm.pause = alm.content.attr('data-pause'); // true | false
154
+ alm.transition = alm.content.attr('data-transition'); // Transition
155
+ alm.transition_container = alm.content.attr('data-transition-container'); // Transition Container
156
+ alm.tcc = alm.content.attr('data-transition-container-classes'); // Transition Container Classes
157
  alm.speed = alm.content.attr('data-transition-speed');
158
  alm.images_loaded = alm.content.attr('data-images-loaded');
159
  alm.destroy_after = alm.content.attr('data-destroy-after');
298
  alm.permalink = alm.content.attr('data-seo-permalink');
299
  alm.pageview = alm.content.attr('data-seo-pageview');
300
  alm.start_page = alm.content.attr('data-seo-start-page');
301
+ alm.trailing_slash = alm.content.attr('data-seo-trailing-slash') === 'false' ? '' : '/';
302
 
303
  if (alm.start_page) {
304
 
443
  if (alm.transition === undefined) {
444
  alm.transition = 'slide';
445
  }
446
+ if (alm.tcc === undefined) {
447
+ // transition_container_classes
448
+ alm.tcc = '';
449
+ }
450
 
451
  alm.is_masonry_preloaded = false;
452
  if (alm.transition === 'masonry') {
453
  alm.masonry_selector = alm.content.attr('data-masonry-selector');
454
  alm.masonry_animation = alm.content.attr('data-masonry-animation');
455
+ alm.masonry_horizontalorder = alm.content.attr('data-masonry-horizontalorder');
456
  if (alm.masonry_animation === undefined) {
457
  alm.masonry_animation = 'standard';
458
  }
459
+ if (alm.masonry_horizontalorder === undefined) {
460
+ alm.masonry_horizontalorder = 'true';
461
+ }
462
  alm.masonry_wrap = alm.content;
463
  alm.transition_container = false;
464
  if (document.body.contains(alm.content_preloaded.get(0))) {
528
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
529
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
530
 
531
+ // Paging add-on
532
  if (alm.paging) {
 
 
533
  alm.content.parent().addClass('loading'); // add loading class to main container
534
  } else {
 
535
  // If paging is false
536
  $('.' + alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more' + alm.button_class + '">' + alm.button_label + '</button>');
537
  alm.button = $('.alm-load-more-btn', alm.container);
756
  }
757
  });
758
  }
 
759
  // Standard ALM
760
  else {
761
  $.ajax({
767
  query_type: queryType,
768
  nonce: alm_localize.alm_nonce,
769
  cache_id: alm.cache_id,
770
+ cache_logged_in: alm.cache_logged_in,
771
  repeater: alm.repeater,
772
  theme_repeater: alm.theme_repeater,
773
  acf: alm.acf_array,
906
 
907
  // Is pagination
908
  if (total > 0) {
909
+ alm.el = $('<div class="alm-reveal' + alm.tcc + '"/>');
910
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
911
  $('.alm-paging-content', alm.el).append(alm.data).hide();
912
  alm.content.append(alm.el);
987
  // > Paged
988
  pagenum = k + 1 + p;
989
  if (alm.permalink === 'default') {
990
+ div = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '&paged=' + pagenum + '" data-page="' + pagenum + '" />');
991
  } else {
992
+ div = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + 'page/' + pagenum + alm.trailing_slash + alm.search_value + '" data-page="' + pagenum + '" />');
993
  }
994
  } else {
995
  // First Page
996
+ div = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '" data-page="1" />');
997
  }
998
 
999
  div.append(seo_data[k]);
1014
 
1015
  if (alm.seo) {
1016
  if (alm.permalink === 'default') {
1017
+ alm.el = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '&paged=' + pagenum + '" data-page="' + pagenum + '" />');
1018
  } else {
1019
+ alm.el = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + 'page/' + pagenum + alm.trailing_slash + alm.search_value + '" data-page="' + pagenum + '" />');
1020
  }
1021
  } else {
1022
  // Basic ALM
1023
+ alm.el = $('<div class="alm-reveal' + alm.tcc + '" />');
1024
  }
1025
  } else {
1026
 
1027
  if (alm.seo) {
1028
  // SEO [Page 1]
1029
+ alm.el = $('<div class="alm-reveal alm-seo' + alm.tcc + '" data-url="' + alm.canonical_url + '' + alm.search_value + '" data-page="1" />');
1030
  } else {
1031
  // Basic ALM
1032
+ alm.el = $('<div class="alm-reveal' + alm.tcc + '" />');
1033
  }
1034
  }
1035
 
1073
  } else if (alm.transition === 'masonry') {
1074
  // masonry
1075
 
1076
+ almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.init, alm_is_filtering);
1077
 
1078
  if (!alm.paging) {
1079
  alm.button.delay(alm.speed).removeClass('loading');
1165
  alm.AjaxLoadMore.triggerDone();
1166
  }
1167
  } else {
1168
+ // Cache
1169
  if (total < alm.posts_per_page) {
1170
  alm.AjaxLoadMore.triggerDone();
1171
  }
1193
  alm.disable_ajax = true;
1194
  if (!alm.paging) {
1195
  alm.button.delay(alm.speed).fadeOut(alm.speed);
1196
+ if ($.isFunction($.fn.almDestroyed)) {
1197
+ $.fn.almDestroyed(alm);
1198
+ }
1199
  }
1200
  }
1201
  }
1215
  */
1216
  alm.AjaxLoadMore.pagingPreloadedInit = function (data) {
1217
 
1218
+ alm.el = $('<div class="alm-reveal' + alm.tcc + '"/>');
1219
  alm.el.append('<div class="alm-paging-content">' + data + '</div><div class="alm-paging-loading"></div>');
1220
  alm.content.append(alm.el);
1221
  alm.content.parent().removeClass('loading'); // Remove loading class from main container
1519
  // Masonry + Preloaded
1520
  alm.window.bind('load', function () {
1521
  if (alm.is_masonry_preloaded) {
1522
+ almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, true, false);
1523
  }
1524
  });
1525
  };
core/dist/js/ajax-load-more.min.js CHANGED
@@ -1 +1 @@
1
- "use strict";var almMasonryInit=!0,almMasonry=function t(a,e,o,n,r,s,i){var l=(r+100)/1e3+"s",d="scale(0.5)",p="scale(1)";"zoom-out"===n&&(d="translateY(-20px) scale(1.25)",p="translateY(0) scale(1)"),"slide-up"===n&&(d="translateY(50px)",p="translateY(0)"),"slide-down"===n&&(d="translateY(-50px)",p="translateY(0)"),"none"===n&&(d="translateY(0)",p="translateY(0)"),i?(a.masonry("destroy"),almMasonryInit=!0,a.append(e),t(a,e,o,n,r,!0,!1)):almMasonryInit&&s?(almMasonryInit=!1,a.imagesLoaded(function(){e.fadeIn(r),a.masonry({itemSelector:o,transitionDuration:l,hiddenStyle:{transform:d,opacity:0},visibleStyle:{transform:p,opacity:1}}),a.masonry("reloadItems")})):(a.append(e),a.imagesLoaded(function(){e.show(),a.masonry("appended",e)}))};!function(t){var a=!1;t.ajaxloadmore=function(e,o){"true"===alm_localize.scrolltop&&t(window).scrollTop(0);var n=this;n.AjaxLoadMore={},n.window=t(window),n.page=0,n.posts=0,n.totalposts=0,n.proceed=!1,n.disable_ajax=!1,n.init=!0,n.loading=!0,n.finished=!1,n.button_label="",n.el=e,n.container=e,n.container.addClass("alm-"+o).attr("data-alm-id",o),n.content=t(".alm-ajax",n.container),n.content_preloaded=t(".alm-listing.alm-preloaded",n.container),n.canonical_url=n.el.attr("data-canonical-url"),n.is_search=n.el.attr("data-search"),n.slug=n.el.attr("data-slug"),n.post_id=n.el.attr("data-post-id"),n.prefix="alm-",n.cache=n.content.attr("data-cache"),n.cache_id=n.content.attr("data-cache-id"),n.cache_path=n.content.attr("data-cache-path"),n.cache_logged_in=n.content.attr("data-cache-logged-in"),n.repeater=n.content.attr("data-repeater"),n.theme_repeater=n.content.attr("data-theme-repeater"),n.scroll_distance=parseInt(n.content.attr("data-scroll-distance")),n.scroll_container=n.content.attr("data-scroll-container"),n.max_pages=parseInt(n.content.attr("data-max-pages")),n.pause_override=n.content.attr("data-pause-override"),n.pause=n.content.attr("data-pause"),n.transition=n.content.attr("data-transition"),n.transition_container=n.content.attr("data-transition-container"),n.speed=n.content.attr("data-transition-speed"),n.images_loaded=n.content.attr("data-images-loaded"),n.destroy_after=n.content.attr("data-destroy-after"),n.lang=n.content.attr("data-lang"),n.orginal_posts_per_page=n.content.attr("data-posts-per-page"),n.posts_per_page=n.content.attr("data-posts-per-page"),n.cta_array="",n.cta=n.content.attr("data-cta"),n.cta_position=n.content.attr("data-cta-position"),n.cta_repeater=n.content.attr("data-cta-repeater"),n.cta_theme_repeater=n.content.attr("data-cta-theme-repeater"),n.acf_array="",n.acf=n.content.attr("data-acf"),n.acf_field_type=n.content.attr("data-acf-field-type"),n.acf_field_name=n.content.attr("data-acf-field-name"),n.acf_post_id=n.content.attr("data-acf-post-id"),n.nextpage_array="",n.nextpage=n.content.attr("data-nextpage"),n.nextpage_urls=n.content.attr("data-nextpage-urls"),n.nextpage_scroll=n.content.attr("data-nextpage-scroll"),n.nextpage_pageviews=n.content.attr("data-nextpage-pageviews"),n.nextpage_post_id=n.content.attr("data-nextpage-post-id"),n.nextpage_startpage=n.content.attr("data-nextpage-startpage"),n.previous_post=n.content.attr("data-previous-post"),n.previous_post_id=n.content.attr("data-previous-post-id"),n.previous_post_taxonomy=n.content.attr("data-previous-post-taxonomy"),n.previous_post_excluded_terms=n.content.attr("data-previous-post-excluded-terms"),n.comments=n.content.attr("data-comments"),"true"===n.comments&&(n.content=t(".alm-comments",n.container)),n.comments_array="",n.comments_post_id=n.content.attr("data-comments_post_id"),n.comments_per_page=n.content.attr("data-comments_per_page"),n.comments_type=n.content.attr("data-comments_type"),n.comments_style=n.content.attr("data-comments_style"),n.comments_template=n.content.attr("data-comments_template"),n.comments_callback=n.content.attr("data-comments_callback"),n.restapi=n.content.attr("data-restapi"),n.restapi_base_url=n.content.attr("data-restapi-base-url"),n.restapi_namespace=n.content.attr("data-restapi-namespace"),n.restapi_endpoint=n.content.attr("data-restapi-endpoint"),n.restapi_template_id=n.content.attr("data-restapi-template-id"),n.restapi_debug=n.content.attr("data-restapi-debug"),n.seo=n.content.attr("data-seo"),n.preloaded=n.content.attr("data-preloaded"),n.preloaded_amount=n.content.attr("data-preloaded-amount"),n.paging=n.content.attr("data-paging"),n.paging_controls=n.content.attr("data-paging-controls"),n.paging_show_at_most=n.content.attr("data-paging-show-at-most"),n.paging_classes=n.content.attr("data-paging-classes"),n.paging_init=!0,"true"===n.restapi?(n.restapi=!0,void 0===n.restapi_debug&&(n.restapi_debug=!1),""===n.restapi_template_id&&(n.restapi=!1)):n.restapi=!1,"true"===n.paging?(n.paging=!0,void 0===n.paging_show_at_most&&(n.paging_show_at_most=7),"true"===n.preloaded&&(n.pause=!0)):n.paging=!1,"true"===n.paging_controls?n.paging_controls=!0:n.paging_controls=!1,void 0===n.cache&&(n.cache=!1),void 0===n.cache_logged_in&&(n.cache_logged_in=!1),void 0===n.comments_per_page&&(n.comments_per_page="5"),"true"===n.preloaded?(n.preload_wrap=n.content.prev(".alm-preloaded"),n.preloaded_total_posts=parseInt(n.preload_wrap.attr("data-total-posts")),void 0===n.preloaded_amount&&(n.preloaded_amount=!1),n.preloaded_total_posts<=n.preloaded_amount&&(n.disable_ajax=!0)):n.preloaded="false",void 0===n.seo&&(n.seo=!1),"true"===n.seo&&(n.seo=!0),void 0===n.is_search&&(n.is_search=!1),n.search_value="true"===n.is_search?n.slug:"",n.permalink=n.content.attr("data-seo-permalink"),n.pageview=n.content.attr("data-seo-pageview"),n.start_page=n.content.attr("data-seo-start-page"),n.start_page?(n.seo_scroll=n.content.attr("data-seo-scroll"),n.seo_scroll_speed=n.content.attr("data-seo-scroll-speed"),n.seo_scrolltop=n.content.attr("data-seo-scrolltop"),n.isPaged=!1,n.start_page>1&&(n.isPaged=!0,n.posts_per_page=n.start_page*n.posts_per_page),n.paging&&(n.posts_per_page=n.orginal_posts_per_page)):n.start_page=1,"true"===n.nextpage?(n.nextpage=!0,n.posts_per_page=1):n.nextpage=!1,void 0===n.nextpage_urls&&(n.nextpage="true"),void 0===n.nextpage_scroll&&(n.nextpage_scroll="250:30"),void 0===n.nextpage_pageviews&&(n.nextpage_pageviews="true"),void 0===n.nextpage_post_id&&(n.nextpage=!1,n.nextpage_post_id=null),void 0===n.nextpage_startpage&&(n.nextpage_startpage=1),n.nextpage_startpage>1&&(n.isPaged=!0),"true"===n.acf?n.acf=!0:n.acf=!1,void 0!==n.acf_field_type&&void 0!==n.acf_field_name&&void 0!==n.acf_post_id||(n.acf=!1),"true"===n.previous_post?(n.previous_post=!0,n.previous_post_permalink="",n.previous_post_title="",n.previous_post_slug=""):n.previous_post=!1,void 0===n.previous_post_id&&(n.previous_post_id=""),void 0===n.previous_post_taxonomy&&(n.previous_post_taxonomy=""),void 0===n.previous_post_excluded_terms&&(n.previous_post_excluded_terms=""),n.previous_post_title_template=n.content.attr("data-previous-post-title-template"),n.siteTitle=n.content.attr("data-previous-post-site-title"),n.siteTagline=n.content.attr("data-previous-post-site-tagline"),n.previous_post_pageview=n.content.attr("data-previous-post-pageview"),n.previous_post_scroll=n.content.attr("data-previous-post-scroll"),n.previous_post_scroll_speed=n.content.attr("data-previous-post-scroll-speed"),n.previous_post_scroll_top=n.content.attr("data-previous-post-scrolltop"),void 0===n.content.attr("data-offset")?n.offset=0:n.offset=n.content.attr("data-offset"),(void 0===n.pause||n.seo&&n.start_page>1)&&(n.pause=!1),"true"===n.preloaded&&n.seo&&n.start_page>0&&(n.pause=!1),"true"===n.preloaded&&n.paging&&(n.pause=!0),void 0===n.repeater&&(n.repeater="default"),void 0===n.theme_repeater&&(n.theme_repeater="null"),void 0===n.max_pages&&(n.max_pages=0),0===n.max_pages&&(n.max_pages=1e4),void 0===n.scroll_distance&&(n.scroll_distance=150),void 0===n.scroll_container&&(n.scroll_container=""),void 0===n.transition&&(n.transition="slide"),n.is_masonry_preloaded=!1,"masonry"===n.transition&&(n.masonry_selector=n.content.attr("data-masonry-selector"),n.masonry_animation=n.content.attr("data-masonry-animation"),void 0===n.masonry_animation&&(n.masonry_animation="standard"),n.masonry_wrap=n.content,n.transition_container=!1,document.body.contains(n.content_preloaded.get(0))&&(n.masonry_wrap=n.content_preloaded,n.is_masonry_preloaded=!0)),void 0===n.speed?n.speed=250:n.speed=parseInt(n.speed),void 0===n.transition_container||"true"===n.transition_container?n.transition_container=!0:n.transition_container=!1,void 0===n.images_loaded&&(n.images_loaded="false"),n.destroy_after,void 0===n.content.attr("data-button-label")?n.button_label="Older Posts":n.button_label=n.content.attr("data-button-label"),n.button_loading_label=n.content.attr("data-button-loading-label"),void 0===n.button_loading_label&&(n.button_loading_label=!1),void 0===n.content.attr("data-button-class")?n.button_class="":n.button_class=" "+n.content.attr("data-button-class"),void 0===n.content.attr("data-scroll")?n.scroll=!0:"false"===n.content.attr("data-scroll")?n.scroll=!1:n.scroll=!0,n.post_type=n.content.attr("data-post-type"),n.post_type=n.post_type.split(","),n.sticky_posts=n.content.attr("data-sticky-posts"),n.container.append('<div class="'+n.prefix+'btn-wrap"/>'),n.btnWrap=t("."+n.prefix+"btn-wrap",n.container),n.paging?n.content.parent().addClass("loading"):(t("."+n.prefix+"btn-wrap",n.container).append('<button id="load-more" class="'+n.prefix+"load-more-btn more"+n.button_class+'">'+n.button_label+"</button>"),n.button=t(".alm-load-more-btn",n.container)),n.AjaxLoadMore.loadPosts=function(){if(!n.disable_ajax)if(n.paging||(n.button.addClass("loading"),!1!==n.button_loading_label&&n.button.html(n.button_loading_label)),n.container.addClass("alm-loading"),n.loading=!0,"true"!==n.cache||n.cache_logged_in)n.AjaxLoadMore.ajax("standard");else{var a;if(n.init&&n.seo&&n.isPaged){a=n.cache_path+n.cache_id+"/page-1-"+n.start_page+".html"}else if(n.nextpage){var e;n.paging?e=parseInt(n.page)+1:(e=parseInt(n.page)+2,n.isPaged&&(e=parseInt(n.page)+parseInt(n.nextpage_startpage)+1)),a=n.cache_path+n.cache_id+"/page-"+e+".html"}else a=n.previous_post?n.cache_path+n.cache_id+"/"+n.previous_post_slug+".html":n.cache_path+n.cache_id+"/page-"+(n.page+1)+".html";t.get(a,function(t){n.AjaxLoadMore.success(t,!0)}).fail(function(){n.AjaxLoadMore.ajax("standard")})}},n.AjaxLoadMore.ajax=function(a){var o="alm_query_posts";if(n.acf&&("relationship"!==n.acf_field_type&&(o="alm_acf_query"),n.acf_array={acf:"true",post_id:n.acf_post_id,field_type:n.acf_field_type,field_name:n.acf_field_name}),n.nextpage&&(o="alm_nextpage_query",n.nextpage_array={nextpage:"true",urls:n.nextpage_urls,scroll:n.nextpage_scroll,pageviews:n.nextpage_pageviews,post_id:n.nextpage_post_id,startpage:n.nextpage_startpage}),n.previous_post&&(n.previous_post_array={previous_post:"true",id:n.previous_post_id,slug:n.previous_post_slug}),"true"===n.comments&&(o="alm_comments_query",n.posts_per_page=n.comments_per_page,n.comments_array={comments:"true",post_id:n.comments_post_id,per_page:n.comments_per_page,type:n.comments_type,style:n.comments_style,template:n.comments_template,callback:n.comments_callback}),"true"===n.cta&&(n.cta_array={cta:"true",cta_position:n.cta_position,cta_repeater:n.cta_repeater,cta_theme_repeater:n.cta_theme_repeater}),n.restapi){var r=wp.template(n.restapi_template_id),s=n.restapi_base_url+"/"+n.restapi_namespace+"/"+n.restapi_endpoint,i={posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,slug:n.slug,canonical_url:n.canonical_url,post_type:n.post_type,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),lang:n.lang,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,id:e.attr("data-id")};t.ajax({type:"GET",url:s,data:i,dataType:"JSON",beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(a){var e,o=a.html,s=a.meta,i=s.postcount,l=s.totalposts;t.each(o,function(t){var a=o[t];"true"===n.restapi_debug&&console.log(a),e+=r(a)});var d={html:e,meta:{postcount:i,totalposts:l}};n.AjaxLoadMore.success(d,!1)}})}else t.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:o,query_type:a,nonce:alm_localize.alm_nonce,cache_id:n.cache_id,repeater:n.repeater,theme_repeater:n.theme_repeater,acf:n.acf_array,nextpage:n.nextpage_array,cta:n.cta_array,comments:n.comments_array,post_type:n.post_type,sticky_posts:n.sticky_posts,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),exclude:n.content.attr("data-exclude"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,paging:n.paging,previous_post:n.previous_post_array,lang:n.lang,slug:n.slug,canonical_url:n.canonical_url,id:e.attr("data-id")},beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(e){"standard"===a?n.AjaxLoadMore.success(e,!1):"totalpages"===a&&n.paging&&n.nextpage?t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n):"totalposts"===a&&n.paging&&t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n)},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e)}})},n.paging&&(n.nextpage?n.AjaxLoadMore.ajax("totalpages"):n.AjaxLoadMore.ajax("totalposts")),n.AjaxLoadMore.success=function(e,o){n.previous_post&&n.AjaxLoadMore.getPreviousPost();var r,s,i;if(o?r=e:(r=e.html,s=e.meta,n.posts=n.posts+s.postcount,i=s.postcount,n.totalposts=s.totalposts,"true"===n.preloaded&&(n.totalposts=n.totalposts-n.preloaded_amount)),n.data=t(r),o&&(i=n.data.length),n.init&&(n.paging?i>0&&(n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>'),t(".alm-paging-content",n.el).append(n.data).hide(),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText(),t(".alm-paging-content",n.el).fadeIn(n.speed,"alm_easeInOutQuad",function(){var a=parseInt(n.content.css("padding-top")),e=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+a+e+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)})):n.button.html(n.button_label),0===i&&t.isFunction(t.fn.almEmpty)&&t.fn.almEmpty(n),n.isPaged&&(n.posts_per_page=n.content.attr("data-posts-per-page"),n.page=n.start_page-1)),i>0){if(n.paging)n.init?(n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):t(".alm-paging-content",n.el).html("").append(n.data).almWaitForImages().done(function(){t(".alm-paging-loading",n.el).fadeOut(n.speed),t.isFunction(t.fn.almOnPagingComplete)&&t.fn.almOnPagingComplete(n),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)});else{if(n.previous_post)n.el=t('<div class="alm-reveal alm-previous-post post-'+n.previous_post_id+'" data-id="'+n.previous_post_id+'" data-title="'+n.previous_post_title+'" data-url="'+n.previous_post_permalink+'" data-page="'+n.page+'"/>'),n.el.append(n.data).hide();else if(n.transition_container){var l;if(n.init&&n.start_page>1){var d=[],p=parseInt(n.posts_per_page);"true"===n.cta&&(p+=1);Math.ceil(i/p);for(var c=0;c<i;c+=p)d.push(n.data.slice(c,p+c));n.el=n.content;for(var g=0;g<d.length;g++){var _,m="true"===n.preloaded?1:0;g>0||"true"===n.preloaded?(l=g+1+m,_=t("default"===n.permalink?'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+l+'" data-page="'+l+'" />':'<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+l+"/"+n.search_value+'" data-page="'+l+'" />')):_=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'),_.append(d[g]),_=t(_),n.el.append(_).hide()}}else{if(n.seo&&n.page>0||"true"===n.preloaded){var u="true"===n.preloaded?1:0;l=n.page+1+u,n.seo?"default"===n.permalink?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+"&paged="+l+'" data-page="'+l+'" />'):n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+"page/"+l+"/"+n.search_value+'" data-page="'+l+'" />'):n.el=t('<div class="alm-reveal" />')}else n.seo?n.el=t('<div class="alm-reveal alm-seo" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'):n.el=t('<div class="alm-reveal" />');n.el.append(n.data).hide()}}else n.data.hide(),n.el=n.data;("masonry"!==n.transition||n.init&&!n.is_masonry_preloaded)&&n.content.append(n.el),"fade"===n.transition?"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)}):"masonry"===n.transition?(almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.masonry_animation,n.speed,n.init,a),n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.loading=!1,n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):"none"===n.transition?("true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.show(),n.AjaxLoadMore.triggerAddons(n)}):(n.el.show(),n.AjaxLoadMore.triggerAddons(n)),n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText())):"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}t.isFunction(t.fn.almComplete)&&("true"===n.images_loaded?n.el.almWaitForImages().done(function(){t.fn.almComplete(n)}):t.fn.almComplete(n)),n.cache?i<n.posts_per_page&&n.AjaxLoadMore.triggerDone():n.posts>=n.totalposts&&!n.previous_post&&n.AjaxLoadMore.triggerDone()}else n.paging||(n.button.delay(n.speed).removeClass("loading").addClass("done"),n.AjaxLoadMore.resetBtnText()),n.AjaxLoadMore.triggerDone();if(void 0!==n.destroy_after&&""!==n.destroy_after){var f=n.page+1;n.preload&&f++,f==n.destroy_after&&(n.disable_ajax=!0,n.paging||n.button.delay(n.speed).fadeOut(n.speed))}a=!1,n.init=!1},n.AjaxLoadMore.pagingPreloadedInit=function(a){n.el=t('<div class="alm-reveal"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)},n.AjaxLoadMore.pagingNextpageInit=function(a){n.el=t('<div class="alm-reveal alm-nextpage"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.el.appendTo(n.content),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almSetNextPageVars)&&t.fn.almSetNextPageVars(n),setTimeout(function(){t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap),t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)},200)},n.fetchingPreviousPost=!1,n.AjaxLoadMore.getPreviousPost=function(){n.fetchingPreviousPost=!0;var a={action:"alm_query_previous_post",id:n.previous_post_id,taxonomy:n.previous_post_taxonomy,excluded_terms:n.previous_post_excluded_terms};t.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:a,success:function(a){a.has_previous_post?(n.content.attr("data-previous-post-id",a.prev_id),n.previous_post_id=a.prev_id,n.previous_post_permalink=a.prev_permalink,n.previous_post_title=a.prev_title,n.previous_post_slug=a.prev_slug):a.has_previous_post||n.AjaxLoadMore.triggerDone(),t.isFunction(t.fn.almSetPreviousPost)&&t.fn.almSetPreviousPost(n,a.current_id,a.permalink,a.title),n.fetchingPreviousPost=!1},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e),n.fetchingPreviousPost=!1}})},n.AjaxLoadMore.triggerAddons=function(a){t.isFunction(t.fn.almSEO)&&a.seo&&t.fn.almSEO(a),t.isFunction(t.fn.almSetNextPage)&&t.fn.almSetNextPage(a)},n.AjaxLoadMore.triggerDone=function(){n.loading=!1,n.finished=!0,n.paging||n.button.addClass("done"),t.isFunction(t.fn.almDone)&&setTimeout(function(){t.fn.almDone(n)},n.speed+10)},n.AjaxLoadMore.resetBtnText=function(){!1!==n.button_loading_label&&(n.paging||n.button.html(n.button_label))},n.AjaxLoadMore.error=function(t,a,e){n.loading=!1,n.paging||(n.button.removeClass("loading"),n.AjaxLoadMore.resetBtnText()),console.log(e)},n.paging||n.fetchingPreviousPost||n.button.on("click",function(){"true"===n.pause&&(n.pause=!1,n.pause_override=!1,n.AjaxLoadMore.loadPosts()),n.loading||n.finished||t(this).hasClass("done")||(n.loading=!0,n.page++,n.AjaxLoadMore.loadPosts())}),n.paging&&(n.window.bind("resizeEnd",function(){t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)}),n.window.resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){t(this).trigger("resizeEnd")},250)})),n.AjaxLoadMore.isVisible=function(){return n.visible=!1,n.el.is(":visible")&&(n.visible=!0),n.visible},n.scroll&&!n.paging&&(""!==n.scroll_container&&(n.window=t(n.scroll_container)),n.window.bind("scroll touchstart",function(){if(n.AjaxLoadMore.isVisible()&&!n.fetchingPreviousPost){var t=n.button.offset().top,a=Math.round(t-(n.window.height()-n.scroll_distance)),e=n.window.scrollTop()>=a;""!==n.scroll_container&&(e=n.button.offset().top-(n.window.height()-n.scroll_distance)<n.window.offset().top),!n.loading&&!n.finished&&e&&n.page<n.max_pages-1&&n.proceed&&"true"===n.pause&&"true"===n.pause_override?n.button.trigger("click"):!n.loading&&!n.finished&&e&&n.page<n.max_pages-1&&n.proceed&&"true"!==n.pause&&(n.page++,n.AjaxLoadMore.loadPosts())}})),n.AjaxLoadMore.init=function(){n.paging||n.previous_post||(n.disable_ajax?(n.finished=!0,n.button.addClass("done")):"true"===n.pause?(n.button.html(n.button_label),n.loading=!1):n.AjaxLoadMore.loadPosts()),n.previous_post&&(n.AjaxLoadMore.getPreviousPost(),n.loading=!1),n.nextpage&&t(".alm-nextpage").length>1&&t(".alm-nextpage").length==t(".alm-nextpage").eq(0).data("total-pages")&&n.AjaxLoadMore.triggerDone(),n.window.bind("load",function(){n.is_masonry_preloaded&&almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.masonry_animation,n.speed,!0,!1)})},n.AjaxLoadMore.init(),setTimeout(function(){n.proceed=!0},300),t.fn.almUpdateCurrentPage=function(a,e,o){o.page=a,o.nextpage&&!o.paging&&(o.page=o.page-1);var n="";o.paging_init&&"true"===o.preloaded?(n=t(".alm-preloaded .alm-reveal",o.el).html(),t(".alm-preloaded",o.el).remove(),o.preloaded_amount=0,o.AjaxLoadMore.pagingPreloadedInit(n),o.paging_init=!1,o.init=!1):o.paging_init&&o.nextpage?(n=t(".alm-nextpage",o.el).html(),t(".alm-nextpage",o.el).remove(),o.AjaxLoadMore.pagingNextpageInit(n),o.paging_init=!1,o.init=!1):o.AjaxLoadMore.loadPosts()},t.fn.almGetParentContainer=function(){return n.el.closest("#ajax-load-more")},t.fn.almGetObj=function(){return n},t.fn.almTriggerClick=function(){n.button.trigger("click")},t.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}},t.fn.almFilter=function(a,e,o){o.target?t(".ajax-load-more-wrap[data-id='"+o.target+"']").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)}):t(".ajax-load-more-wrap").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)})},t.fn.almFilterTransition=function(a,o,n,r){"slide"===a?r.slideUp(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"fade"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"masonry"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):(t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n))};var e=function(e,o){t.each(o,function(a,o){a=a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),t(".alm-listing",e).attr("data-"+a,o)}),t.isFunction(t.fn.almFilterComplete)&&t.fn.almFilterComplete(),a=!0,o.target?t(".ajax-load-more-wrap[data-id="+o.target+"]").ajaxloadmore():t(".ajax-load-more-wrap").ajaxloadmore()};t.fn.ajaxloadmore=function(){return this.each(function(a){t(this).data("alm",new t.ajaxloadmore(t(this),a))})},t(".ajax-load-more-wrap").length&&t(".ajax-load-more-wrap").ajaxloadmore()}(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(t){t.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},t.expr[":"]["has-src"]=function(a){return t(a).is('img[src][src!=""]')},t.expr[":"].uncached=function(a){return!!t(a).is(":has-src")&&!a.complete},t.fn.almWaitForImages=function(){var a,e,o,n=0,r=0,s=t.Deferred();if(t.isPlainObject(arguments[0])?(o=arguments[0].waitForAll,e=arguments[0].each,a=arguments[0].finished):1===arguments.length&&"boolean"===t.type(arguments[0])?o=arguments[0]:(a=arguments[0],e=arguments[1],o=arguments[2]),a=a||t.noop,e=e||t.noop,o=!!o,!t.isFunction(a)||!t.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var i=t(this),l=[],d=t.almWaitForImages.hasImageProperties||[],p=t.almWaitForImages.hasImageAttributes||[],c=/url\(\s*(['"]?)(.*?)\1\s*\)/g;o?i.find("*").addBack().each(function(){var a=t(this);a.is("img:has-src")&&l.push({src:a.attr("src"),element:a[0]}),t.each(d,function(t,e){var o,n=a.css(e);if(!n)return!0;for(;o=c.exec(n);)l.push({src:o[2],element:a[0]})}),t.each(p,function(e,o){var n,r=a.attr(o);if(!r)return!0;n=r.split(","),t.each(n,function(e,o){o=t.trim(o).split(" ")[0],l.push({src:o,element:a[0]})})})}):i.find("img:has-src").each(function(){l.push({src:this.src,element:this})}),n=l.length,r=0,0===n&&(a.call(i[0]),s.resolveWith(i[0])),t.each(l,function(o,l){var d=new Image,p="load.almWaitForImages error.almWaitForImages";t(d).one(p,function o(d){var c=[r,n,"load"==d.type];if(r++,e.apply(l.element,c),s.notifyWith(l.element,c),t(this).off(p,o),r==n)return a.call(i[0]),s.resolveWith(i[0]),!1}),d.src=l.src})}),s.promise()}});
1
+ "use strict";var almMasonryInit=!0,almMasonry=function t(a,e,o,n,r,s,i,l){var d=(s+100)/1e3+"s",p="scale(0.5)",c="scale(1)";"zoom-out"===n&&(p="translateY(-20px) scale(1.25)",c="translateY(0) scale(1)"),"slide-up"===n&&(p="translateY(50px)",c="translateY(0)"),"slide-down"===n&&(p="translateY(-50px)",c="translateY(0)"),"none"===n&&(p="translateY(0)",c="translateY(0)"),r="true"===r,l?(a.masonry("destroy"),almMasonryInit=!0,a.append(e),t(a,e,o,n,r,s,!0,!1)):almMasonryInit&&i?(almMasonryInit=!1,a.imagesLoaded(function(){e.fadeIn(s),a.masonry({itemSelector:o,transitionDuration:d,columnWidth:o,horizontalOrder:r,hiddenStyle:{transform:p,opacity:0},visibleStyle:{transform:c,opacity:1}}),a.masonry("reloadItems")})):(a.append(e),a.imagesLoaded(function(){e.show(),a.masonry("appended",e)}))};!function(t){var a=!1;t.ajaxloadmore=function(e,o){"true"===alm_localize.scrolltop&&t(window).scrollTop(0);var n=this;n.AjaxLoadMore={},n.window=t(window),n.page=0,n.posts=0,n.totalposts=0,n.proceed=!1,n.disable_ajax=!1,n.init=!0,n.loading=!0,n.finished=!1,n.button_label="",n.el=e,n.container=e,n.container.addClass("alm-"+o).attr("data-alm-id",o),n.content=t(".alm-ajax",n.container),n.content_preloaded=t(".alm-listing.alm-preloaded",n.container),n.canonical_url=n.el.attr("data-canonical-url"),n.is_search=n.el.attr("data-search"),n.slug=n.el.attr("data-slug"),n.post_id=n.el.attr("data-post-id"),n.prefix="alm-",n.cache=n.content.attr("data-cache"),n.cache_id=n.content.attr("data-cache-id"),n.cache_path=n.content.attr("data-cache-path"),n.cache_logged_in=n.content.attr("data-cache-logged-in"),n.repeater=n.content.attr("data-repeater"),n.theme_repeater=n.content.attr("data-theme-repeater"),n.scroll_distance=parseInt(n.content.attr("data-scroll-distance")),n.scroll_container=n.content.attr("data-scroll-container"),n.max_pages=parseInt(n.content.attr("data-max-pages")),n.pause_override=n.content.attr("data-pause-override"),n.pause=n.content.attr("data-pause"),n.transition=n.content.attr("data-transition"),n.transition_container=n.content.attr("data-transition-container"),n.tcc=n.content.attr("data-transition-container-classes"),n.speed=n.content.attr("data-transition-speed"),n.images_loaded=n.content.attr("data-images-loaded"),n.destroy_after=n.content.attr("data-destroy-after"),n.lang=n.content.attr("data-lang"),n.orginal_posts_per_page=n.content.attr("data-posts-per-page"),n.posts_per_page=n.content.attr("data-posts-per-page"),n.cta_array="",n.cta=n.content.attr("data-cta"),n.cta_position=n.content.attr("data-cta-position"),n.cta_repeater=n.content.attr("data-cta-repeater"),n.cta_theme_repeater=n.content.attr("data-cta-theme-repeater"),n.acf_array="",n.acf=n.content.attr("data-acf"),n.acf_field_type=n.content.attr("data-acf-field-type"),n.acf_field_name=n.content.attr("data-acf-field-name"),n.acf_post_id=n.content.attr("data-acf-post-id"),n.nextpage_array="",n.nextpage=n.content.attr("data-nextpage"),n.nextpage_urls=n.content.attr("data-nextpage-urls"),n.nextpage_scroll=n.content.attr("data-nextpage-scroll"),n.nextpage_pageviews=n.content.attr("data-nextpage-pageviews"),n.nextpage_post_id=n.content.attr("data-nextpage-post-id"),n.nextpage_startpage=n.content.attr("data-nextpage-startpage"),n.previous_post=n.content.attr("data-previous-post"),n.previous_post_id=n.content.attr("data-previous-post-id"),n.previous_post_taxonomy=n.content.attr("data-previous-post-taxonomy"),n.previous_post_excluded_terms=n.content.attr("data-previous-post-excluded-terms"),n.comments=n.content.attr("data-comments"),"true"===n.comments&&(n.content=t(".alm-comments",n.container)),n.comments_array="",n.comments_post_id=n.content.attr("data-comments_post_id"),n.comments_per_page=n.content.attr("data-comments_per_page"),n.comments_type=n.content.attr("data-comments_type"),n.comments_style=n.content.attr("data-comments_style"),n.comments_template=n.content.attr("data-comments_template"),n.comments_callback=n.content.attr("data-comments_callback"),n.restapi=n.content.attr("data-restapi"),n.restapi_base_url=n.content.attr("data-restapi-base-url"),n.restapi_namespace=n.content.attr("data-restapi-namespace"),n.restapi_endpoint=n.content.attr("data-restapi-endpoint"),n.restapi_template_id=n.content.attr("data-restapi-template-id"),n.restapi_debug=n.content.attr("data-restapi-debug"),n.seo=n.content.attr("data-seo"),n.preloaded=n.content.attr("data-preloaded"),n.preloaded_amount=n.content.attr("data-preloaded-amount"),n.paging=n.content.attr("data-paging"),n.paging_controls=n.content.attr("data-paging-controls"),n.paging_show_at_most=n.content.attr("data-paging-show-at-most"),n.paging_classes=n.content.attr("data-paging-classes"),n.paging_init=!0,"true"===n.restapi?(n.restapi=!0,void 0===n.restapi_debug&&(n.restapi_debug=!1),""===n.restapi_template_id&&(n.restapi=!1)):n.restapi=!1,"true"===n.paging?(n.paging=!0,void 0===n.paging_show_at_most&&(n.paging_show_at_most=7),"true"===n.preloaded&&(n.pause=!0)):n.paging=!1,"true"===n.paging_controls?n.paging_controls=!0:n.paging_controls=!1,void 0===n.cache&&(n.cache=!1),void 0===n.cache_logged_in&&(n.cache_logged_in=!1),void 0===n.comments_per_page&&(n.comments_per_page="5"),"true"===n.preloaded?(n.preload_wrap=n.content.prev(".alm-preloaded"),n.preloaded_total_posts=parseInt(n.preload_wrap.attr("data-total-posts")),void 0===n.preloaded_amount&&(n.preloaded_amount=!1),n.preloaded_total_posts<=n.preloaded_amount&&(n.disable_ajax=!0)):n.preloaded="false",void 0===n.seo&&(n.seo=!1),"true"===n.seo&&(n.seo=!0),void 0===n.is_search&&(n.is_search=!1),n.search_value="true"===n.is_search?n.slug:"",n.permalink=n.content.attr("data-seo-permalink"),n.pageview=n.content.attr("data-seo-pageview"),n.start_page=n.content.attr("data-seo-start-page"),n.trailing_slash="false"===n.content.attr("data-seo-trailing-slash")?"":"/",n.start_page?(n.seo_scroll=n.content.attr("data-seo-scroll"),n.seo_scroll_speed=n.content.attr("data-seo-scroll-speed"),n.seo_scrolltop=n.content.attr("data-seo-scrolltop"),n.isPaged=!1,n.start_page>1&&(n.isPaged=!0,n.posts_per_page=n.start_page*n.posts_per_page),n.paging&&(n.posts_per_page=n.orginal_posts_per_page)):n.start_page=1,"true"===n.nextpage?(n.nextpage=!0,n.posts_per_page=1):n.nextpage=!1,void 0===n.nextpage_urls&&(n.nextpage="true"),void 0===n.nextpage_scroll&&(n.nextpage_scroll="250:30"),void 0===n.nextpage_pageviews&&(n.nextpage_pageviews="true"),void 0===n.nextpage_post_id&&(n.nextpage=!1,n.nextpage_post_id=null),void 0===n.nextpage_startpage&&(n.nextpage_startpage=1),n.nextpage_startpage>1&&(n.isPaged=!0),"true"===n.acf?n.acf=!0:n.acf=!1,void 0!==n.acf_field_type&&void 0!==n.acf_field_name&&void 0!==n.acf_post_id||(n.acf=!1),"true"===n.previous_post?(n.previous_post=!0,n.previous_post_permalink="",n.previous_post_title="",n.previous_post_slug=""):n.previous_post=!1,void 0===n.previous_post_id&&(n.previous_post_id=""),void 0===n.previous_post_taxonomy&&(n.previous_post_taxonomy=""),void 0===n.previous_post_excluded_terms&&(n.previous_post_excluded_terms=""),n.previous_post_title_template=n.content.attr("data-previous-post-title-template"),n.siteTitle=n.content.attr("data-previous-post-site-title"),n.siteTagline=n.content.attr("data-previous-post-site-tagline"),n.previous_post_pageview=n.content.attr("data-previous-post-pageview"),n.previous_post_scroll=n.content.attr("data-previous-post-scroll"),n.previous_post_scroll_speed=n.content.attr("data-previous-post-scroll-speed"),n.previous_post_scroll_top=n.content.attr("data-previous-post-scrolltop"),void 0===n.content.attr("data-offset")?n.offset=0:n.offset=n.content.attr("data-offset"),(void 0===n.pause||n.seo&&n.start_page>1)&&(n.pause=!1),"true"===n.preloaded&&n.seo&&n.start_page>0&&(n.pause=!1),"true"===n.preloaded&&n.paging&&(n.pause=!0),void 0===n.repeater&&(n.repeater="default"),void 0===n.theme_repeater&&(n.theme_repeater="null"),void 0===n.max_pages&&(n.max_pages=0),0===n.max_pages&&(n.max_pages=1e4),void 0===n.scroll_distance&&(n.scroll_distance=150),void 0===n.scroll_container&&(n.scroll_container=""),void 0===n.transition&&(n.transition="slide"),void 0===n.tcc&&(n.tcc=""),n.is_masonry_preloaded=!1,"masonry"===n.transition&&(n.masonry_selector=n.content.attr("data-masonry-selector"),n.masonry_animation=n.content.attr("data-masonry-animation"),n.masonry_horizontalorder=n.content.attr("data-masonry-horizontalorder"),void 0===n.masonry_animation&&(n.masonry_animation="standard"),void 0===n.masonry_horizontalorder&&(n.masonry_horizontalorder="true"),n.masonry_wrap=n.content,n.transition_container=!1,document.body.contains(n.content_preloaded.get(0))&&(n.masonry_wrap=n.content_preloaded,n.is_masonry_preloaded=!0)),void 0===n.speed?n.speed=250:n.speed=parseInt(n.speed),void 0===n.transition_container||"true"===n.transition_container?n.transition_container=!0:n.transition_container=!1,void 0===n.images_loaded&&(n.images_loaded="false"),n.destroy_after,void 0===n.content.attr("data-button-label")?n.button_label="Older Posts":n.button_label=n.content.attr("data-button-label"),n.button_loading_label=n.content.attr("data-button-loading-label"),void 0===n.button_loading_label&&(n.button_loading_label=!1),void 0===n.content.attr("data-button-class")?n.button_class="":n.button_class=" "+n.content.attr("data-button-class"),void 0===n.content.attr("data-scroll")?n.scroll=!0:"false"===n.content.attr("data-scroll")?n.scroll=!1:n.scroll=!0,n.post_type=n.content.attr("data-post-type"),n.post_type=n.post_type.split(","),n.sticky_posts=n.content.attr("data-sticky-posts"),n.container.append('<div class="'+n.prefix+'btn-wrap"/>'),n.btnWrap=t("."+n.prefix+"btn-wrap",n.container),n.paging?n.content.parent().addClass("loading"):(t("."+n.prefix+"btn-wrap",n.container).append('<button id="load-more" class="'+n.prefix+"load-more-btn more"+n.button_class+'">'+n.button_label+"</button>"),n.button=t(".alm-load-more-btn",n.container)),n.AjaxLoadMore.loadPosts=function(){if(!n.disable_ajax)if(n.paging||(n.button.addClass("loading"),!1!==n.button_loading_label&&n.button.html(n.button_loading_label)),n.container.addClass("alm-loading"),n.loading=!0,"true"!==n.cache||n.cache_logged_in)n.AjaxLoadMore.ajax("standard");else{var a;if(n.init&&n.seo&&n.isPaged){a=n.cache_path+n.cache_id+"/page-1-"+n.start_page+".html"}else if(n.nextpage){var e;n.paging?e=parseInt(n.page)+1:(e=parseInt(n.page)+2,n.isPaged&&(e=parseInt(n.page)+parseInt(n.nextpage_startpage)+1)),a=n.cache_path+n.cache_id+"/page-"+e+".html"}else a=n.previous_post?n.cache_path+n.cache_id+"/"+n.previous_post_slug+".html":n.cache_path+n.cache_id+"/page-"+(n.page+1)+".html";t.get(a,function(t){n.AjaxLoadMore.success(t,!0)}).fail(function(){n.AjaxLoadMore.ajax("standard")})}},n.AjaxLoadMore.ajax=function(a){var o="alm_query_posts";if(n.acf&&("relationship"!==n.acf_field_type&&(o="alm_acf_query"),n.acf_array={acf:"true",post_id:n.acf_post_id,field_type:n.acf_field_type,field_name:n.acf_field_name}),n.nextpage&&(o="alm_nextpage_query",n.nextpage_array={nextpage:"true",urls:n.nextpage_urls,scroll:n.nextpage_scroll,pageviews:n.nextpage_pageviews,post_id:n.nextpage_post_id,startpage:n.nextpage_startpage}),n.previous_post&&(n.previous_post_array={previous_post:"true",id:n.previous_post_id,slug:n.previous_post_slug}),"true"===n.comments&&(o="alm_comments_query",n.posts_per_page=n.comments_per_page,n.comments_array={comments:"true",post_id:n.comments_post_id,per_page:n.comments_per_page,type:n.comments_type,style:n.comments_style,template:n.comments_template,callback:n.comments_callback}),"true"===n.cta&&(n.cta_array={cta:"true",cta_position:n.cta_position,cta_repeater:n.cta_repeater,cta_theme_repeater:n.cta_theme_repeater}),n.restapi){var r=wp.template(n.restapi_template_id),s=n.restapi_base_url+"/"+n.restapi_namespace+"/"+n.restapi_endpoint,i={posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,slug:n.slug,canonical_url:n.canonical_url,post_type:n.post_type,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),lang:n.lang,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,id:e.attr("data-id")};t.ajax({type:"GET",url:s,data:i,dataType:"JSON",beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(a){var e,o=a.html,s=a.meta,i=s.postcount,l=s.totalposts;t.each(o,function(t){var a=o[t];"true"===n.restapi_debug&&console.log(a),e+=r(a)});var d={html:e,meta:{postcount:i,totalposts:l}};n.AjaxLoadMore.success(d,!1)}})}else t.ajax({type:"GET",url:alm_localize.ajaxurl,dataType:"JSON",data:{action:o,query_type:a,nonce:alm_localize.alm_nonce,cache_id:n.cache_id,cache_logged_in:n.cache_logged_in,repeater:n.repeater,theme_repeater:n.theme_repeater,acf:n.acf_array,nextpage:n.nextpage_array,cta:n.cta_array,comments:n.comments_array,post_type:n.post_type,sticky_posts:n.sticky_posts,post_format:n.content.attr("data-post-format"),category:n.content.attr("data-category"),category__not_in:n.content.attr("data-category-not-in"),tag:n.content.attr("data-tag"),tag__not_in:n.content.attr("data-tag-not-in"),taxonomy:n.content.attr("data-taxonomy"),taxonomy_terms:n.content.attr("data-taxonomy-terms"),taxonomy_operator:n.content.attr("data-taxonomy-operator"),taxonomy_relation:n.content.attr("data-taxonomy-relation"),meta_key:n.content.attr("data-meta-key"),meta_value:n.content.attr("data-meta-value"),meta_compare:n.content.attr("data-meta-compare"),meta_relation:n.content.attr("data-meta-relation"),meta_type:n.content.attr("data-meta-type"),author:n.content.attr("data-author"),year:n.content.attr("data-year"),month:n.content.attr("data-month"),day:n.content.attr("data-day"),post_status:n.content.attr("data-post-status"),order:n.content.attr("data-order"),orderby:n.content.attr("data-orderby"),post__in:n.content.attr("data-post-in"),post__not_in:n.content.attr("data-post-not-in"),exclude:n.content.attr("data-exclude"),search:n.content.attr("data-search"),custom_args:n.content.attr("data-custom-args"),posts_per_page:n.posts_per_page,page:n.page,offset:n.offset,preloaded:n.preloaded,preloaded_amount:n.preloaded_amount,seo_start_page:n.start_page,paging:n.paging,previous_post:n.previous_post_array,lang:n.lang,slug:n.slug,canonical_url:n.canonical_url,id:e.attr("data-id")},beforeSend:function(){1==n.page||n.paging||n.button.addClass("loading")},success:function(e){"standard"===a?n.AjaxLoadMore.success(e,!1):"totalpages"===a&&n.paging&&n.nextpage?t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n):"totalposts"===a&&n.paging&&t.isFunction(t.fn.almBuildPagination)&&t.fn.almBuildPagination(e,n)},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e)}})},n.paging&&(n.nextpage?n.AjaxLoadMore.ajax("totalpages"):n.AjaxLoadMore.ajax("totalposts")),n.AjaxLoadMore.success=function(e,o){n.previous_post&&n.AjaxLoadMore.getPreviousPost();var r,s,i;if(o?r=e:(r=e.html,s=e.meta,n.posts=n.posts+s.postcount,i=s.postcount,n.totalposts=s.totalposts,"true"===n.preloaded&&(n.totalposts=n.totalposts-n.preloaded_amount)),n.data=t(r),o&&(i=n.data.length),n.init&&(n.paging?i>0&&(n.el=t('<div class="alm-reveal'+n.tcc+'"/>'),n.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>'),t(".alm-paging-content",n.el).append(n.data).hide(),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText(),t(".alm-paging-content",n.el).fadeIn(n.speed,"alm_easeInOutQuad",function(){var a=parseInt(n.content.css("padding-top")),e=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+a+e+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)})):n.button.html(n.button_label),0===i&&t.isFunction(t.fn.almEmpty)&&t.fn.almEmpty(n),n.isPaged&&(n.posts_per_page=n.content.attr("data-posts-per-page"),n.page=n.start_page-1)),i>0){if(n.paging)n.init?(n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):t(".alm-paging-content",n.el).html("").append(n.data).almWaitForImages().done(function(){t(".alm-paging-loading",n.el).fadeOut(n.speed),t.isFunction(t.fn.almOnPagingComplete)&&t.fn.almOnPagingComplete(n),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)});else{if(n.previous_post)n.el=t('<div class="alm-reveal alm-previous-post post-'+n.previous_post_id+'" data-id="'+n.previous_post_id+'" data-title="'+n.previous_post_title+'" data-url="'+n.previous_post_permalink+'" data-page="'+n.page+'"/>'),n.el.append(n.data).hide();else if(n.transition_container){var l;if(n.init&&n.start_page>1){var d=[],p=parseInt(n.posts_per_page);"true"===n.cta&&(p+=1);Math.ceil(i/p);for(var c=0;c<i;c+=p)d.push(n.data.slice(c,p+c));n.el=n.content;for(var g=0;g<d.length;g++){var _,m="true"===n.preloaded?1:0;g>0||"true"===n.preloaded?(l=g+1+m,_=t("default"===n.permalink?'<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+n.search_value+"&paged="+l+'" data-page="'+l+'" />':'<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+"page/"+l+n.trailing_slash+n.search_value+'" data-page="'+l+'" />')):_=t('<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'),_.append(d[g]),_=t(_),n.el.append(_).hide()}}else{if(n.seo&&n.page>0||"true"===n.preloaded){var u="true"===n.preloaded?1:0;l=n.page+1+u,n.seo?"default"===n.permalink?n.el=t('<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+n.search_value+"&paged="+l+'" data-page="'+l+'" />'):n.el=t('<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+"page/"+l+n.trailing_slash+n.search_value+'" data-page="'+l+'" />'):n.el=t('<div class="alm-reveal'+n.tcc+'" />')}else n.seo?n.el=t('<div class="alm-reveal alm-seo'+n.tcc+'" data-url="'+n.canonical_url+n.search_value+'" data-page="1" />'):n.el=t('<div class="alm-reveal'+n.tcc+'" />');n.el.append(n.data).hide()}}else n.data.hide(),n.el=n.data;("masonry"!==n.transition||n.init&&!n.is_masonry_preloaded)&&n.content.append(n.el),"fade"===n.transition?"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.fadeIn(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)}):"masonry"===n.transition?(almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.masonry_animation,n.masonry_horizontalorder,n.speed,n.init,a),n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.loading=!1,n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)):"none"===n.transition?("true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.show(),n.AjaxLoadMore.triggerAddons(n)}):(n.el.show(),n.AjaxLoadMore.triggerAddons(n)),n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText())):"true"===n.images_loaded?n.el.almWaitForImages().done(function(){n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}):n.el.slideDown(n.speed,"alm_easeInOutQuad",function(){n.loading=!1,n.paging||(n.button.delay(n.speed).removeClass("loading"),n.AjaxLoadMore.resetBtnText()),n.container.removeClass("alm-loading"),n.AjaxLoadMore.triggerAddons(n)})}t.isFunction(t.fn.almComplete)&&("true"===n.images_loaded?n.el.almWaitForImages().done(function(){t.fn.almComplete(n)}):t.fn.almComplete(n)),n.cache?i<n.posts_per_page&&n.AjaxLoadMore.triggerDone():n.posts>=n.totalposts&&!n.previous_post&&n.AjaxLoadMore.triggerDone()}else n.paging||(n.button.delay(n.speed).removeClass("loading").addClass("done"),n.AjaxLoadMore.resetBtnText()),n.AjaxLoadMore.triggerDone();if(void 0!==n.destroy_after&&""!==n.destroy_after){var f=n.page+1;n.preload&&f++,f==n.destroy_after&&(n.disable_ajax=!0,n.paging||(n.button.delay(n.speed).fadeOut(n.speed),t.isFunction(t.fn.almDestroyed)&&t.fn.almDestroyed(n)))}a=!1,n.init=!1},n.AjaxLoadMore.pagingPreloadedInit=function(a){n.el=t('<div class="alm-reveal'+n.tcc+'"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.content.append(n.el),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap)},n.AjaxLoadMore.pagingNextpageInit=function(a){n.el=t('<div class="alm-reveal alm-nextpage"/>'),n.el.append('<div class="alm-paging-content">'+a+'</div><div class="alm-paging-loading"></div>'),n.el.appendTo(n.content),n.content.parent().removeClass("loading"),n.AjaxLoadMore.resetBtnText();var e=parseInt(n.content.css("padding-top")),o=parseInt(n.content.css("padding-bottom"));n.content.css("height",n.el.height()+e+o+"px"),t.isFunction(t.fn.almSetNextPageVars)&&t.fn.almSetNextPageVars(n),setTimeout(function(){t.isFunction(t.fn.almFadePageControls)&&t.fn.almFadePageControls(n.btnWrap),t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)},200)},n.fetchingPreviousPost=!1,n.AjaxLoadMore.getPreviousPost=function(){n.fetchingPreviousPost=!0;var a={action:"alm_query_previous_post",id:n.previous_post_id,taxonomy:n.previous_post_taxonomy,excluded_terms:n.previous_post_excluded_terms};t.ajax({type:"GET",dataType:"JSON",url:alm_localize.ajaxurl,data:a,success:function(a){a.has_previous_post?(n.content.attr("data-previous-post-id",a.prev_id),n.previous_post_id=a.prev_id,n.previous_post_permalink=a.prev_permalink,n.previous_post_title=a.prev_title,n.previous_post_slug=a.prev_slug):a.has_previous_post||n.AjaxLoadMore.triggerDone(),t.isFunction(t.fn.almSetPreviousPost)&&t.fn.almSetPreviousPost(n,a.current_id,a.permalink,a.title),n.fetchingPreviousPost=!1},error:function(t,a,e){n.AjaxLoadMore.error(t,a,e),n.fetchingPreviousPost=!1}})},n.AjaxLoadMore.triggerAddons=function(a){t.isFunction(t.fn.almSEO)&&a.seo&&t.fn.almSEO(a),t.isFunction(t.fn.almSetNextPage)&&t.fn.almSetNextPage(a)},n.AjaxLoadMore.triggerDone=function(){n.loading=!1,n.finished=!0,n.paging||n.button.addClass("done"),t.isFunction(t.fn.almDone)&&setTimeout(function(){t.fn.almDone(n)},n.speed+10)},n.AjaxLoadMore.resetBtnText=function(){!1!==n.button_loading_label&&(n.paging||n.button.html(n.button_label))},n.AjaxLoadMore.error=function(t,a,e){n.loading=!1,n.paging||(n.button.removeClass("loading"),n.AjaxLoadMore.resetBtnText()),console.log(e)},n.paging||n.fetchingPreviousPost||n.button.on("click",function(){"true"===n.pause&&(n.pause=!1,n.pause_override=!1,n.AjaxLoadMore.loadPosts()),n.loading||n.finished||t(this).hasClass("done")||(n.loading=!0,n.page++,n.AjaxLoadMore.loadPosts())}),n.paging&&(n.window.bind("resizeEnd",function(){t.isFunction(t.fn.almOnWindowResize)&&t.fn.almOnWindowResize(n)}),n.window.resize(function(){this.resizeTO&&clearTimeout(this.resizeTO),this.resizeTO=setTimeout(function(){t(this).trigger("resizeEnd")},250)})),n.AjaxLoadMore.isVisible=function(){return n.visible=!1,n.el.is(":visible")&&(n.visible=!0),n.visible},n.scroll&&!n.paging&&(""!==n.scroll_container&&(n.window=t(n.scroll_container)),n.window.bind("scroll touchstart",function(){if(n.AjaxLoadMore.isVisible()&&!n.fetchingPreviousPost){var t=n.button.offset().top,a=Math.round(t-(n.window.height()-n.scroll_distance)),e=n.window.scrollTop()>=a;""!==n.scroll_container&&(e=n.button.offset().top-(n.window.height()-n.scroll_distance)<n.window.offset().top),!n.loading&&!n.finished&&e&&n.page<n.max_pages-1&&n.proceed&&"true"===n.pause&&"true"===n.pause_override?n.button.trigger("click"):!n.loading&&!n.finished&&e&&n.page<n.max_pages-1&&n.proceed&&"true"!==n.pause&&(n.page++,n.AjaxLoadMore.loadPosts())}})),n.AjaxLoadMore.init=function(){n.paging||n.previous_post||(n.disable_ajax?(n.finished=!0,n.button.addClass("done")):"true"===n.pause?(n.button.html(n.button_label),n.loading=!1):n.AjaxLoadMore.loadPosts()),n.previous_post&&(n.AjaxLoadMore.getPreviousPost(),n.loading=!1),n.nextpage&&t(".alm-nextpage").length>1&&t(".alm-nextpage").length==t(".alm-nextpage").eq(0).data("total-pages")&&n.AjaxLoadMore.triggerDone(),n.window.bind("load",function(){n.is_masonry_preloaded&&almMasonry(n.masonry_wrap,n.el,n.masonry_selector,n.masonry_animation,n.masonry_horizontalorder,n.speed,!0,!1)})},n.AjaxLoadMore.init(),setTimeout(function(){n.proceed=!0},300),t.fn.almUpdateCurrentPage=function(a,e,o){o.page=a,o.nextpage&&!o.paging&&(o.page=o.page-1);var n="";o.paging_init&&"true"===o.preloaded?(n=t(".alm-preloaded .alm-reveal",o.el).html(),t(".alm-preloaded",o.el).remove(),o.preloaded_amount=0,o.AjaxLoadMore.pagingPreloadedInit(n),o.paging_init=!1,o.init=!1):o.paging_init&&o.nextpage?(n=t(".alm-nextpage",o.el).html(),t(".alm-nextpage",o.el).remove(),o.AjaxLoadMore.pagingNextpageInit(n),o.paging_init=!1,o.init=!1):o.AjaxLoadMore.loadPosts()},t.fn.almGetParentContainer=function(){return n.el.closest("#ajax-load-more")},t.fn.almGetObj=function(){return n},t.fn.almTriggerClick=function(){n.button.trigger("click")},t.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}},t.fn.almFilter=function(a,e,o){o.target?t(".ajax-load-more-wrap[data-id='"+o.target+"']").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)}):t(".ajax-load-more-wrap").each(function(n){var r=t(this);t.fn.almFilterTransition(a,e,o,r)})},t.fn.almFilterTransition=function(a,o,n,r){"slide"===a?r.slideUp(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"fade"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):"masonry"===a?r.fadeOut(o,function(){t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n)}):(t(".alm-listing",r).html(""),t(".alm-btn-wrap",r).remove(),r.fadeIn(o),e(r,n))};var e=function(e,o){t.each(o,function(a,o){a=a.replace(/\W+/g,"-").replace(/([a-z\d])([A-Z])/g,"$1-$2"),t(".alm-listing",e).attr("data-"+a,o)}),t.isFunction(t.fn.almFilterComplete)&&t.fn.almFilterComplete(),a=!0,o.target?t(".ajax-load-more-wrap[data-id="+o.target+"]").ajaxloadmore():t(".ajax-load-more-wrap").ajaxloadmore()};t.fn.ajaxloadmore=function(){return this.each(function(a){t(this).data("alm",new t.ajaxloadmore(t(this),a))})},t(".ajax-load-more-wrap").length&&t(".ajax-load-more-wrap").ajaxloadmore()}(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(t){t.almWaitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"],hasImageAttributes:["srcset"]},t.expr[":"]["has-src"]=function(a){return t(a).is('img[src][src!=""]')},t.expr[":"].uncached=function(a){return!!t(a).is(":has-src")&&!a.complete},t.fn.almWaitForImages=function(){var a,e,o,n=0,r=0,s=t.Deferred();if(t.isPlainObject(arguments[0])?(o=arguments[0].waitForAll,e=arguments[0].each,a=arguments[0].finished):1===arguments.length&&"boolean"===t.type(arguments[0])?o=arguments[0]:(a=arguments[0],e=arguments[1],o=arguments[2]),a=a||t.noop,e=e||t.noop,o=!!o,!t.isFunction(a)||!t.isFunction(e))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var i=t(this),l=[],d=t.almWaitForImages.hasImageProperties||[],p=t.almWaitForImages.hasImageAttributes||[],c=/url\(\s*(['"]?)(.*?)\1\s*\)/g;o?i.find("*").addBack().each(function(){var a=t(this);a.is("img:has-src")&&l.push({src:a.attr("src"),element:a[0]}),t.each(d,function(t,e){var o,n=a.css(e);if(!n)return!0;for(;o=c.exec(n);)l.push({src:o[2],element:a[0]})}),t.each(p,function(e,o){var n,r=a.attr(o);if(!r)return!0;n=r.split(","),t.each(n,function(e,o){o=t.trim(o).split(" ")[0],l.push({src:o,element:a[0]})})})}):i.find("img:has-src").each(function(){l.push({src:this.src,element:this})}),n=l.length,r=0,0===n&&(a.call(i[0]),s.resolveWith(i[0])),t.each(l,function(o,l){var d=new Image,p="load.almWaitForImages error.almWaitForImages";t(d).one(p,function o(d){var c=[r,n,"load"==d.type];if(r++,e.apply(l.element,c),s.notifyWith(l.element,c),t(this).off(p,o),r==n)return a.call(i[0]),s.resolveWith(i[0]),!1}),d.src=l.src})}),s.promise()}});
core/src/js/ajax-load-more.js CHANGED
@@ -14,7 +14,7 @@
14
  (function ($) {
15
  "use strict";
16
 
17
- var alm_is_filtering = false; // Global Masonry var
18
 
19
  $.ajaxloadmore = function (el, e) {
20
 
@@ -24,7 +24,7 @@
24
  }
25
 
26
  //Set variables
27
- var alm = this;
28
  alm.AjaxLoadMore = {};
29
  alm.window = $(window);
30
  alm.page = 0;
@@ -60,8 +60,9 @@
60
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
61
  alm.pause_override = alm.content.attr('data-pause-override'); // true | false
62
  alm.pause = alm.content.attr('data-pause'); // true | false
63
- alm.transition = alm.content.attr('data-transition');
64
- alm.transition_container = alm.content.attr('data-transition-container');
 
65
  alm.speed = alm.content.attr('data-transition-speed');
66
  alm.images_loaded = alm.content.attr('data-images-loaded');
67
  alm.destroy_after = alm.content.attr('data-destroy-after');
@@ -199,7 +200,7 @@
199
  /* SEO */
200
  if (alm.seo === undefined){
201
  alm.seo = false;
202
- }
203
  if (alm.seo === 'true'){
204
  alm.seo = true; // Convert string to boolean
205
  }
@@ -211,6 +212,7 @@
211
  alm.permalink = alm.content.attr('data-seo-permalink');
212
  alm.pageview = alm.content.attr('data-seo-pageview');
213
  alm.start_page = alm.content.attr('data-seo-start-page');
 
214
 
215
  if(alm.start_page){
216
 
@@ -363,13 +365,20 @@
363
  if (alm.transition === undefined){
364
  alm.transition = 'slide';
365
  }
 
 
 
366
 
367
  alm.is_masonry_preloaded = false;
368
  if(alm.transition === 'masonry'){
369
  alm.masonry_selector = alm.content.attr('data-masonry-selector');
370
  alm.masonry_animation = alm.content.attr('data-masonry-animation');
 
371
  if (alm.masonry_animation === undefined){
372
  alm.masonry_animation = 'standard';
 
 
 
373
  }
374
  alm.masonry_wrap = alm.content;
375
  alm.transition_container = false;
@@ -449,13 +458,11 @@
449
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
450
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
451
 
452
- if(alm.paging){
453
 
454
- // Paging add-on
 
455
  alm.content.parent().addClass('loading'); // add loading class to main container
456
-
457
  }else{
458
-
459
  // If paging is false
460
  $('.'+ alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more'+ alm.button_class +'">' + alm.button_label + '</button>');
461
  alm.button = $('.alm-load-more-btn', alm.container);
@@ -696,7 +703,6 @@
696
  }
697
  });
698
  }
699
-
700
  // Standard ALM
701
  else {
702
  $.ajax({
@@ -708,6 +714,7 @@
708
  query_type : queryType,
709
  nonce : alm_localize.alm_nonce,
710
  cache_id : alm.cache_id,
 
711
  repeater : alm.repeater,
712
  theme_repeater : alm.theme_repeater,
713
  acf : alm.acf_array,
@@ -852,7 +859,7 @@
852
 
853
  // Is pagination
854
  if (total > 0) {
855
- alm.el = $('<div class="alm-reveal"/>');
856
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
857
  $('.alm-paging-content', alm.el).append(alm.data).hide();
858
  alm.content.append(alm.el);
@@ -884,7 +891,7 @@
884
  }
885
 
886
  }
887
-
888
 
889
  if (total > 0) {
890
 
@@ -933,12 +940,12 @@
933
  if(k > 0 || alm.preloaded === 'true'){ // > Paged
934
  pagenum = (k + 1 + p);
935
  if(alm.permalink === 'default'){
936
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
937
  }else{
938
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
939
  }
940
  }else{ // First Page
941
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
942
  }
943
 
944
  div.append(seo_data[k]);
@@ -960,23 +967,23 @@
960
 
961
  if(alm.seo){
962
  if(alm.permalink === 'default'){
963
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
964
  }else{
965
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/'+ alm.search_value +'" data-page="'+ pagenum +'" />');
966
  }
967
  }else{
968
  // Basic ALM
969
- alm.el = $('<div class="alm-reveal" />');
970
  }
971
 
972
  }else{
973
 
974
  if(alm.seo){
975
  // SEO [Page 1]
976
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
977
  }else{
978
  // Basic ALM
979
- alm.el = $('<div class="alm-reveal" />');
980
  }
981
 
982
  }
@@ -1020,7 +1027,7 @@
1020
 
1021
  }else if(alm.transition === 'masonry') { // masonry
1022
 
1023
- almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.speed, alm.init, alm_is_filtering);
1024
 
1025
 
1026
  if(!alm.paging){
@@ -1114,7 +1121,7 @@
1114
  if(alm.posts >= alm.totalposts && !alm.previous_post){
1115
  alm.AjaxLoadMore.triggerDone();
1116
  }
1117
- }else{ // Cache
1118
  if(total < alm.posts_per_page){
1119
  alm.AjaxLoadMore.triggerDone();
1120
  }
@@ -1122,7 +1129,7 @@
1122
  // End ALM Done
1123
 
1124
 
1125
- } else {
1126
 
1127
  // No Results!
1128
  if(!alm.paging){
@@ -1144,6 +1151,9 @@
1144
  alm.disable_ajax = true;
1145
  if(!alm.paging){
1146
  alm.button.delay(alm.speed).fadeOut(alm.speed);
 
 
 
1147
  }
1148
  }
1149
  }
@@ -1167,7 +1177,7 @@
1167
  */
1168
  alm.AjaxLoadMore.pagingPreloadedInit = function(data){
1169
 
1170
- alm.el = $('<div class="alm-reveal"/>');
1171
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1172
  alm.content.append(alm.el);
1173
  alm.content.parent().removeClass('loading'); // Remove loading class from main container
@@ -1499,7 +1509,7 @@
1499
  // Masonry + Preloaded
1500
  alm.window.bind('load', function(){
1501
  if(alm.is_masonry_preloaded){
1502
- almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.speed, true, false);
1503
  }
1504
  });
1505
 
14
  (function ($) {
15
  "use strict";
16
 
17
+ let alm_is_filtering = false; // Global Masonry var
18
 
19
  $.ajaxloadmore = function (el, e) {
20
 
24
  }
25
 
26
  //Set variables
27
+ let alm = this;
28
  alm.AjaxLoadMore = {};
29
  alm.window = $(window);
30
  alm.page = 0;
60
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
61
  alm.pause_override = alm.content.attr('data-pause-override'); // true | false
62
  alm.pause = alm.content.attr('data-pause'); // true | false
63
+ alm.transition = alm.content.attr('data-transition'); // Transition
64
+ alm.transition_container = alm.content.attr('data-transition-container'); // Transition Container
65
+ alm.tcc = alm.content.attr('data-transition-container-classes'); // Transition Container Classes
66
  alm.speed = alm.content.attr('data-transition-speed');
67
  alm.images_loaded = alm.content.attr('data-images-loaded');
68
  alm.destroy_after = alm.content.attr('data-destroy-after');
200
  /* SEO */
201
  if (alm.seo === undefined){
202
  alm.seo = false;
203
+ }
204
  if (alm.seo === 'true'){
205
  alm.seo = true; // Convert string to boolean
206
  }
212
  alm.permalink = alm.content.attr('data-seo-permalink');
213
  alm.pageview = alm.content.attr('data-seo-pageview');
214
  alm.start_page = alm.content.attr('data-seo-start-page');
215
+ alm.trailing_slash = (alm.content.attr('data-seo-trailing-slash') === 'false') ? '' : '/';
216
 
217
  if(alm.start_page){
218
 
365
  if (alm.transition === undefined){
366
  alm.transition = 'slide';
367
  }
368
+ if(alm.tcc === undefined){ // transition_container_classes
369
+ alm.tcc = '';
370
+ }
371
 
372
  alm.is_masonry_preloaded = false;
373
  if(alm.transition === 'masonry'){
374
  alm.masonry_selector = alm.content.attr('data-masonry-selector');
375
  alm.masonry_animation = alm.content.attr('data-masonry-animation');
376
+ alm.masonry_horizontalorder = alm.content.attr('data-masonry-horizontalorder');
377
  if (alm.masonry_animation === undefined){
378
  alm.masonry_animation = 'standard';
379
+ }
380
+ if (alm.masonry_horizontalorder === undefined){
381
+ alm.masonry_horizontalorder = 'true';
382
  }
383
  alm.masonry_wrap = alm.content;
384
  alm.transition_container = false;
458
  alm.container.append('<div class="' + alm.prefix + 'btn-wrap"/>');
459
  alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.container);
460
 
 
461
 
462
+ // Paging add-on
463
+ if(alm.paging){
464
  alm.content.parent().addClass('loading'); // add loading class to main container
 
465
  }else{
 
466
  // If paging is false
467
  $('.'+ alm.prefix + 'btn-wrap', alm.container).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more'+ alm.button_class +'">' + alm.button_label + '</button>');
468
  alm.button = $('.alm-load-more-btn', alm.container);
703
  }
704
  });
705
  }
 
706
  // Standard ALM
707
  else {
708
  $.ajax({
714
  query_type : queryType,
715
  nonce : alm_localize.alm_nonce,
716
  cache_id : alm.cache_id,
717
+ cache_logged_in : alm.cache_logged_in,
718
  repeater : alm.repeater,
719
  theme_repeater : alm.theme_repeater,
720
  acf : alm.acf_array,
859
 
860
  // Is pagination
861
  if (total > 0) {
862
+ alm.el = $('<div class="alm-reveal'+alm.tcc+'"/>');
863
  alm.el.append('<div class="alm-paging-content"></div><div class="alm-paging-loading"></div>');
864
  $('.alm-paging-content', alm.el).append(alm.data).hide();
865
  alm.content.append(alm.el);
891
  }
892
 
893
  }
894
+
895
 
896
  if (total > 0) {
897
 
940
  if(k > 0 || alm.preloaded === 'true'){ // > Paged
941
  pagenum = (k + 1 + p);
942
  if(alm.permalink === 'default'){
943
+ div = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
944
  }else{
945
+ div = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+'page/'+ pagenum + alm.trailing_slash + alm.search_value +'" data-page="'+ pagenum +'" />');
946
  }
947
  }else{ // First Page
948
+ div = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
949
  }
950
 
951
  div.append(seo_data[k]);
967
 
968
  if(alm.seo){
969
  if(alm.permalink === 'default'){
970
+ alm.el = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
971
  }else{
972
+ alm.el = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+'page/'+ pagenum + alm.trailing_slash + alm.search_value +'" data-page="'+ pagenum +'" />');
973
  }
974
  }else{
975
  // Basic ALM
976
+ alm.el = $('<div class="alm-reveal'+alm.tcc+'" />');
977
  }
978
 
979
  }else{
980
 
981
  if(alm.seo){
982
  // SEO [Page 1]
983
+ alm.el = $('<div class="alm-reveal alm-seo'+alm.tcc+'" data-url="'+alm.canonical_url+''+ alm.search_value +'" data-page="1" />');
984
  }else{
985
  // Basic ALM
986
+ alm.el = $('<div class="alm-reveal'+alm.tcc+'" />');
987
  }
988
 
989
  }
1027
 
1028
  }else if(alm.transition === 'masonry') { // masonry
1029
 
1030
+ almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, alm.init, alm_is_filtering);
1031
 
1032
 
1033
  if(!alm.paging){
1121
  if(alm.posts >= alm.totalposts && !alm.previous_post){
1122
  alm.AjaxLoadMore.triggerDone();
1123
  }
1124
+ }else{ // Cache
1125
  if(total < alm.posts_per_page){
1126
  alm.AjaxLoadMore.triggerDone();
1127
  }
1129
  // End ALM Done
1130
 
1131
 
1132
+ } else {
1133
 
1134
  // No Results!
1135
  if(!alm.paging){
1151
  alm.disable_ajax = true;
1152
  if(!alm.paging){
1153
  alm.button.delay(alm.speed).fadeOut(alm.speed);
1154
+ if ($.isFunction($.fn.almDestroyed)) {
1155
+ $.fn.almDestroyed(alm);
1156
+ }
1157
  }
1158
  }
1159
  }
1177
  */
1178
  alm.AjaxLoadMore.pagingPreloadedInit = function(data){
1179
 
1180
+ alm.el = $('<div class="alm-reveal'+alm.tcc+'"/>');
1181
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
1182
  alm.content.append(alm.el);
1183
  alm.content.parent().removeClass('loading'); // Remove loading class from main container
1509
  // Masonry + Preloaded
1510
  alm.window.bind('load', function(){
1511
  if(alm.is_masonry_preloaded){
1512
+ almMasonry(alm.masonry_wrap, alm.el, alm.masonry_selector, alm.masonry_animation, alm.masonry_horizontalorder, alm.speed, true, false);
1513
  }
1514
  });
1515
 
core/src/js/modules/almMasonry.js CHANGED
@@ -16,10 +16,10 @@
16
 
17
  let almMasonryInit = true; // flag
18
 
19
- let almMasonry = (container, items, selector, animation, speed, init, filtering) => {
20
 
21
  let duration = (speed+100)/1000 +'s'; // Add 100 for some delay
22
- let hidden = 'scale(0.5)';
23
  let visible = 'scale(1)';
24
 
25
  if(animation === 'zoom-out'){
@@ -42,6 +42,8 @@ let almMasonry = (container, items, selector, animation, speed, init, filtering)
42
  visible = 'translateY(0)';
43
  }
44
 
 
 
45
  if(!filtering){
46
 
47
  // First Run
@@ -52,6 +54,8 @@ let almMasonry = (container, items, selector, animation, speed, init, filtering)
52
  container.masonry({
53
  itemSelector: selector,
54
  transitionDuration: duration,
 
 
55
  hiddenStyle: {
56
  transform: hidden,
57
  opacity: 0
@@ -79,7 +83,7 @@ let almMasonry = (container, items, selector, animation, speed, init, filtering)
79
  container.masonry('destroy'); // destroy masonry
80
  almMasonryInit = true; // reset almMasonryInit
81
  container.append( items );
82
- almMasonry(container, items, selector, animation, speed, true, false);
83
 
84
  }
85
 
16
 
17
  let almMasonryInit = true; // flag
18
 
19
+ let almMasonry = (container, items, selector, animation, horizontalOrder, speed, init, filtering) => {
20
 
21
  let duration = (speed+100)/1000 +'s'; // Add 100 for some delay
22
+ let hidden = 'scale(0.5)';
23
  let visible = 'scale(1)';
24
 
25
  if(animation === 'zoom-out'){
42
  visible = 'translateY(0)';
43
  }
44
 
45
+ horizontalOrder = (horizontalOrder === 'true') ? true : false;
46
+
47
  if(!filtering){
48
 
49
  // First Run
54
  container.masonry({
55
  itemSelector: selector,
56
  transitionDuration: duration,
57
+ columnWidth: selector,
58
+ horizontalOrder: horizontalOrder,
59
  hiddenStyle: {
60
  transform: hidden,
61
  opacity: 0
83
  container.masonry('destroy'); // destroy masonry
84
  almMasonryInit = true; // reset almMasonryInit
85
  container.append( items );
86
+ almMasonry(container, items, selector, animation, horizontalOrder, speed, true, false);
87
 
88
  }
89
 
lang/ajax-load-more.pot CHANGED
@@ -1,15 +1,15 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Ajax Load More\n"
4
- "POT-Creation-Date: 2017-08-08 16:12-0500\n"
5
- "PO-Revision-Date: 2017-08-08 16:13-0500\n"
6
  "Last-Translator: Darren Cooney <dcooney@ecentricarts.com>\n"
7
  "Language-Team: \n"
8
  "Language: en_CA\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.7\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Poedit-KeywordsList: __;_e\n"
@@ -49,7 +49,7 @@ msgid "Applying layout"
49
  msgstr ""
50
 
51
  #: ../admin/admin.php:186 ../admin/editor/editor-build.php:72
52
- #: ../admin/views/repeater-templates.php:372
53
  msgid "Template Updated"
54
  msgstr ""
55
 
@@ -148,111 +148,108 @@ msgstr ""
148
  msgid "Button Classes"
149
  msgstr ""
150
 
151
- #: ../admin/admin.php:975
152
- msgid "Ajax Security"
153
- msgstr ""
154
-
155
- #: ../admin/admin.php:983
156
  msgid "Top of Page"
157
  msgstr ""
158
 
159
- #: ../admin/admin.php:991
160
  msgid "Dynamic Content"
161
  msgstr ""
162
 
163
- #: ../admin/admin.php:999
164
  msgid "Editor Button"
165
  msgstr ""
166
 
167
- #: ../admin/admin.php:1007
168
  msgid "Error Notices"
169
  msgstr ""
170
 
171
- #: ../admin/admin.php:1078
172
  msgid ""
173
  "Customize the user experience of Ajax Load More by updating the fields below."
174
  msgstr ""
175
 
176
- #: ../admin/admin.php:1091
177
  msgid "The following settings affect the WordPress admin area only."
178
  msgstr ""
179
 
180
- #: ../admin/admin.php:1122
181
  msgid "I want to use my own CSS styles."
182
  msgstr ""
183
 
184
- #: ../admin/admin.php:1122
185
  msgid "View Ajax Load More CSS"
186
  msgstr ""
187
 
188
- #: ../admin/admin.php:1142
189
  msgid "Hide shortcode button in WYSIWYG editor."
190
  msgstr ""
191
 
192
- #: ../admin/admin.php:1163
193
  msgid ""
194
  "Display error messaging regarding repeater template updates in the browser "
195
  "console."
196
  msgstr ""
197
 
198
- #: ../admin/admin.php:1184
199
  msgid ""
200