WordPress Infinite Scroll – Ajax Load More - Version 2.6.3.2

Version Description

  • FIX - Fixed bug with Preloaded + SEO and scrolling to current page in core Ajax Load More JS.
  • UPDATE - Moved SEO and Cache add-on settings and controls from ALM core to SEO core.
  • NEW - Added Google Analytics Pageview support to SEO add-on.
  • UPDATE - Various admin UI improvements.
Download this release

Release Info

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

Code changes from version 2.6.3.1 to 2.6.3.2

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney
3
  Donate link: http://connekthq.com/donate/
4
  Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
- Tested up to: 4.2
7
- Stable tag: 2.6.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -252,6 +252,13 @@ How to install Ajax Load More.
252
  == Changelog ==
253
 
254
 
 
 
 
 
 
 
 
255
  = 2.6.3.1 =
256
  * FIX - Fixed/updated error handling of repeater templates. Errors are now being reported in the browser console and do not interfere with the WP admin.
257
  * FIX - Fixed javascript issue with shorthand if statements and script concatenation.
3
  Donate link: http://connekthq.com/donate/
4
  Tags: ajax, query, loop, paging, filter, infinite scroll, infinite, dynamic, jquery, shortcode builder, shortcode, search, tags, category, post types, taxonomy, meta_query, post format, wmpl, archives, date
5
  Requires at least: 3.6
6
+ Tested up to: 4.2.2
7
+ Stable tag: 2.6.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
252
  == Changelog ==
253
 
254
 
255
+ = 2.6.3.2 =
256
+ * FIX - Fixed bug with Preloaded + SEO and scrolling to current page in core Ajax Load More JS.
257
+ * UPDATE - Moved SEO and Cache add-on settings and controls from ALM core to SEO core.
258
+ * NEW - Added Google Analytics Pageview support to SEO add-on.
259
+ * UPDATE - Various admin UI improvements.
260
+
261
+
262
  = 2.6.3.1 =
263
  * FIX - Fixed/updated error handling of repeater templates. Errors are now being reported in the browser console and do not interfere with the WP admin.
264
  * FIX - Fixed javascript issue with shorthand if statements and script concatenation.
admin/admin.php CHANGED
@@ -562,69 +562,16 @@ function alm_admin_init(){
562
  'alm_general_settings'
563
  );
564
 
 
565
  // CACHE
566
- if(has_action('alm_cache_installed')){
567
- add_settings_section(
568
- 'alm_cache_settings',
569
- 'Cache Settings',
570
- 'alm_cache_settings_callback',
571
- 'ajax-load-more'
572
- );
573
- add_settings_field(
574
- '_alm_cache_publish',
575
- __('Published Posts', ALM_NAME ),
576
- '_alm_cache_publish_callback',
577
- 'ajax-load-more',
578
- 'alm_cache_settings'
579
- );
580
- add_settings_field(
581
- '_alm_cache_known_users',
582
- __('Known Users', ALM_NAME ),
583
- '_alm_cache_known_users_callback',
584
- 'ajax-load-more',
585
- 'alm_cache_settings'
586
- );
587
-
588
  }
589
 
 
590
  // SEO
591
- if(has_action('alm_seo_installed')){
592
-
593
- add_settings_section(
594
- 'alm_seo_settings',
595
- 'SEO Settings',
596
- 'alm_seo_settings_callback',
597
- 'ajax-load-more'
598
- );
599
- add_settings_field(
600
- '_alm_seo_permalinks',
601
- __('SEO Permalinks', ALM_NAME ),
602
- '_alm_seo_permalinks_callback',
603
- 'ajax-load-more',
604
- 'alm_seo_settings'
605
- );
606
- add_settings_field(
607
- '_alm_seo_scroll',
608
- __('Scroll to Page', ALM_NAME ),
609
- '_alm_seo_scroll_callback',
610
- 'ajax-load-more',
611
- 'alm_seo_settings'
612
- );
613
- add_settings_field(
614
- '_alm_seo_speed',
615
- __('Scroll Speed', ALM_NAME ),
616
- '_alm_seo_speed_callback',
617
- 'ajax-load-more',
618
- 'alm_seo_settings'
619
- );
620
- add_settings_field(
621
- '_alm_seo_scrolltop',
622
- __('Scroll Top', ALM_NAME ),
623
- '_alm_seo_scrolltop_callback',
624
- 'ajax-load-more',
625
- 'alm_seo_settings'
626
- );
627
-
628
  }
629
  }
630
 
@@ -904,198 +851,3 @@ function _alm_nonce_security_callback(){
904
  echo $html;
905
  }
906
 
907
-
908
-
909
- /*
910
- * alm_cache_settings_callback
911
- * Cache Setting Heading
912
- *
913
- * @since 2.6.0
914
- */
915
-
916
- function alm_cache_settings_callback() {
917
- $html = '<p>' . __('Customize your installation of the <a href="http://connekthq.com/plugins/ajax-load-more/cache/">Cache</a> add-on.', ALM_NAME) . '</p>';
918
-
919
- echo $html;
920
- }
921
-
922
-
923
-
924
- /*
925
- * _alm_cache_publish_callback
926
- * Clear cache when a new post is published
927
- *
928
- * @since 2.6.0
929
- */
930
-
931
- function _alm_cache_publish_callback() {
932
-
933
- $options = get_option( 'alm_settings' );
934
-
935
- if(!isset($options['_alm_cache_publish']))
936
- $options['_alm_cache_publish'] = '0';
937
-
938
- $html = '<input type="hidden" name="alm_settings[_alm_cache_publish]" value="0" /><input type="checkbox" id="alm_cache_publish" name="alm_settings[_alm_cache_publish]" value="1"'. (($options['_alm_cache_publish']) ? ' checked="checked"' : '') .' />';
939
- $html .= '<label for="alm_cache_publish">'.__('Delete cache when new posts are published.', ALM_NAME);
940
- $html .= '<span style="display:block">'.__('Cache will be fully cleared whenever a post, page or Custom Post Type is published or updated.', ALM_NAME).'</span>';
941
- $html .=' </label>';
942
-
943
-
944
- echo $html;
945
-
946
- }
947
-
948
-
949
-
950
- /*
951
- * _alm_cache_known_users_callback
952
- * Don't cache files for known users
953
- *
954
- * @since 2.6.0
955
- */
956
-
957
- function _alm_cache_known_users_callback() {
958
-
959
- $options = get_option( 'alm_settings' );
960
-
961
- if(!isset($options['_alm_cache_known_users']))
962
- $options['_alm_cache_known_users'] = '0';
963
-
964
- $html = '<input type="hidden" name="alm_settings[_alm_cache_known_users]" value="0" /><input type="checkbox" id="alm_cache_known_users" name="alm_settings[_alm_cache_known_users]" value="1"'. (($options['_alm_cache_known_users']) ? ' checked="checked"' : '') .' />';
965
- $html .= '<label for="alm_cache_known_users">'.__('Don\'t cache files for logged in users.', ALM_NAME);
966
- $html .= '<span style="display:block">'.__('Logged in users will retrieve content directly from the database and will not view any cached content.', ALM_NAME).'</span>';
967
- $html .=' </label>';
968
-
969
- echo $html;
970
-
971
- }
972
-
973
-
974
-
975
- /*
976
- * alm_seo_settings_callback
977
- * SEO Setting Heading
978
- *
979
- * @since 2.3.0
980
- */
981
-
982
- function alm_seo_settings_callback() {
983
- $html = '<p>' . __('Customize your installation of the <a href="http://connekthq.com/plugins/ajax-load-more/seo/">Search Engine Optimization</a> add-on.', ALM_NAME) . '</p>';
984
-
985
- echo $html;
986
- }
987
-
988
-
989
-
990
- /*
991
- * _alm_seo_permalinks
992
- * Select permalink type
993
- *
994
- * @since 2.3.0
995
- */
996
-
997
- function _alm_seo_permalinks_callback() {
998
-
999
- $options = get_option( 'alm_settings' );
1000
-
1001
- if(!isset($options['_alm_seo_permalinks']))
1002
- $options['_alm_seo_permalinks'] = 'pretty';
1003
-
1004
-
1005
- $html = '<p style="padding-bottom: 15px; overflow: hidden;">Select your WordPress <a href="options-permalink.php"><strong>Permalink structure</strong></a>.</p>';
1006
- $html .= '<input type="radio" id="_alm_seo_type_one" name="alm_settings[_alm_seo_permalinks]" value="pretty"' . checked( 'pretty', $options['_alm_seo_permalinks'], false ) . '/>';
1007
- $html .= '<label for="_alm_seo_type_one">'.__('Pretty Permalinks (mod_rewrite) <br/><span>http://example.com/2012/post-name/</span>', ALM_NAME).'</label><br/>';
1008
-
1009
- $html .= '<input type="radio" id="_alm_seo_type_two" name="alm_settings[_alm_seo_permalinks]" value="default"' . checked( 'default', $options['_alm_seo_permalinks'], false ) . '/>';
1010
- $html .= '<label for="_alm_seo_type_two">'.__('Default (Ugly) <br/><span>http://example.com/?p=N</span>', ALM_NAME).'</label>';
1011
-
1012
- echo $html;
1013
-
1014
- }
1015
-
1016
-
1017
-
1018
- /*
1019
- * _alm_seo_scroll_callback
1020
- * Set the speed of auto scroll
1021
- *
1022
- * @since 2.3.0
1023
- */
1024
-
1025
- function _alm_seo_scroll_callback() {
1026
-
1027
- $options = get_option( 'alm_settings' );
1028
-
1029
- if(!isset($options['_alm_seo_scroll']))
1030
- $options['_alm_seo_scroll'] = '1';
1031
-
1032
- $html = '<input type="hidden" name="alm_settings[_alm_seo_scroll]" value="0" />';
1033
- $html .= '<input type="checkbox" name="alm_settings[_alm_seo_scroll]" id="alm_scroll_page" value="1"'. (($options['_alm_seo_scroll']) ? ' checked="checked"' : '') .' />';
1034
- $html .= '<label for="alm_scroll_page">'.__('Enable window scrolling.<br/><span>If scrolling is enabled, the users window will scroll to the current page on \'Load More\' button click and while interacting with the forward and back browser buttons.</span>', ALM_NAME).'</label>';
1035
-
1036
- echo $html;
1037
- }
1038
-
1039
-
1040
-
1041
- /*
1042
- * _alm_seo_speed_callback
1043
- * Set the speed of auto scroll
1044
- *
1045
- * @since 2.3.0
1046
- */
1047
-
1048
- function _alm_seo_speed_callback() {
1049
-
1050
- $options = get_option( 'alm_settings' );
1051
-
1052
- if(!isset($options['_alm_seo_speed']))
1053
- $options['_alm_seo_speed'] = '1000';
1054
-
1055
-
1056
- echo '<label for="alm_settings[_alm_seo_speed]">'.__('Set the scrolling speed of the page in milliseconds. <br/><span>e.g. 1 second = 1000</span>', ALM_NAME).'</label><br/><input type="number" class="sm" id="alm_settings[_alm_seo_speed]" name="alm_settings[_alm_seo_speed]" step="50" min="0" value="'.$options['_alm_seo_speed'].'" placeholder="1000" /> ';
1057
-
1058
- }
1059
-
1060
-
1061
-
1062
- /*
1063
- * _alm_seo_scrolltop_callback
1064
- * Set the scrlltop value of window scrolling
1065
- *
1066
- * @since 2.6.0
1067
- */
1068
-
1069
- function _alm_seo_scrolltop_callback() {
1070
-
1071
- $options = get_option( 'alm_settings' );
1072
-
1073
- if(!isset($options['_alm_seo_scrolltop']))
1074
- $options['_alm_seo_scrolltop'] = '30';
1075
-
1076
-
1077
- echo '<label for="alm_settings[_alm_seo_scrolltop]">'.__('Set the scrolltop position of the window when scrolling to post.', ALM_NAME).'</label><br/><input type="number" class="sm" id="alm_settings[_alm_seo_scrolltop]" name="alm_settings[_alm_seo_scrolltop]" step="1" min="0" value="'.$options['_alm_seo_scrolltop'].'" placeholder="30" /> ';
1078
-
1079
- ?>
1080
- <script>
1081
- // Check if Scroll to Page != true
1082
- if(!jQuery('input#alm_scroll_page').is(":checked")){
1083
- jQuery('input#alm_scroll_page').parent().parent('tr').next('tr').hide();
1084
- jQuery('input#alm_scroll_page').parent().parent('tr').next('tr').next('tr').hide();
1085
- }
1086
- jQuery('input#alm_scroll_page').change(function() {
1087
- var el = jQuery(this);
1088
- if(el.is(":checked")) {
1089
- el.parent().parent('tr').next('tr').show();
1090
- el.parent().parent('tr').next('tr').next('tr').show();
1091
- }else{
1092
- el.parent().parent('tr').next('tr').hide();
1093
- el.parent().parent('tr').next('tr').next('tr').hide();
1094
- }
1095
- });
1096
-
1097
- </script>
1098
- <?php
1099
- }
1100
-
1101
-
562
  'alm_general_settings'
563
  );
564
 
565
+
566
  // CACHE
567
+ if(has_action('alm_cache_settings')){
568
+ do_action('alm_cache_settings');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
569
  }
570
 
571
+
572
  // SEO
573
+ if(has_action('alm_seo_settings')){
574
+ do_action('alm_seo_settings');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575
  }
576
  }
577
 
851
  echo $html;
852
  }
853
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ajax-load-more.php CHANGED
@@ -6,13 +6,13 @@ Description: A simple solution for lazy loading WordPress posts and pages with A
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
- Version: 2.6.3.1
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
- define('ALM_VERSION', '2.6.3.1');
15
- define('ALM_RELEASE', 'May 4, 2015');
16
 
17
  /*
18
  * alm_install
@@ -315,18 +315,11 @@ if( !class_exists('AjaxLoadMore') ):
315
 
316
  $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $classname . '"'; // Build ALM container
317
 
318
- //Cache Add-on
319
- if(has_action('alm_cache_installed')){
320
- if($cache === 'true'){
321
- $ajaxloadmore .= ' data-cache="'.$cache.'"';
322
- $ajaxloadmore .= ' data-cache-id="'.$cache_id.'"';
323
- $ajaxloadmore .= ' data-cache-path="'.ALM_CACHE_URL.'/_cache/'.$cache_id.'"';
324
-
325
- // Check for known users
326
- if(isset($options['_alm_cache_known_users']) && $options['_alm_cache_known_users'] === '1' && is_user_logged_in())
327
- $ajaxloadmore .= ' data-cache-logged-in="true"';
328
- }
329
- }
330
 
331
  // Preloaded Add-on
332
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
@@ -371,57 +364,10 @@ if( !class_exists('AjaxLoadMore') ):
371
  $ajaxloadmore .= ' data-destroy-after="'.$destroy_after.'"';
372
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
373
 
374
- // SEO Installed
375
- if(has_action('alm_seo_installed') && $seo === 'true'){
376
-
377
- // Get scroll speed and scrolltop
378
- $seo_scroll_speed = '1000';
379
- $seo_scrolltop = '30';
380
- if(isset($options['_alm_seo_speed']))
381
- $seo_scroll_speed = ''.$options['_alm_seo_speed'];
382
-
383
- if(isset($options['_alm_seo_scrolltop']))
384
- $seo_scrolltop = ''.$options['_alm_seo_scrolltop'];
385
-
386
- // Enabled Scrolling
387
- $seo_enable_scroll = $options['_alm_seo_scroll'];
388
- if(!isset($seo_enable_scroll)){
389
- $seo_enable_scroll = 'true';
390
- }else{
391
- if($seo_enable_scroll == '1'){
392
- $seo_enable_scroll = 'true';
393
- }else{
394
- $seo_enable_scroll = 'false';
395
- }
396
- }
397
-
398
- // Permalink Structure
399
- $seo_permalink = 'pretty';
400
- if(isset($options['_alm_seo_permalinks'])){
401
- $seo_permalink = ''.$options['_alm_seo_permalinks'];
402
- }
403
-
404
- // Get $paged var from WP
405
- if ( get_query_var('paged') ) {
406
- $current_page = get_query_var('paged');
407
- } elseif ( get_query_var('page') ) {
408
- $current_page = get_query_var('page');
409
- } else {
410
- $current_page = 1;
411
- }
412
-
413
- // If preloaded then minus 1 page from SEO
414
- if($preloaded === 'true'){
415
- $current_page = $current_page - 1;
416
- }
417
-
418
- $ajaxloadmore .= ' data-seo="'.$seo.'"';
419
- $ajaxloadmore .= ' data-seo-start-page="'.$current_page.'"';
420
- $ajaxloadmore .= ' data-seo-scroll="'.$seo_enable_scroll.'"';
421
- $ajaxloadmore .= ' data-seo-scroll-speed="'.$seo_scroll_speed.'"';
422
- $ajaxloadmore .= ' data-seo-scrolltop="'.$seo_scrolltop.'"';
423
- $ajaxloadmore .= ' data-seo-permalink="'.$seo_permalink.'"';
424
-
425
  }
426
 
427
  $ajaxloadmore .= '></'.$container_element.'>';
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
+ Version: 2.6.3.2
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
+ define('ALM_VERSION', '2.6.3.2');
15
+ define('ALM_RELEASE', 'May 14, 2015');
16
 
17
  /*
18
  * alm_install
315
 
316
  $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $classname . '"'; // Build ALM container
317
 
318
+ //Cache Add-on
319
+ if(has_action('alm_cache_installed') && $cache === 'true'){
320
+ $cache_return = apply_filters('alm_cache_shortcode', $cache, $cache_id, $options);
321
+ $ajaxloadmore .= $cache_return;
322
+ }
 
 
 
 
 
 
 
323
 
324
  // Preloaded Add-on
325
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
364
  $ajaxloadmore .= ' data-destroy-after="'.$destroy_after.'"';
365
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
366
 
367
+ // SEO Add-on
368
+ if(has_action('alm_seo_installed') && $seo === 'true'){
369
+ $seo_return = apply_filters('alm_seo_shortcode', $seo, $preloaded, $options);
370
+ $ajaxloadmore .= $seo_return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  }
372
 
373
  $ajaxloadmore .= '></'.$container_element.'>';
core/js/ajax-load-more.js CHANGED
@@ -82,6 +82,8 @@
82
  if (alm.total_posts <= alm.preloaded_amount){
83
  alm.disable_ajax = true;
84
  }
 
 
85
  }
86
 
87
 
@@ -94,6 +96,7 @@
94
  }
95
 
96
  alm.permalink = alm.content.attr('data-seo-permalink');
 
97
  alm.start_page = alm.content.attr('data-seo-start-page');
98
 
99
  if(alm.start_page){
82
  if (alm.total_posts <= alm.preloaded_amount){
83
  alm.disable_ajax = true;
84
  }
85
+ }else{
86
+ alm.preloaded = 'false';
87
  }
88
 
89
 
96
  }
97
 
98
  alm.permalink = alm.content.attr('data-seo-permalink');
99
+ alm.pageview = alm.content.attr('data-seo-pageview');
100
  alm.start_page = alm.content.attr('data-seo-start-page');
101
 
102
  if(alm.start_page){
core/js/ajax-load-more.min.js CHANGED
@@ -11,15 +11,16 @@
11
  * Twitter: @KaptonKaos
12
  */
13
 
 
14
  (function($){"use strict";$.ajaxloadmore=function(el){if(alm_localize.scrolltop==='true'){$(window).scrollTop(0);}
15
  var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.speed=300;alm.proceed=false;alm.disable_ajax=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.data;alm.el=el;alm.content=$('.alm-listing.alm-ajax',alm.el);alm.prefix='alm-';alm.cache=alm.content.attr('data-cache');alm.cache_id=alm.content.attr('data-cache-id');alm.cache_path=alm.content.attr('data-cache-path');alm.cache_logged_in=alm.content.attr('data-cache-logged-in');alm.repeater=alm.content.attr('data-repeater');alm.scroll_distance=parseInt(alm.content.attr('data-scroll-distance'));alm.max_pages=parseInt(alm.content.attr('data-max-pages'));alm.pause=alm.content.attr('data-pause');alm.transition=alm.content.attr('data-transition');alm.destroy_after=alm.content.attr('data-destroy-after');alm.lang=alm.content.attr('data-lang');alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.seo=alm.content.attr('data-seo');alm.preloaded=alm.content.attr('data-preloaded');alm.preloaded_amount=alm.content.attr('data-preloaded-amount');if(alm.content.attr('data-offset')===undefined){alm.offset=0;}else{alm.offset=alm.content.attr('data-offset');}
16
  if(alm.cache===undefined){alm.cache=false;}
17
  if(alm.cache_logged_in===undefined){alm.cache_logged_in=false;}
18
  if(alm.preloaded==='true'){alm.preload_wrap=alm.content.prev('.alm-preloaded');alm.total_posts=parseInt(alm.preload_wrap.attr('data-total-posts'));if(alm.preloaded_amount===undefined){alm.preloaded_amount=false;}
19
- if(alm.total_posts<=alm.preloaded_amount){alm.disable_ajax=true;}}
20
  if(alm.seo===undefined){alm.seo=false;}
21
  if(alm.seo==='true'){alm.seo=true;}
22
- alm.permalink=alm.content.attr('data-seo-permalink');alm.start_page=alm.content.attr('data-seo-start-page');if(alm.start_page){alm.seo_scroll=alm.content.attr('data-seo-scroll');alm.seo_scroll_speed=alm.content.attr('data-seo-scroll-speed');alm.seo_scrolltop=alm.content.attr('data-seo-scrolltop');alm.isPaged=false;if(alm.start_page>1){alm.isPaged=true;alm.posts_per_page=alm.start_page*alm.posts_per_page;}}
23
  if(alm.pause===undefined||(alm.seo&&alm.start_page>1)){alm.pause=false;}
24
  if(alm.preloaded&&alm.start_page>=1){alm.pause=false;}
25
  if(alm.repeater===undefined){alm.repeater='default';}
11
  * Twitter: @KaptonKaos
12
  */
13
 
14
+
15
  (function($){"use strict";$.ajaxloadmore=function(el){if(alm_localize.scrolltop==='true'){$(window).scrollTop(0);}
16
  var alm=this;alm.AjaxLoadMore={};alm.page=0;alm.speed=300;alm.proceed=false;alm.disable_ajax=false;alm.init=true;alm.loading=true;alm.finished=false;alm.window=$(window);alm.button_label='';alm.data;alm.el=el;alm.content=$('.alm-listing.alm-ajax',alm.el);alm.prefix='alm-';alm.cache=alm.content.attr('data-cache');alm.cache_id=alm.content.attr('data-cache-id');alm.cache_path=alm.content.attr('data-cache-path');alm.cache_logged_in=alm.content.attr('data-cache-logged-in');alm.repeater=alm.content.attr('data-repeater');alm.scroll_distance=parseInt(alm.content.attr('data-scroll-distance'));alm.max_pages=parseInt(alm.content.attr('data-max-pages'));alm.pause=alm.content.attr('data-pause');alm.transition=alm.content.attr('data-transition');alm.destroy_after=alm.content.attr('data-destroy-after');alm.lang=alm.content.attr('data-lang');alm.posts_per_page=alm.content.attr('data-posts-per-page');alm.seo=alm.content.attr('data-seo');alm.preloaded=alm.content.attr('data-preloaded');alm.preloaded_amount=alm.content.attr('data-preloaded-amount');if(alm.content.attr('data-offset')===undefined){alm.offset=0;}else{alm.offset=alm.content.attr('data-offset');}
17
  if(alm.cache===undefined){alm.cache=false;}
18
  if(alm.cache_logged_in===undefined){alm.cache_logged_in=false;}
19
  if(alm.preloaded==='true'){alm.preload_wrap=alm.content.prev('.alm-preloaded');alm.total_posts=parseInt(alm.preload_wrap.attr('data-total-posts'));if(alm.preloaded_amount===undefined){alm.preloaded_amount=false;}
20
+ if(alm.total_posts<=alm.preloaded_amount){alm.disable_ajax=true;}}else{alm.preloaded='false';}
21
  if(alm.seo===undefined){alm.seo=false;}
22
  if(alm.seo==='true'){alm.seo=true;}
23
+ alm.permalink=alm.content.attr('data-seo-permalink');alm.pageview=alm.content.attr('data-seo-pageview');alm.start_page=alm.content.attr('data-seo-start-page');if(alm.start_page){alm.seo_scroll=alm.content.attr('data-seo-scroll');alm.seo_scroll_speed=alm.content.attr('data-seo-scroll-speed');alm.seo_scrolltop=alm.content.attr('data-seo-scrolltop');alm.isPaged=false;if(alm.start_page>1){alm.isPaged=true;alm.posts_per_page=alm.start_page*alm.posts_per_page;}}
24
  if(alm.pause===undefined||(alm.seo&&alm.start_page>1)){alm.pause=false;}
25
  if(alm.preloaded&&alm.start_page>=1){alm.pause=false;}
26
  if(alm.repeater===undefined){alm.repeater='default';}