WordPress Infinite Scroll – Ajax Load More - Version 5.3.0

Version Description

  • April 22, 2020 =
  • NEW - Added support and core functionality for new WooCommerce add-on.
  • NEW - Added new White & Light Grey loading style.
  • NEW - Added loading preview toggle on ALM Settings screen.
  • NEW - Added alm_a11y_focus filter to allow users to remove the focus accessibility feature of Ajax Load More.
  • UPDATE - Updated loading animations and various color combinations.
  • UPDATE - Removed Comment Reply hotfix script as this fix was patched in WordPress core.
  • FIX - Fixed issue with almFilterComplete callback not triggering.
  • FIX - Fixed issue with initial Paging add-on load not executing JavaScript in Repeater Templates.
Download this release

Release Info

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

Code changes from version 5.2.0 to 5.3.0

Files changed (144) hide show
  1. README.txt +14 -2
  2. admin/admin-functions.php +0 -0
  3. admin/admin.php +80 -19
  4. admin/classes/class-nag.php +2 -2
  5. admin/dist/css/admin.css +77 -15
  6. admin/dist/js/admin.js +9 -15
  7. admin/editor/editor-build.php +0 -0
  8. admin/editor/editor.php +0 -0
  9. admin/editor/js/editor-btn.js +0 -0
  10. admin/img/add-ons/cache-add-on.jpg +0 -0
  11. admin/img/add-ons/comments-add-on.jpg +0 -0
  12. admin/img/add-ons/cta-add-on.jpg +0 -0
  13. admin/img/add-ons/filters-add-on.jpg +0 -0
  14. admin/img/add-ons/layouts-add-on.jpg +0 -0
  15. admin/img/add-ons/next-page-add-on.jpg +0 -0
  16. admin/img/add-ons/paging-add-ons.jpg +0 -0
  17. admin/img/add-ons/preloaded-add-ons.jpg +0 -0
  18. admin/img/add-ons/prev-post-add-on.jpg +0 -0
  19. admin/img/add-ons/pro-bundle-add-on.png +0 -0
  20. admin/img/add-ons/repeater-add-ons.jpg +0 -0
  21. admin/img/add-ons/seo-add-ons.jpg +0 -0
  22. admin/img/add-ons/shortcode-editor.jpg +0 -0
  23. admin/img/add-ons/theme-repeater-add-on.jpg +0 -0
  24. admin/img/add-ons/unlimited-add-ons.jpg +0 -0
  25. admin/img/add-ons/users-add-on.jpg +0 -0
  26. admin/img/add-ons/woocommerce-add-on.jpg +0 -0
  27. admin/img/alm-logo-16x16.svg +0 -0
  28. admin/img/alm-logo-32x32.png +0 -0
  29. admin/img/alm-logo-48x48.png +0 -0
  30. admin/img/alm-logo-48x48.svg +0 -0
  31. admin/img/bkg-chkbox_off.png +0 -0
  32. admin/img/bkg-chkbox_on.png +0 -0
  33. admin/img/bkg-chkbox_selected.png +0 -0
  34. admin/img/bkg-radio_off.png +0 -0
  35. admin/img/bkg-radio_on.png +0 -0
  36. admin/img/bkg-radio_selected.png +0 -0
  37. admin/img/bkg-select.png +0 -0
  38. admin/img/column-1.png +0 -0
  39. admin/img/column-2.png +0 -0
  40. admin/img/column-3.png +0 -0
  41. admin/img/column-4.png +0 -0
  42. admin/img/directory-list-btm.gif +0 -0
  43. admin/img/directory-list.gif +0 -0
  44. admin/img/ico-close.png +0 -0
  45. admin/img/infographic.png +0 -0
  46. admin/img/loader-unlimited.gif +0 -0
  47. admin/img/loader.gif +0 -0
  48. admin/img/logos/broadcast-48x48.png +0 -0
  49. admin/img/logos/eq-48x48.png +0 -0
  50. admin/img/logos/instant-images-48x48.png +0 -0
  51. admin/img/logos/post-explorer-48x48.png +0 -0
  52. admin/img/logos/velocity-48x48.png +0 -0
  53. admin/img/select2.png +0 -0
  54. admin/includes/components/custom-layouts.php +0 -0
  55. admin/includes/components/example-list.php +0 -0
  56. admin/includes/components/layout-list.php +0 -0
  57. admin/includes/components/repeater-options.php +0 -0
  58. admin/includes/cta/about.php +0 -0
  59. admin/includes/cta/add-ons.php +0 -0
  60. admin/includes/cta/config.php +0 -0
  61. admin/includes/cta/dyk.php +0 -0
  62. admin/includes/cta/extend.php +0 -0
  63. admin/includes/cta/pro-hero.php +0 -0
  64. admin/includes/cta/resources.php +0 -0
  65. admin/includes/cta/reviews.php +0 -0
  66. admin/includes/cta/sharing.php +0 -0
  67. admin/includes/cta/test.php +0 -0
  68. admin/includes/cta/writeable.php +0 -0
  69. admin/includes/layout/default.php +0 -0
  70. admin/index.php +0 -0
  71. admin/shortcode-builder/components/acf.php +0 -0
  72. admin/shortcode-builder/components/cache.php +0 -0
  73. admin/shortcode-builder/components/comments.php +0 -0
  74. admin/shortcode-builder/components/cta.php +0 -0
  75. admin/shortcode-builder/components/filters.php +0 -0
  76. admin/shortcode-builder/components/nextpage.php +0 -0
  77. admin/shortcode-builder/components/paging.php +0 -0
  78. admin/shortcode-builder/components/preloaded.php +0 -0
  79. admin/shortcode-builder/components/rest-api.php +0 -0
  80. admin/shortcode-builder/components/seo.php +0 -0
  81. admin/shortcode-builder/components/single-post.php +0 -0
  82. admin/shortcode-builder/components/users.php +0 -0
  83. admin/shortcode-builder/includes/meta-query-options.php +0 -0
  84. admin/shortcode-builder/includes/tax-query-options.php +0 -0
  85. admin/shortcode-builder/js/shortcode-builder.js +17 -1
  86. admin/shortcode-builder/shortcode-builder.php +18 -7
  87. admin/src/js/admin.js +10 -15
  88. admin/src/scss/admin.scss +18 -8
  89. admin/src/scss/partials/_select2.scss +12 -4
  90. admin/src/scss/partials/_woocommerce.scss +33 -0
  91. admin/views/add-ons.php +0 -0
  92. admin/views/extensions.php +3 -0
  93. admin/views/go-pro.php +0 -0
  94. admin/views/help.php +0 -0
  95. admin/views/licenses.php +0 -0
  96. admin/views/repeater-templates.php +0 -0
  97. admin/views/settings.php +0 -0
  98. admin/views/shortcode-builder.php +0 -0
  99. ajax-load-more.php +132 -118
  100. core/classes/class.alm-enqueue.php +0 -0
  101. core/classes/class.alm-localize.php +1 -0
  102. core/classes/class.alm-noscript.php +0 -0
  103. core/classes/class.alm-queryargs.php +0 -0
  104. core/classes/class.alm-shortcode.php +68 -36
  105. core/classes/includes/preloaded.php +1 -1
  106. core/dist/css/ajax-load-more.css +93 -36
  107. core/dist/css/ajax-load-more.min.css +1 -1
  108. core/dist/js/ajax-load-more.js +610 -149
  109. core/dist/js/ajax-load-more.min.js +3 -3
  110. core/functions.php +17 -4
  111. core/img/ajax-loader-lg.gif +0 -0
  112. core/img/ajax-loader.gif +0 -0
  113. core/img/loader-fading-blocks.gif +0 -0
  114. core/img/loader-fading-circles.gif +0 -0
  115. core/img/spinner-chasing-arrows.gif +0 -0
  116. core/img/spinner-ring.gif +0 -0
  117. core/img/spinner-skype.gif +0 -0
  118. core/img/spinner.gif +0 -0
  119. core/src/js/ajax-load-more.js +140 -62
  120. core/src/js/helpers/almAppendChild.js +0 -0
  121. core/src/js/helpers/almAppendChildren.js +0 -0
  122. core/src/js/helpers/almDomParser.js +0 -0
  123. core/src/js/helpers/commentReplyFix.js +0 -0
  124. core/src/js/helpers/getCacheUrl.js +0 -0
  125. core/src/js/helpers/getParameterByName.js +0 -0
  126. core/src/js/helpers/helpers.js +0 -0
  127. core/src/js/helpers/polyfills.js +0 -0
  128. core/src/js/helpers/queryParams.js +1 -0
  129. core/src/js/helpers/srcsetPolyfill.js +0 -0
  130. core/src/js/helpers/tableWrap.js +0 -0
  131. core/src/js/modules/fadeIn.js +0 -0
  132. core/src/js/modules/fadeOut.js +0 -0
  133. core/src/js/modules/filtering.js +2 -7
  134. core/src/js/modules/insertScript.js +0 -0
  135. core/src/js/modules/masonry.js +1 -1
  136. core/src/js/modules/resultsText.js +20 -9
  137. core/src/js/modules/setFocus.js +11 -1
  138. core/src/js/modules/setLocalizedVars.js +12 -2
  139. core/src/js/modules/singleposts.js +30 -0
  140. core/src/js/modules/woocommerce.js +328 -0
  141. core/src/js/vendor/imagesloaded/imagesloaded.pkgd.min.js +0 -0
  142. core/src/scss/_loaders.scss +95 -40
  143. core/src/scss/ajax-load-more.scss +3 -1
  144. lang/ajax-load-more.pot +547 -296
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, woocommerce, ajax load more, masonry
5
  Requires at least: 4.0
6
- Tested up to: 5.3.2
7
- Stable tag: 5.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -185,6 +185,7 @@ The [Custom Repeater Add-On](https://connekthq.com/plugins/ajax-load-more/custom
185
  * **[Single Post](https://connekthq.com/plugins/ajax-load-more/add-ons/single-post/)**: Enable infinite scrolling of single posts on your WordPress post templates.
186
  * **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)**: Manage Ajax Load More repeater templates from within your current theme directory.
187
  * **[Users](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)**: Lazy loading WordPress Users with Ajax Load More.
 
188
 
189
 
190
 
@@ -382,6 +383,17 @@ How to install Ajax Load More.
382
 
383
  == Changelog ==
384
 
 
 
 
 
 
 
 
 
 
 
 
385
  = 5.2.0 - March 13, 2020 =
386
  * NEW - Added new [Table of Contents](https://connekthq.com/plugins/ajax-load-more/examples/table-of-contents/) functionality. Table of Contents creates a pagination anchor links with every page loaded via Ajax Load More.
387
  * NEW - Added support for new [Term Query](https://wordpress.org/plugins/ajax-load-more-for-terms/) extension.
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, woocommerce, ajax load more, masonry
5
  Requires at least: 4.0
6
+ Tested up to: 5.4.0
7
+ Stable tag: 5.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
185
  * **[Single Post](https://connekthq.com/plugins/ajax-load-more/add-ons/single-post/)**: Enable infinite scrolling of single posts on your WordPress post templates.
186
  * **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)**: Manage Ajax Load More repeater templates from within your current theme directory.
187
  * **[Users](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)**: Lazy loading WordPress Users with Ajax Load More.
188
+ * **[WooCommerce](https://connekthq.com/plugins/ajax-load-more/add-ons/woocommerce/)**: Infinite scroll WooCommerce products with Ajax Load More.
189
 
190
 
191
 
383
 
384
  == Changelog ==
385
 
386
+ = 5.3.0 - April 22, 2020 =
387
+ * NEW - Added support and core functionality for new [WooCommerce add-on](https://connekthq.com/plugins/ajax-load-more/add-ons/woocommerce/).
388
+ * NEW - Added new `White` & `Light Grey` loading style.
389
+ * NEW - Added loading preview toggle on ALM Settings screen.
390
+ * NEW - Added `alm_a11y_focus` filter to allow users to remove the focus accessibility feature of Ajax Load More.
391
+ * UPDATE - Updated loading animations and various color combinations.
392
+ * UPDATE - Removed Comment Reply hotfix script as this fix was patched in WordPress core.
393
+ * FIX - Fixed issue with `almFilterComplete` callback not triggering.
394
+ * FIX - Fixed issue with initial Paging add-on load not executing JavaScript in Repeater Templates.
395
+
396
+
397
  = 5.2.0 - March 13, 2020 =
398
  * NEW - Added new [Table of Contents](https://connekthq.com/plugins/ajax-load-more/examples/table-of-contents/) functionality. Table of Contents creates a pagination anchor links with every page loaded via Ajax Load More.
399
  * NEW - Added support for new [Term Query](https://wordpress.org/plugins/ajax-load-more-for-terms/) extension.
admin/admin-functions.php CHANGED
File without changes
admin/admin.php CHANGED
@@ -805,6 +805,27 @@ function alm_admin_menu() {
805
  add_action( 'load-' . $alm_filters_page, 'alm_set_admin_nonce' );
806
  }
807
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
808
  //Add our admin scripts
809
  add_action( 'load-' . $alm_settings_page, 'alm_load_admin_js' );
810
  add_action( 'load-' . $alm_settings_page, 'alm_set_admin_nonce' );
@@ -990,6 +1011,18 @@ function alm_filters_page(){
990
  }
991
 
992
 
 
 
 
 
 
 
 
 
 
 
 
 
993
 
994
  /**
995
  * alm_load_admin_js
@@ -1760,6 +1793,9 @@ function alm_btn_color_callback() {
1760
  $selected6 = '';
1761
  if($type == 'white') $selected6 = 'selected="selected"';
1762
 
 
 
 
1763
  $selected7 = '';
1764
  if($type == 'infinite classic') $selected7 = 'selected="selected"';
1765
 
@@ -1783,31 +1819,56 @@ function alm_btn_color_callback() {
1783
  $html .= '</label>';
1784
  $html .= '<select id="alm_settings_btn_color" name="alm_settings[_alm_btn_color]">';
1785
 
1786
- $html .= '<optgroup label="'. __('Button', 'ajax-load-more') .'">';
1787
- $html .= '<option value="default" class="alm-color default" ' . $selected0 .'>Default</option>';
1788
- $html .= '<option value="blue" class="alm-color blue" ' . $selected1 .'>Blue</option>';
1789
- $html .= '<option value="green" class="alm-color green" ' . $selected2 .'>Green</option>';
1790
- $html .= '<option value="purple" class="alm-color purple" ' . $selected4 .'>Purple</option>';
1791
- $html .= '<option value="grey" class="alm-color grey" ' . $selected5 .'>Grey</option>';
1792
- $html .= '</optgroup>';
1793
-
1794
- $html .= '<optgroup label="'. __('Infinite Scroll (No Button)', 'ajax-load-more') .'">';
1795
- $html .= '<option value="infinite classic" class="infinite classic" ' . $selected7 .'>Classic</option>';
1796
- $html .= '<option value="infinite skype" class="infinite skype" ' . $selected8 .'>Skype</option>';
1797
- $html .= '<option value="infinite ring" class="infinite ring" ' . $selected9 .'>Circle Fill</option>';
1798
- $html .= '<option value="infinite fading-blocks" class="infinite fading-blocks" ' . $selected10 .'>Fading Blocks</option>';
1799
- $html .= '<option value="infinite fading-circles" class="infinite fading-circles" ' . $selected11 .'>Fading Circles</option>';
1800
- $html .= '<option value="infinite chasing-arrows" class="infinite chasing-arrows" ' . $selected12 .'>Chasing Arrows</option>';
1801
- $html .= '</optgroup>';
1802
-
1803
- $html .= '</select>';
 
 
 
 
 
 
 
1804
 
1805
  $html .= '<div class="clear"></div>';
1806
  $html .= '<div class="alm-btn-wrap">';
1807
- $html .= '<div class="ajax-load-more-wrap core '.$type.'"><span>'.__('Preview', 'ajax-load-more') .'</span><button class="alm-load-more-btn loading" disabled="disabled">'.apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')).'</button></div>';
 
 
 
 
1808
  $html .= '</div>';
1809
 
1810
  echo $html;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1811
  }
1812
 
1813
 
805
  add_action( 'load-' . $alm_filters_page, 'alm_set_admin_nonce' );
806
  }
807
 
808
+
809
+ // WooCommerce
810
+ if(has_action('alm_woocommerce_installed') && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option('active_plugins')))){
811
+
812
+ if(has_action('alm_cache_installed') || has_action('alm_filters_installed')){
813
+ $before_link = '<span style="display:block;">';
814
+ }
815
+ $wooIcon = '<style>.dashicons.alm-woo:before{font-family: WooCommerce!important; content: "\e03d"; font-size: 16px; margin-top: 2px;}</style>';
816
+
817
+ $alm_woocommerce_page = add_submenu_page(
818
+ 'ajax-load-more',
819
+ __('WooCommerce', 'ajax-load-more'),
820
+ $before_link . $wooIcon . '<span class="dashicons dashicons-before dashicons-admin-generic alm-woo" '.$style_link_icon.'></span> '. __('WooCommerce', 'ajax-load-more') . $after_link,
821
+ 'edit_theme_options',
822
+ 'ajax-load-more-woocommerce',
823
+ 'alm_woocommerce_page'
824
+ );
825
+ add_action( 'load-' . $alm_woocommerce_page, 'alm_load_admin_js' );
826
+ add_action( 'load-' . $alm_woocommerce_page, 'alm_set_admin_nonce' );
827
+ }
828
+
829
  //Add our admin scripts
830
  add_action( 'load-' . $alm_settings_page, 'alm_load_admin_js' );
831
  add_action( 'load-' . $alm_settings_page, 'alm_set_admin_nonce' );
1011
  }
1012
 
1013
 
1014
+ /*
1015
+ * alm_woocommerce_page
1016
+ * WooCommerce Add-on page
1017
+ *
1018
+ * @since 5.3.0
1019
+ */
1020
+
1021
+ function alm_woocommerce_page(){
1022
+ include_once( ALM_WOO_PATH. 'admin/views/woocommerce.php');
1023
+ }
1024
+
1025
+
1026
 
1027
  /**
1028
  * alm_load_admin_js
1793
  $selected6 = '';
1794
  if($type == 'white') $selected6 = 'selected="selected"';
1795
 
1796
+ $selected13 = '';
1797
+ if($type == 'light-grey') $selected13 = 'selected="selected"';
1798
+
1799
  $selected7 = '';
1800
  if($type == 'infinite classic') $selected7 = 'selected="selected"';
1801
 
1819
  $html .= '</label>';
1820
  $html .= '<select id="alm_settings_btn_color" name="alm_settings[_alm_btn_color]">';
1821
 
1822
+ $html .= '<optgroup label="'. __('Button Style (Dark)', 'ajax-load-more') .'">';
1823
+ $html .= '<option value="default" class="alm-color default" ' . $selected0 .'>Default</option>';
1824
+ $html .= '<option value="blue" class="alm-color blue" ' . $selected1 .'>Blue</option>';
1825
+ $html .= '<option value="green" class="alm-color green" ' . $selected2 .'>Green</option>';
1826
+ $html .= '<option value="purple" class="alm-color purple" ' . $selected4 .'>Purple</option>';
1827
+ $html .= '<option value="grey" class="alm-color grey" ' . $selected5 .'>Grey</option>';
1828
+ $html .= '</optgroup>';
1829
+ $html .= '<optgroup label="'. __('Button Style (Light)', 'ajax-load-more') .'">';
1830
+ $html .= '<option value="white" class="alm-color white" ' . $selected6 .'>White</option>';
1831
+ $html .= '<option value="light-grey" class="alm-color light-grey" ' . $selected13 .'>Light Grey</option>';
1832
+ $html .= '</optgroup>';
1833
+
1834
+ $html .= '<optgroup label="'. __('Infinite Scroll (No Button)', 'ajax-load-more') .'">';
1835
+ $html .= '<option value="infinite classic" class="infinite classic" ' . $selected7 .'>Classic</option>';
1836
+ $html .= '<option value="infinite skype" class="infinite skype" ' . $selected8 .'>Skype</option>';
1837
+ $html .= '<option value="infinite ring" class="infinite ring" ' . $selected9 .'>Circle Fill</option>';
1838
+ $html .= '<option value="infinite fading-blocks" class="infinite fading-blocks" ' . $selected10 .'>Fading Blocks</option>';
1839
+ $html .= '<option value="infinite fading-circles" class="infinite fading-circles" ' . $selected11 .'>Fading Circles</option>';
1840
+ $html .= '<option value="infinite chasing-arrows" class="infinite chasing-arrows" ' . $selected12 .'>Chasing Arrows</option>';
1841
+ $html .= '</optgroup>';
1842
+
1843
+ $html .= '</select>';
1844
+
1845
+ // Set loading class for infinite type only
1846
+ $loadingClass = (strpos($type, 'infinite') !== false) ? ' loading' : '';
1847
 
1848
  $html .= '<div class="clear"></div>';
1849
  $html .= '<div class="alm-btn-wrap">';
1850
+ $html .= '<div class="ajax-load-more-wrap core '.$type.'">';
1851
+ $html .='<span>'.__('Click to Preview', 'ajax-load-more') .'</span>';
1852
+ $html .= '<button style="cursor: pointer;" type="button" class="alm-load-more-btn'. $loadingClass .'" id="test-alm-button">'.apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')).'</button>';
1853
+
1854
+ $html .= '</div>';
1855
  $html .= '</div>';
1856
 
1857
  echo $html;
1858
+ ?>
1859
+
1860
+ <script>
1861
+ // Button Preview Toggle
1862
+ // Toggle button state if not Infinite loading style
1863
+ jQuery('button#test-alm-button').click(function() {
1864
+ var almWrap = document.querySelector('.alm-btn-wrap .ajax-load-more-wrap');
1865
+ if (!almWrap.classList.contains('infinite')){
1866
+ jQuery(this).toggleClass('loading');
1867
+ }
1868
+ });
1869
+ </script>
1870
+
1871
+ <?php
1872
  }
1873
 
1874
 
admin/classes/class-nag.php CHANGED
@@ -6,7 +6,7 @@ if(!class_exists('ALM_NAG')) :
6
 
7
  const OPTION_INSTALL_DATE = 'alm-install-date';
8
  const OPTION_ADMIN_NOTICE_KEY = 'alm-hide-notice';
9
- const OPTION_NAG_DELAY = '-5 days';
10
 
11
  /**
12
  * Setup the class
@@ -122,7 +122,7 @@ if(!class_exists('ALM_NAG')) :
122
  $query_string = '?' . http_build_query( array_merge( $query_params, array( ALM_Nag::OPTION_ADMIN_NOTICE_KEY => '1' ) ) );
123
 
124
  echo '<div class="updated" style="padding: 15px;">';
125
- printf( __( "<p style='padding: 0; margin: 0 0 15px;'>You've been using <b style='color: #222;'><a href='%s'>Ajax Load More</a></b> for some time now, could you please give it a review at wordpress.org?<br/>All reviews, both good and bad are important as they help the plugin grow and improve over time.</p><p style='padding: 0; margin: 0 0 15px;'><a href='%s' target='_blank' class='button button-primary'>Yes, I'll leave a review</a> &nbsp;&nbsp; <a href='%s' class='button-no'>I've already done this</a></p><p style='padding: 10px 0 0; margin: 0;'><small><a href='http://connekthq.com/plugins/' target='_blank'>Check out other <b>Connekt</b> WordPress plugins</a></small></p>" ), get_admin_url() . 'admin.php?page=ajax-load-more', 'http://wordpress.org/support/view/plugin-reviews/ajax-load-more', $query_string );
126
  echo '</div>';
127
 
128
  }
6
 
7
  const OPTION_INSTALL_DATE = 'alm-install-date';
8
  const OPTION_ADMIN_NOTICE_KEY = 'alm-hide-notice';
9
+ const OPTION_NAG_DELAY = '-7 days';
10
 
11
  /**
12
  * Setup the class
122
  $query_string = '?' . http_build_query( array_merge( $query_params, array( ALM_Nag::OPTION_ADMIN_NOTICE_KEY => '1' ) ) );
123
 
124
  echo '<div class="updated" style="padding: 15px;">';
125
+ printf( __( "<p style='padding: 0; margin: 0 0 15px;'>You've been using <b style='color: #222;'><a href='%s'>Ajax Load More</a></b> for some time now, could you please give it a review at wordpress.org?<br/>All reviews, both good and bad are important as they help the plugin grow and improve over time.</p><p style='padding: 0; margin: 0 0 15px;'><a href='%s' target='_blank' class='button button-primary'>Yes, I'll leave a review</a> &nbsp; <a href='%s' class='button'>No thanks</a> &nbsp; <a href='%s' class='button-no'>I've already done this</a></p><p style='padding: 10px 0 0; margin: 0;'><small><a href='http://connekthq.com/plugins/' target='_blank'>Check out other <b>Connekt</b> WordPress plugins</a></small></p>" ), get_admin_url() . 'admin.php?page=ajax-load-more', 'http://wordpress.org/support/view/plugin-reviews/ajax-load-more', $query_string, $query_string );
126
  echo '</div>';
127
 
128
  }
admin/dist/css/admin.css CHANGED
@@ -942,17 +942,27 @@ disabled look for disabled choices in the results dropdown
942
  .select2-results .select2-result.alm-color.default .select2-result-label:after {
943
  background-color: #ed7070; }
944
 
 
 
 
 
 
 
 
 
 
 
945
  .select2-results .select2-result.alm-color.blue .select2-result-label:after {
946
- background-color: #0081bf; }
947
 
948
  .select2-results .select2-result.alm-color.green .select2-result-label:after {
949
- background-color: #6fca68; }
950
 
951
  .select2-results .select2-result.alm-color.purple .select2-result-label:after {
952
- background-color: #a86bb9; }
953
 
954
  .select2-results .select2-result.alm-color.grey .select2-result-label:after {
955
- background-color: #888; }
956
 
957
  .select2-results .select2-result.infinite .select2-result-label:after {
958
  display: none; }
@@ -1152,6 +1162,41 @@ disabled look for disabled choices in the results dropdown
1152
  margin: 0 0 20px;
1153
  border-bottom: 1px solid #f1f1f1; }
1154
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1155
  .ajax-load-more .builder-option-toggle {
1156
  display: -webkit-box;
1157
  display: -ms-flexbox;
@@ -1213,7 +1258,8 @@ body.ajax-load-more_page_ajax-load-more-licenses,
1213
  body.ajax-load-more_page_ajax-load-more-cache,
1214
  body.ajax-load-more_page_ajax-load-more-filters,
1215
  body.ajax-load-more_page_ajax-load-more-pro,
1216
- body.ajax-load-more_page_ajax-load-more-go-pro {
 
1217
  background-color: #f7f7f7; }
1218
  body.toplevel_page_ajax-load-more #wpcontent,
1219
  body.ajax-load-more_page_ajax-load-more-repeaters #wpcontent,
@@ -1225,9 +1271,10 @@ body.ajax-load-more_page_ajax-load-more-go-pro {
1225
  body.ajax-load-more_page_ajax-load-more-cache #wpcontent,
1226
  body.ajax-load-more_page_ajax-load-more-filters #wpcontent,
1227
  body.ajax-load-more_page_ajax-load-more-pro #wpcontent,
1228
- body.ajax-load-more_page_ajax-load-more-go-pro #wpcontent {
 
1229
  padding-left: 0;
1230
- padding-bottom: 40px;
1231
  background-color: #efefef; }
1232
  body.toplevel_page_ajax-load-more #wpbody-content,
1233
  body.ajax-load-more_page_ajax-load-more-repeaters #wpbody-content,
@@ -1239,7 +1286,8 @@ body.ajax-load-more_page_ajax-load-more-go-pro {
1239
  body.ajax-load-more_page_ajax-load-more-cache #wpbody-content,
1240
  body.ajax-load-more_page_ajax-load-more-filters #wpbody-content,
1241
  body.ajax-load-more_page_ajax-load-more-pro #wpbody-content,
1242
- body.ajax-load-more_page_ajax-load-more-go-pro #wpbody-content {
 
1243
  padding-bottom: 0; }
1244
 
1245
  body.toplevel_page_ajax-load-more,
@@ -1252,7 +1300,8 @@ body.ajax-load-more_page_ajax-load-more-licenses,
1252
  body.ajax-load-more_page_ajax-load-more-cache,
1253
  body.ajax-load-more_page_ajax-load-more-filters,
1254
  body.ajax-load-more_page_ajax-load-more-pro,
1255
- body.ajax-load-more_page_ajax-load-more-go-pro {
 
1256
  background: #efefef; }
1257
  body.toplevel_page_ajax-load-more #wpfooter,
1258
  body.ajax-load-more_page_ajax-load-more-repeaters #wpfooter,
@@ -1264,7 +1313,8 @@ body.ajax-load-more_page_ajax-load-more-go-pro {
1264
  body.ajax-load-more_page_ajax-load-more-cache #wpfooter,
1265
  body.ajax-load-more_page_ajax-load-more-filters #wpfooter,
1266
  body.ajax-load-more_page_ajax-load-more-pro #wpfooter,
1267
- body.ajax-load-more_page_ajax-load-more-go-pro #wpfooter {
 
1268
  padding-top: 0;
1269
  padding-bottom: 0;
1270
  line-height: 40px;
@@ -1283,7 +1333,8 @@ body.ajax-load-more_page_ajax-load-more-go-pro {
1283
  body.ajax-load-more_page_ajax-load-more-cache #wpfooter p,
1284
  body.ajax-load-more_page_ajax-load-more-filters #wpfooter p,
1285
  body.ajax-load-more_page_ajax-load-more-pro #wpfooter p,
1286
- body.ajax-load-more_page_ajax-load-more-go-pro #wpfooter p {
 
1287
  line-height: 40px; }
1288
  @media screen and (min-width: 901px) {
1289
  body.toplevel_page_ajax-load-more .ajax-load-more .cnkt-main,
@@ -1296,7 +1347,8 @@ body.ajax-load-more_page_ajax-load-more-go-pro {
1296
  body.ajax-load-more_page_ajax-load-more-cache .ajax-load-more .cnkt-main,
1297
  body.ajax-load-more_page_ajax-load-more-filters .ajax-load-more .cnkt-main,
1298
  body.ajax-load-more_page_ajax-load-more-pro .ajax-load-more .cnkt-main,
1299
- body.ajax-load-more_page_ajax-load-more-go-pro .ajax-load-more .cnkt-main {
 
1300
  min-height: 100vh; } }
1301
 
1302
  body.ajax-load-more_page_ajax-load-more-extensions,
@@ -1466,6 +1518,12 @@ body.ajax-load-more_page_ajax-load-more-pro {
1466
  .ajax-load-more textarea,
1467
  .ajax-load-more label {
1468
  font-size: 14px; }
 
 
 
 
 
 
1469
 
1470
  textarea#_alm_layouts_css {
1471
  height: 240px; }
@@ -2496,8 +2554,8 @@ hr.indented {
2496
  .admin.ajax-load-more .ajax-load-more-wrap {
2497
  position: relative;
2498
  top: 5px;
2499
- padding: 15px 17px 17px;
2500
- border: 2px dashed #efefef;
2501
  display: inline-block;
2502
  margin-top: 10px;
2503
  margin-bottom: 10px; }
@@ -2510,7 +2568,7 @@ hr.indented {
2510
  font-size: 10px;
2511
  line-height: 1;
2512
  opacity: 0.7;
2513
- padding: 0 0 8px;
2514
  text-transform: uppercase; }
2515
 
2516
  .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li {
@@ -4087,6 +4145,10 @@ p.theme-title {
4087
  background-image: url("../../img/column-3.png");
4088
  width: 36px; }
4089
 
 
 
 
 
4090
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1.updating,
4091
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2.updating,
4092
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3.updating {
942
  .select2-results .select2-result.alm-color.default .select2-result-label:after {
943
  background-color: #ed7070; }
944
 
945
+ .select2-results .select2-result.alm-color.white .select2-result-label:after {
946
+ background-color: #fff;
947
+ -webkit-box-shadow: 0 0 0 1px #ccc;
948
+ box-shadow: 0 0 0 1px #ccc; }
949
+
950
+ .select2-results .select2-result.alm-color.light-grey .select2-result-label:after {
951
+ background-color: #efefef;
952
+ -webkit-box-shadow: 0 0 0 1px #ccc;
953
+ box-shadow: 0 0 0 1px #ccc; }
954
+
955
  .select2-results .select2-result.alm-color.blue .select2-result-label:after {
956
+ background-color: #1b91ca; }
957
 
958
  .select2-results .select2-result.alm-color.green .select2-result-label:after {
959
+ background-color: #80ca7a; }
960
 
961
  .select2-results .select2-result.alm-color.purple .select2-result-label:after {
962
+ background-color: #b97eca; }
963
 
964
  .select2-results .select2-result.alm-color.grey .select2-result-label:after {
965
+ background-color: #a09e9e; }
966
 
967
  .select2-results .select2-result.infinite .select2-result-label:after {
968
  display: none; }
1162
  margin: 0 0 20px;
1163
  border-bottom: 1px solid #f1f1f1; }
1164
 
1165
+ .woocommerce-help--item {
1166
+ width: 100%;
1167
+ display: -webkit-box;
1168
+ display: -ms-flexbox;
1169
+ display: flex;
1170
+ -ms-flex-wrap: nowrap;
1171
+ flex-wrap: nowrap;
1172
+ -webkit-box-align: center;
1173
+ -ms-flex-align: center;
1174
+ align-items: center;
1175
+ padding-top: 20px;
1176
+ margin-top: 20px;
1177
+ border-top: 1px solid #efefef; }
1178
+ .woocommerce-help--item div {
1179
+ -webkit-box-flex: 1;
1180
+ -ms-flex: 1;
1181
+ flex: 1;
1182
+ padding: 20px 20px 20px 30px; }
1183
+ @media screen and (max-width: 600px) {
1184
+ .woocommerce-help--item div {
1185
+ padding: 20px 0; } }
1186
+ .woocommerce-help--item .img {
1187
+ padding: 0;
1188
+ -webkit-box-flex: 0;
1189
+ -ms-flex: none;
1190
+ flex: none;
1191
+ width: 30%; }
1192
+ @media screen and (max-width: 600px) {
1193
+ .woocommerce-help--item .img {
1194
+ display: none; } }
1195
+ .woocommerce-help--item .img img {
1196
+ border: 1px solid #efefef;
1197
+ padding: 2px;
1198
+ border-radius: 4px; }
1199
+
1200
  .ajax-load-more .builder-option-toggle {
1201
  display: -webkit-box;
1202
  display: -ms-flexbox;
1258
  body.ajax-load-more_page_ajax-load-more-cache,
1259
  body.ajax-load-more_page_ajax-load-more-filters,
1260
  body.ajax-load-more_page_ajax-load-more-pro,
1261
+ body.ajax-load-more_page_ajax-load-more-go-pro,
1262
+ body.ajax-load-more_page_ajax-load-more-woocommerce {
1263
  background-color: #f7f7f7; }
1264
  body.toplevel_page_ajax-load-more #wpcontent,
1265
  body.ajax-load-more_page_ajax-load-more-repeaters #wpcontent,
1271
  body.ajax-load-more_page_ajax-load-more-cache #wpcontent,
1272
  body.ajax-load-more_page_ajax-load-more-filters #wpcontent,
1273
  body.ajax-load-more_page_ajax-load-more-pro #wpcontent,
1274
+ body.ajax-load-more_page_ajax-load-more-go-pro #wpcontent,
1275
+ body.ajax-load-more_page_ajax-load-more-woocommerce #wpcontent {
1276
  padding-left: 0;
1277
+ padding-bottom: 20px;
1278
  background-color: #efefef; }
1279
  body.toplevel_page_ajax-load-more #wpbody-content,
1280
  body.ajax-load-more_page_ajax-load-more-repeaters #wpbody-content,
1286
  body.ajax-load-more_page_ajax-load-more-cache #wpbody-content,
1287
  body.ajax-load-more_page_ajax-load-more-filters #wpbody-content,
1288
  body.ajax-load-more_page_ajax-load-more-pro #wpbody-content,
1289
+ body.ajax-load-more_page_ajax-load-more-go-pro #wpbody-content,
1290
+ body.ajax-load-more_page_ajax-load-more-woocommerce #wpbody-content {
1291
  padding-bottom: 0; }
1292
 
1293
  body.toplevel_page_ajax-load-more,
1300
  body.ajax-load-more_page_ajax-load-more-cache,
1301
  body.ajax-load-more_page_ajax-load-more-filters,
1302
  body.ajax-load-more_page_ajax-load-more-pro,
1303
+ body.ajax-load-more_page_ajax-load-more-go-pro,
1304
+ body.ajax-load-more_page_ajax-load-more-woocommerce {
1305
  background: #efefef; }
1306
  body.toplevel_page_ajax-load-more #wpfooter,
1307
  body.ajax-load-more_page_ajax-load-more-repeaters #wpfooter,
1313
  body.ajax-load-more_page_ajax-load-more-cache #wpfooter,
1314
  body.ajax-load-more_page_ajax-load-more-filters #wpfooter,
1315
  body.ajax-load-more_page_ajax-load-more-pro #wpfooter,
1316
+ body.ajax-load-more_page_ajax-load-more-go-pro #wpfooter,
1317
+ body.ajax-load-more_page_ajax-load-more-woocommerce #wpfooter {
1318
  padding-top: 0;
1319
  padding-bottom: 0;
1320
  line-height: 40px;
1333
  body.ajax-load-more_page_ajax-load-more-cache #wpfooter p,
1334
  body.ajax-load-more_page_ajax-load-more-filters #wpfooter p,
1335
  body.ajax-load-more_page_ajax-load-more-pro #wpfooter p,
1336
+ body.ajax-load-more_page_ajax-load-more-go-pro #wpfooter p,
1337
+ body.ajax-load-more_page_ajax-load-more-woocommerce #wpfooter p {
1338
  line-height: 40px; }
1339
  @media screen and (min-width: 901px) {
1340
  body.toplevel_page_ajax-load-more .ajax-load-more .cnkt-main,
1347
  body.ajax-load-more_page_ajax-load-more-cache .ajax-load-more .cnkt-main,
1348
  body.ajax-load-more_page_ajax-load-more-filters .ajax-load-more .cnkt-main,
1349
  body.ajax-load-more_page_ajax-load-more-pro .ajax-load-more .cnkt-main,
1350
+ body.ajax-load-more_page_ajax-load-more-go-pro .ajax-load-more .cnkt-main,
1351
+ body.ajax-load-more_page_ajax-load-more-woocommerce .ajax-load-more .cnkt-main {
1352
  min-height: 100vh; } }
1353
 
1354
  body.ajax-load-more_page_ajax-load-more-extensions,
1518
  .ajax-load-more textarea,
1519
  .ajax-load-more label {
1520
  font-size: 14px; }
1521
+ .ajax-load-more p.lg,
1522
+ .ajax-load-more li.lg,
1523
+ .ajax-load-more input.lg,
1524
+ .ajax-load-more textarea.lg,
1525
+ .ajax-load-more label.lg {
1526
+ font-size: 16px; }
1527
 
1528
  textarea#_alm_layouts_css {
1529
  height: 240px; }
2554
  .admin.ajax-load-more .ajax-load-more-wrap {
2555
  position: relative;
2556
  top: 5px;
2557
+ padding: 15px;
2558
+ border: 1px dashed #e1e1e1;
2559
  display: inline-block;
2560
  margin-top: 10px;
2561
  margin-bottom: 10px; }
2568
  font-size: 10px;
2569
  line-height: 1;
2570
  opacity: 0.7;
2571
+ padding: 0 0 15px;
2572
  text-transform: uppercase; }
2573
 
2574
  .admin.ajax-load-more.settings .ajax-load-more-wrap.pages li {
4145
  background-image: url("../../img/column-3.png");
4146
  width: 36px; }
4147
 
4148
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-4 {
4149
+ background-image: url("../../img/column-4.png");
4150
+ width: 36px; }
4151
+
4152
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1.updating,
4153
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2.updating,
4154
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3.updating {
admin/dist/js/admin.js CHANGED
@@ -1446,21 +1446,15 @@ jQuery(document).ready(function ($) {
1446
  $("select#alm_settings_btn_color").change(function () {
1447
  var color = jQuery(this).val();
1448
  // Remove other colors
1449
- $('.ajax-load-more-wrap.core.preview-pane').removeClass('none');
1450
- $('.ajax-load-more-wrap.core').removeClass('default');
1451
- $('.ajax-load-more-wrap.core').removeClass('grey');
1452
- $('.ajax-load-more-wrap.core').removeClass('purple');
1453
- $('.ajax-load-more-wrap.core').removeClass('green');
1454
- $('.ajax-load-more-wrap.core').removeClass('red');
1455
- $('.ajax-load-more-wrap.core').removeClass('blue');
1456
- $('.ajax-load-more-wrap.core').removeClass('white');
1457
- $('.ajax-load-more-wrap.core').removeClass('infinite');
1458
- $('.ajax-load-more-wrap.core').removeClass('skype');
1459
- $('.ajax-load-more-wrap.core').removeClass('ring');
1460
- $('.ajax-load-more-wrap.core').removeClass('fading-blocks');
1461
- $('.ajax-load-more-wrap.core').removeClass('fading-circles');
1462
- $('.ajax-load-more-wrap.core').removeClass('chasing-arrows');
1463
- $('.ajax-load-more-wrap.core').addClass(color);
1464
  });
1465
 
1466
  $("select#alm_settings_btn_color").click(function (e) {
1446
  $("select#alm_settings_btn_color").change(function () {
1447
  var color = jQuery(this).val();
1448
  // Remove other colors
1449
+
1450
+ $(".alm-btn-wrap .ajax-load-more-wrap").attr('class', 'ajax-load-more-wrap');
1451
+ $('.alm-btn-wrap .ajax-load-more-wrap').addClass(color);
1452
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').removeClass('loading');
1453
+
1454
+ // Add loading class if Infinite loading style
1455
+ if (color.indexOf("infinite") >= 0) {
1456
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').addClass('loading');
1457
+ }
 
 
 
 
 
 
1458
  });
1459
 
1460
  $("select#alm_settings_btn_color").click(function (e) {
admin/editor/editor-build.php CHANGED
File without changes
admin/editor/editor.php CHANGED
File without changes
admin/editor/js/editor-btn.js CHANGED
File without changes
admin/img/add-ons/cache-add-on.jpg CHANGED
File without changes
admin/img/add-ons/comments-add-on.jpg CHANGED
File without changes
admin/img/add-ons/cta-add-on.jpg CHANGED
File without changes
admin/img/add-ons/filters-add-on.jpg CHANGED
File without changes
admin/img/add-ons/layouts-add-on.jpg CHANGED
File without changes
admin/img/add-ons/next-page-add-on.jpg CHANGED
File without changes
admin/img/add-ons/paging-add-ons.jpg CHANGED
File without changes
admin/img/add-ons/preloaded-add-ons.jpg CHANGED
File without changes
admin/img/add-ons/prev-post-add-on.jpg CHANGED
File without changes
admin/img/add-ons/pro-bundle-add-on.png CHANGED
File without changes
admin/img/add-ons/repeater-add-ons.jpg CHANGED
File without changes
admin/img/add-ons/seo-add-ons.jpg CHANGED
File without changes
admin/img/add-ons/shortcode-editor.jpg CHANGED
File without changes
admin/img/add-ons/theme-repeater-add-on.jpg CHANGED
File without changes
admin/img/add-ons/unlimited-add-ons.jpg CHANGED
File without changes
admin/img/add-ons/users-add-on.jpg CHANGED
File without changes
admin/img/add-ons/woocommerce-add-on.jpg ADDED
Binary file
admin/img/alm-logo-16x16.svg CHANGED
File without changes
admin/img/alm-logo-32x32.png CHANGED
File without changes
admin/img/alm-logo-48x48.png CHANGED
File without changes
admin/img/alm-logo-48x48.svg CHANGED
File without changes
admin/img/bkg-chkbox_off.png CHANGED
File without changes
admin/img/bkg-chkbox_on.png CHANGED
File without changes
admin/img/bkg-chkbox_selected.png CHANGED
File without changes
admin/img/bkg-radio_off.png CHANGED
File without changes
admin/img/bkg-radio_on.png CHANGED
File without changes
admin/img/bkg-radio_selected.png CHANGED
File without changes
admin/img/bkg-select.png CHANGED
File without changes
admin/img/column-1.png CHANGED
File without changes
admin/img/column-2.png CHANGED
File without changes
admin/img/column-3.png CHANGED
File without changes
admin/img/column-4.png ADDED
Binary file
admin/img/directory-list-btm.gif CHANGED
File without changes
admin/img/directory-list.gif CHANGED
File without changes
admin/img/ico-close.png CHANGED
File without changes
admin/img/infographic.png CHANGED
File without changes
admin/img/loader-unlimited.gif CHANGED
File without changes
admin/img/loader.gif CHANGED
File without changes
admin/img/logos/broadcast-48x48.png CHANGED
File without changes
admin/img/logos/eq-48x48.png CHANGED
File without changes
admin/img/logos/instant-images-48x48.png CHANGED
File without changes
admin/img/logos/post-explorer-48x48.png CHANGED
File without changes
admin/img/logos/velocity-48x48.png CHANGED
File without changes
admin/img/select2.png CHANGED
File without changes
admin/includes/components/custom-layouts.php CHANGED
File without changes
admin/includes/components/example-list.php CHANGED
File without changes
admin/includes/components/layout-list.php CHANGED
File without changes
admin/includes/components/repeater-options.php CHANGED
File without changes
admin/includes/cta/about.php CHANGED
File without changes
admin/includes/cta/add-ons.php CHANGED
File without changes
admin/includes/cta/config.php CHANGED
File without changes
admin/includes/cta/dyk.php CHANGED
File without changes
admin/includes/cta/extend.php CHANGED
File without changes
admin/includes/cta/pro-hero.php CHANGED
File without changes
admin/includes/cta/resources.php CHANGED
File without changes
admin/includes/cta/reviews.php CHANGED
File without changes
admin/includes/cta/sharing.php CHANGED
File without changes
admin/includes/cta/test.php CHANGED
File without changes
admin/includes/cta/writeable.php CHANGED
File without changes
admin/includes/layout/default.php CHANGED
File without changes
admin/index.php CHANGED
File without changes
admin/shortcode-builder/components/acf.php CHANGED
File without changes
admin/shortcode-builder/components/cache.php CHANGED
File without changes
admin/shortcode-builder/components/comments.php CHANGED
File without changes
admin/shortcode-builder/components/cta.php CHANGED
File without changes
admin/shortcode-builder/components/filters.php CHANGED
File without changes
admin/shortcode-builder/components/nextpage.php CHANGED
File without changes
admin/shortcode-builder/components/paging.php CHANGED
File without changes
admin/shortcode-builder/components/preloaded.php CHANGED
File without changes
admin/shortcode-builder/components/rest-api.php CHANGED
File without changes
admin/shortcode-builder/components/seo.php CHANGED
File without changes
admin/shortcode-builder/components/single-post.php CHANGED
File without changes
admin/shortcode-builder/components/users.php CHANGED
File without changes
admin/shortcode-builder/includes/meta-query-options.php CHANGED
File without changes
admin/shortcode-builder/includes/tax-query-options.php CHANGED
File without changes
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -168,11 +168,16 @@ jQuery(document).ready(function($) {
168
  var loading_style = $('select#loading-style').val();
169
  var loading_style_default = $('select#loading-style').data('default');
170
  var loading_style_target = $('select#loading-style').parent().find('.ajax-load-more-wrap');
171
-
172
  if(loading_style_target){
173
  var loading_style_base = loading_style_target.data('base');
174
  loading_style_target.removeAttr('class');
175
  loading_style_target.attr('class', loading_style_base + loading_style);
 
 
 
 
 
 
176
  }
177
  if(loading_style && loading_style !== loading_style_default){
178
  output += ' loading_style="'+loading_style+'"';
@@ -1721,6 +1726,17 @@ jQuery(document).ready(function($) {
1721
  _alm.generateUniqueID(10, el);
1722
  });
1723
 
 
 
 
 
 
 
 
 
 
 
 
1724
 
1725
 
1726
  });
168
  var loading_style = $('select#loading-style').val();
169
  var loading_style_default = $('select#loading-style').data('default');
170
  var loading_style_target = $('select#loading-style').parent().find('.ajax-load-more-wrap');
 
171
  if(loading_style_target){
172
  var loading_style_base = loading_style_target.data('base');
173
  loading_style_target.removeAttr('class');
174
  loading_style_target.attr('class', loading_style_base + loading_style);
175
+ if(loading_style.indexOf('infinite') !== -1){
176
+ $('.ajax-load-more-wrap button').addClass('loading');
177
+ } else {
178
+ $('.ajax-load-more-wrap button').removeClass('loading');
179
+ }
180
+
181
  }
182
  if(loading_style && loading_style !== loading_style_default){
183
  output += ' loading_style="'+loading_style+'"';
1726
  _alm.generateUniqueID(10, el);
1727
  });
1728
 
1729
+
1730
+ // Button loader preview.
1731
+ $('.ajax-load-more-wrap button').on('click', function(e){
1732
+ var button = $(this).get(0);
1733
+ var parent = button.parentNode;
1734
+ if(parent.classList.contains('infinite')){
1735
+ $(this).addClass('loading');
1736
+ } else {
1737
+ $(this).toggleClass('loading');
1738
+ }
1739
+ });
1740
 
1741
 
1742
  });
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -11,6 +11,7 @@
11
  $alm_options['_alm_disable_dynamic'] = '0';
12
  }
13
  $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
 
14
  ?>
15
 
16
 
@@ -83,13 +84,17 @@
83
  <div class="shortcode-builder--fields">
84
  <div class="inner">
85
  <select id="loading-style" class="alm_element" data-default="<?php echo $loading_style; ?>">
86
- <optgroup label="<?php _e('Button', 'ajax-load-more'); ?>">
87
- <option value="default" class="alm-color default"<?php echo ($loading_style === 'default') ? $selected : ''; ?>>Default</option>
88
  <option value="blue" class="alm-color blue"<?php echo ($loading_style === 'blue') ? $selected : ''; ?>>Blue</option>
89
  <option value="green" class="alm-color green"<?php echo ($loading_style === 'green') ? $selected : ''; ?>>Green</option>
90
  <option value="purple" class="alm-color purple"<?php echo ($loading_style === 'purple') ? $selected : ''; ?>>Purple</option>
91
  <option value="grey" class="alm-color grey"<?php echo ($loading_style === 'grey') ? $selected : ''; ?>>Grey</option>
92
  </optgroup>
 
 
 
 
93
  <optgroup label="<?php _e('Infinite Scroll (No Button)', 'ajax-load-more'); ?>">
94
  <option value="infinite classic" class="infinite classic"<?php echo ($loading_style === 'infinite classic') ? $selected : ''; ?>>Classic</option>
95
  <option value="infinite skype" class="infinite skype"<?php echo ($loading_style === 'infinite skype') ? $selected : ''; ?>>Skype</option>
@@ -102,8 +107,8 @@
102
  <div class="clear"></div>
103
  <div class="alm-btn-wrap">
104
  <div class="ajax-load-more-wrap core target <?php echo $loading_style; ?>" data-base="ajax-load-more-wrap core ">
105
- <span><?php _e('Preview', 'ajax-load-more'); ?></span>
106
- <button class="alm-load-more-btn loading" disabled="disabled">
107
  <?php echo apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')) ;?>
108
  </button>
109
  </div>
@@ -824,9 +829,12 @@
824
  $cats = 'null';
825
  }else{
826
  $cats = get_categories();
 
 
 
827
  }
828
  if($cats){
829
- $cat_link = 'https://codex.wordpress.org/Class_Reference/WP_Query#Category_Parameters';
830
  ?>
831
  <div class="row checkboxes categories" id="alm-categories">
832
  <h3 class="heading" tabindex="0"><?php _e('Category', 'ajax-load-more'); ?></h3>
@@ -849,7 +857,7 @@
849
  }
850
  echo '</select>';
851
  }else{
852
- echo '<input type="text" class="alm_element" name="category-select" id="category-select" placeholder="design, development, science etc...">';
853
  }
854
  ?>
855
  </div>
@@ -914,6 +922,9 @@
914
  $tags = 'null';
915
  }else{
916
  $tags = get_tags();
 
 
 
917
  }
918
  if($tags){
919
  $tag_link = 'https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters';
@@ -941,7 +952,7 @@
941
  }
942
  echo '</select>';
943
  }else{
944
- echo '<input type="text" class="alm_element" name="tag-select" id="tag-select" placeholder="hockey, puck, crosby etc...">';
945
  }
946
  ?>
947
  </div>
11
  $alm_options['_alm_disable_dynamic'] = '0';
12
  }
13
  $disable_dynamic_content = $alm_options['_alm_disable_dynamic'];
14
+ $show_max = 100; // Max number of items to show in tags, cats and taxonomies
15
  ?>
16
 
17
 
84
  <div class="shortcode-builder--fields">
85
  <div class="inner">
86
  <select id="loading-style" class="alm_element" data-default="<?php echo $loading_style; ?>">
87
+ <optgroup label="<?php _e('Button Style (Dark)', 'ajax-load-more'); ?>">
88
+ <option value="default" class="alm-color default"<?php echo ($loading_style === 'default') ? $selected : ''; ?>>Red (Default)</option>
89
  <option value="blue" class="alm-color blue"<?php echo ($loading_style === 'blue') ? $selected : ''; ?>>Blue</option>
90
  <option value="green" class="alm-color green"<?php echo ($loading_style === 'green') ? $selected : ''; ?>>Green</option>
91
  <option value="purple" class="alm-color purple"<?php echo ($loading_style === 'purple') ? $selected : ''; ?>>Purple</option>
92
  <option value="grey" class="alm-color grey"<?php echo ($loading_style === 'grey') ? $selected : ''; ?>>Grey</option>
93
  </optgroup>
94
+ <optgroup label="<?php _e('Button Style (Light)', 'ajax-load-more'); ?>">
95
+ <option value="white" class="alm-color white"<?php echo ($loading_style === 'white') ? $selected : ''; ?>>White</option>
96
+ <option value="light-grey" class="alm-color light-grey"<?php echo ($loading_style === 'light-grey') ? $selected : ''; ?>>Light Grey</option>
97
+ </optgroup>
98
  <optgroup label="<?php _e('Infinite Scroll (No Button)', 'ajax-load-more'); ?>">
99
  <option value="infinite classic" class="infinite classic"<?php echo ($loading_style === 'infinite classic') ? $selected : ''; ?>>Classic</option>
100
  <option value="infinite skype" class="infinite skype"<?php echo ($loading_style === 'infinite skype') ? $selected : ''; ?>>Skype</option>
107
  <div class="clear"></div>
108
  <div class="alm-btn-wrap">
109
  <div class="ajax-load-more-wrap core target <?php echo $loading_style; ?>" data-base="ajax-load-more-wrap core ">
110
+ <span><?php _e('CLICK TO PREVIEW', 'ajax-load-more'); ?></span>
111
+ <button class="alm-load-more-btn" type="button">
112
  <?php echo apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')) ;?>
113
  </button>
114
  </div>
829
  $cats = 'null';
830
  }else{
831
  $cats = get_categories();
832
+ if(count($cats) > $show_max){
833
+ $disable_dynamic_content = true;
834
+ }
835
  }
836
  if($cats){
837
+ $cat_link = 'https://developer.wordpress.org/reference/classes/wp_query/#category-parameters';
838
  ?>
839
  <div class="row checkboxes categories" id="alm-categories">
840
  <h3 class="heading" tabindex="0"><?php _e('Category', 'ajax-load-more'); ?></h3>
857
  }
858
  echo '</select>';
859
  }else{
860
+ echo '<input type="text" class="alm_element" name="category-select" id="category-select" placeholder="design, development, science etc..." style="margin-bottom: 15px;">';
861
  }
862
  ?>
863
  </div>
922
  $tags = 'null';
923
  }else{
924
  $tags = get_tags();
925
+ if(count($tags) > 3){
926
+ $disable_dynamic_content = true;
927
+ }
928
  }
929
  if($tags){
930
  $tag_link = 'https://codex.wordpress.org/Class_Reference/WP_Query#Tag_Parameters';
952
  }
953
  echo '</select>';
954
  }else{
955
+ echo '<input type="text" class="alm_element" name="tag-select" id="tag-select" placeholder="hockey, toronto, canada etc..." style="margin-bottom: 20px;">';
956
  }
957
  ?>
958
  </div>
admin/src/js/admin.js CHANGED
@@ -198,21 +198,16 @@ jQuery(document).ready(function($) {
198
  $("select#alm_settings_btn_color").change(function() {
199
  var color = jQuery(this).val();
200
  // Remove other colors
201
- $('.ajax-load-more-wrap.core.preview-pane').removeClass('none');
202
- $('.ajax-load-more-wrap.core').removeClass('default');
203
- $('.ajax-load-more-wrap.core').removeClass('grey');
204
- $('.ajax-load-more-wrap.core').removeClass('purple');
205
- $('.ajax-load-more-wrap.core').removeClass('green');
206
- $('.ajax-load-more-wrap.core').removeClass('red');
207
- $('.ajax-load-more-wrap.core').removeClass('blue');
208
- $('.ajax-load-more-wrap.core').removeClass('white');
209
- $('.ajax-load-more-wrap.core').removeClass('infinite');
210
- $('.ajax-load-more-wrap.core').removeClass('skype');
211
- $('.ajax-load-more-wrap.core').removeClass('ring');
212
- $('.ajax-load-more-wrap.core').removeClass('fading-blocks');
213
- $('.ajax-load-more-wrap.core').removeClass('fading-circles');
214
- $('.ajax-load-more-wrap.core').removeClass('chasing-arrows');
215
- $('.ajax-load-more-wrap.core').addClass(color);
216
  });
217
 
218
  $("select#alm_settings_btn_color").click(function(e){
198
  $("select#alm_settings_btn_color").change(function() {
199
  var color = jQuery(this).val();
200
  // Remove other colors
201
+
202
+ $(".alm-btn-wrap .ajax-load-more-wrap").attr('class', 'ajax-load-more-wrap');
203
+ $('.alm-btn-wrap .ajax-load-more-wrap').addClass(color);
204
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').removeClass('loading');
205
+
206
+ // Add loading class if Infinite loading style
207
+ if (color.indexOf("infinite") >= 0){
208
+ $('.alm-btn-wrap .ajax-load-more-wrap #test-alm-button').addClass('loading');
209
+ }
210
+
 
 
 
 
 
211
  });
212
 
213
  $("select#alm_settings_btn_color").click(function(e){
admin/src/scss/admin.scss CHANGED
@@ -9,7 +9,8 @@
9
  'partials/alm-settings-feedback',
10
  'partials/select2',
11
  'partials/shortcode-builder',
12
- 'partials/_builder-option-toggle';
 
13
 
14
  body.toplevel_page_ajax-load-more,
15
  body.ajax-load-more_page_ajax-load-more-repeaters,
@@ -21,11 +22,12 @@ body.ajax-load-more_page_ajax-load-more-licenses,
21
  body.ajax-load-more_page_ajax-load-more-cache,
22
  body.ajax-load-more_page_ajax-load-more-filters,
23
  body.ajax-load-more_page_ajax-load-more-pro,
24
- body.ajax-load-more_page_ajax-load-more-go-pro{
 
25
  background-color: #f7f7f7;
26
  #wpcontent{
27
  padding-left: 0;
28
- padding-bottom: 40px;
29
  background-color: #efefef;
30
  }
31
  #wpbody-content{
@@ -42,7 +44,8 @@ body.ajax-load-more_page_ajax-load-more-licenses,
42
  body.ajax-load-more_page_ajax-load-more-cache,
43
  body.ajax-load-more_page_ajax-load-more-filters,
44
  body.ajax-load-more_page_ajax-load-more-pro,
45
- body.ajax-load-more_page_ajax-load-more-go-pro{
 
46
  background: #efefef;
47
  #wpfooter {
48
  padding-top: 0;
@@ -252,7 +255,7 @@ body.ajax-load-more_page_ajax-load-more-pro{
252
  clear: both;
253
  text-transform: none;
254
  padding: 0;
255
- margin:0 0 15px;
256
  }
257
 
258
  .ajax-load-more p,
@@ -261,6 +264,9 @@ body.ajax-load-more_page_ajax-load-more-pro{
261
  .ajax-load-more textarea,
262
  .ajax-load-more label{
263
  font-size: 14px;
 
 
 
264
  }
265
  textarea#_alm_layouts_css{
266
  height: 240px;
@@ -1391,8 +1397,8 @@ hr.indented{ // Indented as fake padding in shortcode builder
1391
  .admin.ajax-load-more .ajax-load-more-wrap {
1392
  position: relative;
1393
  top: 5px;
1394
- padding: 15px 17px 17px;
1395
- border: 2px dashed #efefef;
1396
  display: inline-block;
1397
  margin-top:10px;
1398
  margin-bottom: 10px;
@@ -1407,7 +1413,7 @@ hr.indented{ // Indented as fake padding in shortcode builder
1407
  font-size: 10px;
1408
  line-height: 1;
1409
  opacity: 0.7;
1410
- padding: 0 0 8px;
1411
  text-transform: uppercase;
1412
  }
1413
  }
@@ -3115,6 +3121,10 @@ p.theme-title{
3115
  background-image: url('../../img/column-3.png');
3116
  width: 36px;
3117
  }
 
 
 
 
3118
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1.updating,
3119
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2.updating,
3120
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3.updating{
9
  'partials/alm-settings-feedback',
10
  'partials/select2',
11
  'partials/shortcode-builder',
12
+ 'partials/woocommerce',
13
+ 'partials/builder-option-toggle';
14
 
15
  body.toplevel_page_ajax-load-more,
16
  body.ajax-load-more_page_ajax-load-more-repeaters,
22
  body.ajax-load-more_page_ajax-load-more-cache,
23
  body.ajax-load-more_page_ajax-load-more-filters,
24
  body.ajax-load-more_page_ajax-load-more-pro,
25
+ body.ajax-load-more_page_ajax-load-more-go-pro,
26
+ body.ajax-load-more_page_ajax-load-more-woocommerce{
27
  background-color: #f7f7f7;
28
  #wpcontent{
29
  padding-left: 0;
30
+ padding-bottom: 20px;
31
  background-color: #efefef;
32
  }
33
  #wpbody-content{
44
  body.ajax-load-more_page_ajax-load-more-cache,
45
  body.ajax-load-more_page_ajax-load-more-filters,
46
  body.ajax-load-more_page_ajax-load-more-pro,
47
+ body.ajax-load-more_page_ajax-load-more-go-pro,
48
+ body.ajax-load-more_page_ajax-load-more-woocommerce{
49
  background: #efefef;
50
  #wpfooter {
51
  padding-top: 0;
255
  clear: both;
256
  text-transform: none;
257
  padding: 0;
258
+ margin: 0 0 15px;
259
  }
260
 
261
  .ajax-load-more p,
264
  .ajax-load-more textarea,
265
  .ajax-load-more label{
266
  font-size: 14px;
267
+ &.lg{
268
+ font-size: 16px
269
+ }
270
  }
271
  textarea#_alm_layouts_css{
272
  height: 240px;
1397
  .admin.ajax-load-more .ajax-load-more-wrap {
1398
  position: relative;
1399
  top: 5px;
1400
+ padding: 15px;
1401
+ border: 1px dashed #e1e1e1;
1402
  display: inline-block;
1403
  margin-top:10px;
1404
  margin-bottom: 10px;
1413
  font-size: 10px;
1414
  line-height: 1;
1415
  opacity: 0.7;
1416
+ padding: 0 0 15px;
1417
  text-transform: uppercase;
1418
  }
1419
  }
3121
  background-image: url('../../img/column-3.png');
3122
  width: 36px;
3123
  }
3124
+ .alm-drop-btn.alm-layout-selection li.type .col-select a.column-4{
3125
+ background-image: url('../../img/column-4.png');
3126
+ width: 36px;
3127
+ }
3128
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-1.updating,
3129
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-2.updating,
3130
  .alm-drop-btn.alm-layout-selection li.type .col-select a.column-3.updating{
admin/src/scss/partials/_select2.scss CHANGED
@@ -17,17 +17,25 @@
17
  .select2-results .select2-result.alm-color.default .select2-result-label:after{
18
  background-color: #ed7070;
19
  }
 
 
 
 
 
 
 
 
20
  .select2-results .select2-result.alm-color.blue .select2-result-label:after{
21
- background-color: #0081bf;
22
  }
23
  .select2-results .select2-result.alm-color.green .select2-result-label:after{
24
- background-color: #6fca68;
25
  }
26
  .select2-results .select2-result.alm-color.purple .select2-result-label:after{
27
- background-color: #a86bb9;
28
  }
29
  .select2-results .select2-result.alm-color.grey .select2-result-label:after{
30
- background-color: #888;
31
  }
32
  .select2-results .select2-result.infinite .select2-result-label:after{
33
  display: none;
17
  .select2-results .select2-result.alm-color.default .select2-result-label:after{
18
  background-color: #ed7070;
19
  }
20
+ .select2-results .select2-result.alm-color.white .select2-result-label:after{
21
+ background-color: #fff;
22
+ box-shadow: 0 0 0 1px #ccc;
23
+ }
24
+ .select2-results .select2-result.alm-color.light-grey .select2-result-label:after{
25
+ background-color: #efefef;
26
+ box-shadow: 0 0 0 1px #ccc;
27
+ }
28
  .select2-results .select2-result.alm-color.blue .select2-result-label:after{
29
+ background-color: #1b91ca;
30
  }
31
  .select2-results .select2-result.alm-color.green .select2-result-label:after{
32
+ background-color: #80ca7a;
33
  }
34
  .select2-results .select2-result.alm-color.purple .select2-result-label:after{
35
+ background-color: #b97eca;
36
  }
37
  .select2-results .select2-result.alm-color.grey .select2-result-label:after{
38
+ background-color: #a09e9e;
39
  }
40
  .select2-results .select2-result.infinite .select2-result-label:after{
41
  display: none;
admin/src/scss/partials/_woocommerce.scss ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .woocommerce-intro{
2
+ }
3
+ .woocommerce-help{
4
+ &--item{
5
+ width: 100%;
6
+ display: flex;
7
+ flex-wrap: nowrap;
8
+ align-items: center;
9
+ padding-top: 20px;
10
+ margin-top: 20px;
11
+ border-top: 1px solid #efefef;
12
+ div{
13
+ flex: 1;
14
+ padding: 20px 20px 20px 30px;
15
+ @media screen and (max-width: 600px){
16
+ padding: 20px 0;
17
+ }
18
+ }
19
+ .img{
20
+ padding: 0;
21
+ flex: none;
22
+ width: 30%;
23
+ @media screen and (max-width: 600px){
24
+ display: none;
25
+ }
26
+ img{
27
+ border: 1px solid #efefef;
28
+ padding: 2px;
29
+ border-radius: 4px;
30
+ }
31
+ }
32
+ }
33
+ }
admin/views/add-ons.php CHANGED
File without changes
admin/views/extensions.php CHANGED
@@ -24,6 +24,9 @@
24
  ),
25
  array(
26
  'slug' => 'ajax-load-more-for-searchwp'
 
 
 
27
  )
28
  );
29
  if(class_exists('Connekt_Plugin_Installer')){
24
  ),
25
  array(
26
  'slug' => 'ajax-load-more-for-searchwp'
27
+ ),
28
+ array(
29
+ 'slug' => 'ajax-load-more-for-terms'
30
  )
31
  );
32
  if(class_exists('Connekt_Plugin_Installer')){
admin/views/go-pro.php CHANGED
File without changes
admin/views/help.php CHANGED
File without changes
admin/views/licenses.php CHANGED
File without changes
admin/views/repeater-templates.php CHANGED
File without changes
admin/views/settings.php CHANGED
File without changes
admin/views/shortcode-builder.php CHANGED
File without changes
ajax-load-more.php CHANGED
@@ -6,15 +6,15 @@ Description: The ultimate solution to add infinite scroll functionality to your
6
  Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
- Author URI: https://connekthq.com
10
- Version: 5.2.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
- define('ALM_VERSION', '5.2.0');
17
- define('ALM_RELEASE', 'March 13, 2020');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
@@ -27,7 +27,7 @@ define('ALM_STORE_URL', 'https://connekthq.com');
27
  */
28
 
29
  function alm_install($network_wide) {
30
-
31
  global $wpdb;
32
  add_option( "alm_version", ALM_VERSION ); // Add to WP Option tbl
33
  if ( is_multisite() && $network_wide ) {
@@ -41,7 +41,7 @@ function alm_install($network_wide) {
41
  } else {
42
  alm_create_table();
43
  }
44
-
45
  }
46
  register_activation_hook( __FILE__, 'alm_install' );
47
  add_action( 'wpmu_new_blog', 'alm_install' );
@@ -73,7 +73,7 @@ function alm_create_table(){
73
  $w = fwrite($tmp, $defaultRepeater);
74
  fclose($tmp);
75
  }
76
-
77
  // Exit if Repeater Templates are disbaled, we don't want to create the table
78
  if( defined('ALM_DISABLE_REPEATER_TEMPLATES') && ALM_DISABLE_REPEATER_TEMPLATES ){
79
  return false;
@@ -94,7 +94,7 @@ function alm_create_table(){
94
  // Insert the default data in created table
95
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'repeaterType' => 'default', 'pluginVersion' => ALM_VERSION));
96
  }
97
-
98
  }
99
 
100
 
@@ -122,7 +122,7 @@ if( !class_exists('AjaxLoadMore') ):
122
 
123
  $this->alm_define_constants();
124
  $this->alm_includes();
125
-
126
  add_action( 'wp_ajax_alm_get_posts', array(&$this, 'alm_query_posts') );
127
  add_action( 'wp_ajax_nopriv_alm_get_posts', array(&$this, 'alm_query_posts') );
128
  add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
@@ -168,10 +168,11 @@ if( !class_exists('AjaxLoadMore') ):
168
  if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
169
  if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105'); // Deprecated
170
  if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
171
- if (!defined('ALM_TABS_ITEM_NAME')) define('ALM_TABS_ITEM_NAME', '54855');
172
  if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
173
  if (!defined('ALM_USERS_ITEM_NAME')) define('ALM_USERS_ITEM_NAME', '32311');
174
  if (!defined('ALM_PRO_ITEM_NAME')) define('ALM_PRO_ITEM_NAME', '42166');
 
175
 
176
  }
177
 
@@ -262,7 +263,7 @@ if( !class_exists('AjaxLoadMore') ):
262
  * @since 2.0.0
263
  */
264
  public function alm_includes(){
265
-
266
  include_once( ALM_PATH . 'core/functions.php'); // Load Core Functions
267
  include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Load Shortcode Class
268
  include_once( ALM_PATH . 'core/classes/class.alm-woocommerce.php'); // Load Woocommerce Class
@@ -279,7 +280,7 @@ if( !class_exists('AjaxLoadMore') ):
279
  include( dirname( __FILE__ ) . '/vendor/EDD_SL_Plugin_Updater.php' );
280
  }
281
  }
282
-
283
  }
284
 
285
 
@@ -370,7 +371,7 @@ if( !class_exists('AjaxLoadMore') ):
370
 
371
  // Callback Helpers
372
  wp_register_script( 'ajax-load-more-legacy-callbacks', plugins_url( '/vendor/js/alm/legacy-callbacks.js', __FILE__ ), 'jquery', '', false);
373
-
374
 
375
  // Core CSS
376
  if( !alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css')){ // Not inline or disabled
@@ -380,8 +381,8 @@ if( !class_exists('AjaxLoadMore') ):
380
 
381
  // Prevent loading of unnessasry posts - move user to top of page
382
  $scrolltop = (!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1') ? 'false' : 'true';
383
-
384
-
385
  // Localized JS variables
386
  wp_localize_script(
387
  'ajax-load-more',
@@ -395,9 +396,10 @@ if( !class_exists('AjaxLoadMore') ):
395
  'ga_debug' => apply_filters('alm_ga_debug', 'false'),
396
  'results_text' => apply_filters('alm_display_results', __('Viewing {post_count} of {total_posts} results.', 'ajax-load-more')),
397
  'no_results_text' => apply_filters('alm_no_results_text', __('No results found.', 'ajax-load-more')),
398
- 'alm_debug' => apply_filters('alm_debug', false)
 
399
  )
400
- );
401
  }
402
 
403
 
@@ -425,50 +427,50 @@ if( !class_exists('AjaxLoadMore') ):
425
  public static function alm_return_shortcode_atts(){
426
  return self::$shortcode_atts;
427
  }
428
-
429
-
430
-
431
  /**
432
  * alm_query_posts
433
  * Core Ajax Load More Query
434
  *
435
  * @since 2.0.0
436
- */
437
- public function alm_query_posts() {
438
-
439
  // WPML fix for category/tag/taxonomy archives
440
  if ( (isset( $_GET['category'] ) && $_GET['category']) || (isset($_GET['taxonomy']) && $_GET['taxonomy']) || (isset($_GET['tag']) && $_GET['tag']) ) {
441
  unset($_REQUEST['post_id']);
442
  }
443
-
444
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
445
  $post_id = (isset($_GET['post_id'])) ? $_GET['post_id'] : '';
446
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
447
- $canonical_url = (isset($_GET['canonical_url'])) ? esc_url($_GET['canonical_url']) : esc_url($_SERVER['HTTP_REFERER']);
448
-
449
  // Ajax Query Type
450
- $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
451
-
452
  // Cache
453
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
454
  $cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
455
- $do_create_cache = ($cache_logged_in === 'true' && is_user_logged_in()) ? false : true;
456
-
457
  // Offset
458
- $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
459
-
460
  // Repeater Templates
461
- $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
462
  $type = alm_get_repeater_type($repeater);
463
- $theme_repeater = (isset($_GET['theme_repeater'])) ? $_GET['theme_repeater'] : 'null';
464
-
465
  // Post Type
466
- $postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
467
-
468
  // Page Parameters
469
  $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
470
- $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
471
-
472
  // Advanced Custom Fields
473
  $acfData = (isset($_GET['acf'])) ? $_GET['acf'] : false;
474
  if($acfData){
@@ -476,11 +478,11 @@ if( !class_exists('AjaxLoadMore') ):
476
  $acf_post_id = (isset($acfData['post_id'])) ? $acfData['post_id'] : ''; // Post ID
477
  $acf_field_type = (isset($acfData['field_type'])) ? $acfData['field_type'] : ''; // ACF Field Type
478
  $acf_field_name = (isset($acfData['field_name'])) ? $acfData['field_name'] : ''; // ACF Field Type
479
- }
480
-
481
  // Paging Add-on
482
- $paging = (isset($_GET['paging'])) ? $_GET['paging'] : 'false';
483
-
484
  // Preload Add-on
485
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
486
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
@@ -488,8 +490,8 @@ if( !class_exists('AjaxLoadMore') ):
488
  // If preload - offset the ajax posts by posts_per_page + preload_amount val
489
  $old_offset = $preloaded_amount;
490
  $offset = $offset + $preloaded_amount;
491
- }
492
-
493
  // CTA Add-on
494
  $cta = false;
495
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : false;
@@ -501,9 +503,9 @@ if( !class_exists('AjaxLoadMore') ):
501
  $cta_val = (string)$cta_position_array[1];
502
  $cta_pos = ($cta_pos != 'after') ? 'before' : $cta_pos;
503
  $cta_repeater = (isset($ctaData['cta_repeater'])) ? $ctaData['cta_repeater'] : 'null';
504
- $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? $ctaData['cta_theme_repeater'] : 'null';
505
- }
506
-
507
  // Single Post Add-on
508
  $single_post = false;
509
  $single_post_data = (isset($_GET['single_post'])) ? $_GET['single_post'] : false;
@@ -511,21 +513,27 @@ if( !class_exists('AjaxLoadMore') ):
511
  $single_post = true;
512
  $single_post_id = (isset($single_post_data['id'])) ? $single_post_data['id'] : '';
513
  $single_post_slug = (isset($single_post_data['slug'])) ? $single_post_data['slug'] : '';
514
- }
515
-
516
  // SEO Add-on
517
- $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
518
-
 
 
 
 
 
 
519
  // Set up initial WP_Query $args
520
- $args = ALM_QUERY_ARGS::alm_build_queryargs($_GET, true);
521
  $args['paged'] = (get_query_var('paged')) ? get_query_var('paged') : 1;
522
  $args['offset'] = $offset + ($posts_per_page*$page);
523
-
524
-
525
  // Get current page number for determining item number
526
  $alm_page_count = ($page == 0) ? 1 : $page + 1;
527
-
528
-
529
  /*
530
  * alm_single_post_args
531
  *
@@ -535,9 +543,9 @@ if( !class_exists('AjaxLoadMore') ):
535
  * @return $args;
536
  */
537
  $args = ($single_post && has_action('alm_single_post_installed')) ? apply_filters('alm_single_post_args', $single_post_id, $postType) : $args;
538
-
539
-
540
-
541
  /*
542
  * alm_modify_query_args
543
  *
@@ -547,9 +555,9 @@ if( !class_exists('AjaxLoadMore') ):
547
  * Deprecated 2.10
548
  */
549
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
550
-
551
-
552
-
553
  /*
554
  * alm_query_args_{id}
555
  *
@@ -558,26 +566,26 @@ if( !class_exists('AjaxLoadMore') ):
558
  * @return $args;
559
  */
560
  $args = apply_filters('alm_query_args_'. $id, $args, $post_id); // ALM Core Filter Hook
561
-
562
-
563
-
564
  /*
565
  * Custom `alm_query` parameter in the WP_Query
566
  * Value is accessed elsewhere for filters & hooks etc.
567
- */
568
  $args['alm_query'] = ($single_post) ? 'single_posts' : 'alm';
569
-
570
-
571
-
572
  /*
573
  * WP_Query
574
  *
575
  * @return $alm_query;
576
  */
577
  $alm_query = new WP_Query( $args );
578
-
579
-
580
-
581
  /*
582
  * alm_query_after_{id}
583
  *
@@ -586,8 +594,8 @@ if( !class_exists('AjaxLoadMore') ):
586
  * @return $alm_query;
587
  */
588
  $alm_query = apply_filters('alm_query_after_'. $id, $alm_query, $post_id); // ALM Core Filter Hook
589
-
590
-
591
  // If preloaded, update our loop count and total posts
592
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
593
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
@@ -599,9 +607,9 @@ if( !class_exists('AjaxLoadMore') ):
599
  $alm_total_posts = $alm_query->found_posts - $offset;
600
  $alm_loop_count = 0;
601
  }
602
-
603
-
604
-
605
  /*
606
  * alm_cache_create_dir
607
  *
@@ -612,11 +620,11 @@ if( !class_exists('AjaxLoadMore') ):
612
  */
613
  if(!empty($cache_id) && has_action('alm_cache_create_dir') && $do_create_cache){
614
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
615
- }
616
-
617
-
618
  if($queryType === 'standard'){
619
-
620
  /*
621
  * alm_debug
622
  *
@@ -625,59 +633,65 @@ if( !class_exists('AjaxLoadMore') ):
625
  * @return $alm_query/false;
626
  */
627
  $debug = (apply_filters('alm_debug', false)) ? $args : false;
628
-
629
  // Run the loop
630
-
631
  if ($alm_query->have_posts()) {
632
-
633
  $alm_found_posts = $alm_total_posts;
634
  $alm_post_count = $alm_query->post_count;
635
  $alm_current = 0;
636
  $alm_has_cta = false;
637
-
638
  $cta_array = Array();
639
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
640
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $paging);
641
  }
642
-
643
  ob_start();
644
-
645
  // ALM Loop
646
  while ($alm_query->have_posts()): $alm_query->the_post();
647
-
648
  $alm_loop_count++;
649
  $alm_current++; // Current item in loop
650
  $alm_page = $alm_page_count; // Get page number
651
- $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
652
-
653
  // Call to Action [Before]
654
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
655
  do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
656
  $alm_has_cta = true;
657
  }
658
  // End Call to Action [Before]
659
-
660
- // Repeater Template
661
- if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater
 
 
662
  do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
663
- }else{
664
- include(alm_get_current_repeater( $repeater, $type )); // Repeater
 
 
 
 
665
  }
666
  // End Repeater Template
667
-
668
  // Call to Action [After]
669
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'after' && in_array($alm_current, $cta_array)){
670
  do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
671
  $alm_has_cta = true;
672
  }
673
  // End Call to Action [After]
674
-
675
  endwhile; wp_reset_query();
676
  // End ALM Loop
677
-
678
  $data = ob_get_clean();
679
-
680
-
681
  /*
682
  * alm_cache_file
683
  *
@@ -698,8 +712,8 @@ if( !class_exists('AjaxLoadMore') ):
698
  // Standard Cache
699
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
700
  }
701
- }
702
-
703
  $return = array(
704
  'html' => $data,
705
  'meta' => array(
@@ -709,9 +723,9 @@ if( !class_exists('AjaxLoadMore') ):
709
  )
710
  );
711
  wp_send_json($return);
712
-
713
  } else {
714
-
715
  $return = array(
716
  'html' => null,
717
  'meta' => array(
@@ -720,28 +734,28 @@ if( !class_exists('AjaxLoadMore') ):
720
  'debug' => $debug
721
  )
722
  );
723
-
724
  wp_send_json($return);
725
-
726
  }
727
-
728
  }
729
-
730
  elseif($queryType === 'totalposts'){ // Paging add-on
731
-
732
  // Paging add-on
733
  wp_send_json(array(
734
  'totalposts' => $alm_total_posts
735
  ));
736
-
737
  }
738
-
739
  wp_die();
740
-
741
- }
742
 
743
  }
744
-
745
 
746
 
747
  /**
@@ -758,9 +772,9 @@ if( !class_exists('AjaxLoadMore') ):
758
  }
759
  return $ajax_load_more;
760
  }
761
-
762
  AjaxLoadMore(); // initialize
763
-
764
-
765
 
766
  endif; // class_exists check
6
  Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
+ Author URI: https://connekthq.com
10
+ Version: 5.3.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
+ define('ALM_VERSION', '5.3.0');
17
+ define('ALM_RELEASE', 'April 22, 2020');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
27
  */
28
 
29
  function alm_install($network_wide) {
30
+
31
  global $wpdb;
32
  add_option( "alm_version", ALM_VERSION ); // Add to WP Option tbl
33
  if ( is_multisite() && $network_wide ) {
41
  } else {
42
  alm_create_table();
43
  }
44
+
45
  }
46
  register_activation_hook( __FILE__, 'alm_install' );
47
  add_action( 'wpmu_new_blog', 'alm_install' );
73
  $w = fwrite($tmp, $defaultRepeater);
74
  fclose($tmp);
75
  }
76
+
77
  // Exit if Repeater Templates are disbaled, we don't want to create the table
78
  if( defined('ALM_DISABLE_REPEATER_TEMPLATES') && ALM_DISABLE_REPEATER_TEMPLATES ){
79
  return false;
94
  // Insert the default data in created table
95
  $wpdb->insert($table_name , array('name' => 'default', 'repeaterDefault' => $defaultRepeater, 'repeaterType' => 'default', 'pluginVersion' => ALM_VERSION));
96
  }
97
+
98
  }
99
 
100
 
122
 
123
  $this->alm_define_constants();
124
  $this->alm_includes();
125
+
126
  add_action( 'wp_ajax_alm_get_posts', array(&$this, 'alm_query_posts') );
127
  add_action( 'wp_ajax_nopriv_alm_get_posts', array(&$this, 'alm_query_posts') );
128
  add_action( 'wp_enqueue_scripts', array(&$this, 'alm_enqueue_scripts') );
168
  if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
169
  if (!defined('ALM_RESTAPI_ITEM_NAME')) define('ALM_RESTAPI_ITEM_NAME', '17105'); // Deprecated
170
  if (!defined('ALM_SEO_ITEM_NAME')) define('ALM_SEO_ITEM_NAME', '3482');
171
+ if (!defined('ALM_TABS_ITEM_NAME')) define('ALM_TABS_ITEM_NAME', '54855');
172
  if (!defined('ALM_THEME_REPEATERS_ITEM_NAME')) define('ALM_THEME_REPEATERS_ITEM_NAME', '8860');
173
  if (!defined('ALM_USERS_ITEM_NAME')) define('ALM_USERS_ITEM_NAME', '32311');
174
  if (!defined('ALM_PRO_ITEM_NAME')) define('ALM_PRO_ITEM_NAME', '42166');
175
+ if (!defined('ALM_WOO_ITEM_NAME')) define('ALM_WOO_ITEM_NAME', '62770');
176
 
177
  }
178
 
263
  * @since 2.0.0
264
  */
265
  public function alm_includes(){
266
+
267
  include_once( ALM_PATH . 'core/functions.php'); // Load Core Functions
268
  include_once( ALM_PATH . 'core/classes/class.alm-shortcode.php'); // Load Shortcode Class
269
  include_once( ALM_PATH . 'core/classes/class.alm-woocommerce.php'); // Load Woocommerce Class
280
  include( dirname( __FILE__ ) . '/vendor/EDD_SL_Plugin_Updater.php' );
281
  }
282
  }
283
+
284
  }
285
 
286
 
371
 
372
  // Callback Helpers
373
  wp_register_script( 'ajax-load-more-legacy-callbacks', plugins_url( '/vendor/js/alm/legacy-callbacks.js', __FILE__ ), 'jquery', '', false);
374
+
375
 
376
  // Core CSS
377
  if( !alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css')){ // Not inline or disabled
381
 
382
  // Prevent loading of unnessasry posts - move user to top of page
383
  $scrolltop = (!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1') ? 'false' : 'true';
384
+
385
+
386
  // Localized JS variables
387
  wp_localize_script(
388
  'ajax-load-more',
396
  'ga_debug' => apply_filters('alm_ga_debug', 'false'),
397
  'results_text' => apply_filters('alm_display_results', __('Viewing {post_count} of {total_posts} results.', 'ajax-load-more')),
398
  'no_results_text' => apply_filters('alm_no_results_text', __('No results found.', 'ajax-load-more')),
399
+ 'alm_debug' => apply_filters('alm_debug', false),
400
+ 'a11y_focus' => apply_filters('alm_a11y_focus', true)
401
  )
402
+ );
403
  }
404
 
405
 
427
  public static function alm_return_shortcode_atts(){
428
  return self::$shortcode_atts;
429
  }
430
+
431
+
432
+
433
  /**
434
  * alm_query_posts
435
  * Core Ajax Load More Query
436
  *
437
  * @since 2.0.0
438
+ */
439
+ public function alm_query_posts() {
440
+
441
  // WPML fix for category/tag/taxonomy archives
442
  if ( (isset( $_GET['category'] ) && $_GET['category']) || (isset($_GET['taxonomy']) && $_GET['taxonomy']) || (isset($_GET['tag']) && $_GET['tag']) ) {
443
  unset($_REQUEST['post_id']);
444
  }
445
+
446
  $id = (isset($_GET['id'])) ? $_GET['id'] : '';
447
  $post_id = (isset($_GET['post_id'])) ? $_GET['post_id'] : '';
448
  $slug = (isset($_GET['slug'])) ? $_GET['slug'] : '';
449
+ $canonical_url = (isset($_GET['canonical_url'])) ? esc_url($_GET['canonical_url']) : esc_url($_SERVER['HTTP_REFERER']);
450
+
451
  // Ajax Query Type
452
+ $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
453
+
454
  // Cache
455
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
456
  $cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
457
+ $do_create_cache = ($cache_logged_in === 'true' && is_user_logged_in()) ? false : true;
458
+
459
  // Offset
460
+ $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
461
+
462
  // Repeater Templates
463
+ $repeater = (isset($_GET['repeater'])) ? sanitize_file_name($_GET['repeater']) : 'default';
464
  $type = alm_get_repeater_type($repeater);
465
+ $theme_repeater = (isset($_GET['theme_repeater'])) ? sanitize_file_name($_GET['theme_repeater']) : 'null';
466
+
467
  // Post Type
468
+ $postType = (isset($_GET['post_type'])) ? $_GET['post_type'] : 'post';
469
+
470
  // Page Parameters
471
  $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
472
+ $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
473
+
474
  // Advanced Custom Fields
475
  $acfData = (isset($_GET['acf'])) ? $_GET['acf'] : false;
476
  if($acfData){
478
  $acf_post_id = (isset($acfData['post_id'])) ? $acfData['post_id'] : ''; // Post ID
479
  $acf_field_type = (isset($acfData['field_type'])) ? $acfData['field_type'] : ''; // ACF Field Type
480
  $acf_field_name = (isset($acfData['field_name'])) ? $acfData['field_name'] : ''; // ACF Field Type
481
+ }
482
+
483
  // Paging Add-on
484
+ $paging = (isset($_GET['paging'])) ? $_GET['paging'] : 'false';
485
+
486
  // Preload Add-on
487
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
488
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
490
  // If preload - offset the ajax posts by posts_per_page + preload_amount val
491
  $old_offset = $preloaded_amount;
492
  $offset = $offset + $preloaded_amount;
493
+ }
494
+
495
  // CTA Add-on
496
  $cta = false;
497
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : false;
503
  $cta_val = (string)$cta_position_array[1];
504
  $cta_pos = ($cta_pos != 'after') ? 'before' : $cta_pos;
505
  $cta_repeater = (isset($ctaData['cta_repeater'])) ? $ctaData['cta_repeater'] : 'null';
506
+ $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? sanitize_file_name($ctaData['cta_theme_repeater']) : 'null';
507
+ }
508
+
509
  // Single Post Add-on
510
  $single_post = false;
511
  $single_post_data = (isset($_GET['single_post'])) ? $_GET['single_post'] : false;
513
  $single_post = true;
514
  $single_post_id = (isset($single_post_data['id'])) ? $single_post_data['id'] : '';
515
  $single_post_slug = (isset($single_post_data['slug'])) ? $single_post_data['slug'] : '';
516
+ }
517
+
518
  // SEO Add-on
519
+ $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
520
+
521
+ // WooCommerce Add-on
522
+ $woocommerce = (isset($_GET['woocommerce'])) ? $_GET['woocommerce'] : false;
523
+ if($woocommerce){
524
+ $woocommerce_template = (isset($woocommerce['template'])) ? sanitize_file_name($ctaData['template']) : null;
525
+ }
526
+
527
  // Set up initial WP_Query $args
528
+ $args = ALM_QUERY_ARGS::alm_build_queryargs($_GET, true);
529
  $args['paged'] = (get_query_var('paged')) ? get_query_var('paged') : 1;
530
  $args['offset'] = $offset + ($posts_per_page*$page);
531
+
532
+
533
  // Get current page number for determining item number
534
  $alm_page_count = ($page == 0) ? 1 : $page + 1;
535
+
536
+
537
  /*
538
  * alm_single_post_args
539
  *
543
  * @return $args;
544
  */
545
  $args = ($single_post && has_action('alm_single_post_installed')) ? apply_filters('alm_single_post_args', $single_post_id, $postType) : $args;
546
+
547
+
548
+
549
  /*
550
  * alm_modify_query_args
551
  *
555
  * Deprecated 2.10
556
  */
557
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
558
+
559
+
560
+
561
  /*
562
  * alm_query_args_{id}
563
  *
566
  * @return $args;
567
  */
568
  $args = apply_filters('alm_query_args_'. $id, $args, $post_id); // ALM Core Filter Hook
569
+
570
+
571
+
572
  /*
573
  * Custom `alm_query` parameter in the WP_Query
574
  * Value is accessed elsewhere for filters & hooks etc.
575
+ */
576
  $args['alm_query'] = ($single_post) ? 'single_posts' : 'alm';
577
+
578
+
579
+
580
  /*
581
  * WP_Query
582
  *
583
  * @return $alm_query;
584
  */
585
  $alm_query = new WP_Query( $args );
586
+
587
+
588
+
589
  /*
590
  * alm_query_after_{id}
591
  *
594
  * @return $alm_query;
595
  */
596
  $alm_query = apply_filters('alm_query_after_'. $id, $alm_query, $post_id); // ALM Core Filter Hook
597
+
598
+
599
  // If preloaded, update our loop count and total posts
600
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
601
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
607
  $alm_total_posts = $alm_query->found_posts - $offset;
608
  $alm_loop_count = 0;
609
  }
610
+
611
+
612
+
613
  /*
614
  * alm_cache_create_dir
615
  *
620
  */
621
  if(!empty($cache_id) && has_action('alm_cache_create_dir') && $do_create_cache){
622
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
623
+ }
624
+
625
+
626
  if($queryType === 'standard'){
627
+
628
  /*
629
  * alm_debug
630
  *
633
  * @return $alm_query/false;
634
  */
635
  $debug = (apply_filters('alm_debug', false)) ? $args : false;
636
+
637
  // Run the loop
638
+
639
  if ($alm_query->have_posts()) {
640
+
641
  $alm_found_posts = $alm_total_posts;
642
  $alm_post_count = $alm_query->post_count;
643
  $alm_current = 0;
644
  $alm_has_cta = false;
645
+
646
  $cta_array = Array();
647
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
648
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $paging);
649
  }
650
+
651
  ob_start();
652
+
653
  // ALM Loop
654
  while ($alm_query->have_posts()): $alm_query->the_post();
655
+
656
  $alm_loop_count++;
657
  $alm_current++; // Current item in loop
658
  $alm_page = $alm_page_count; // Get page number
659
+ $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
660
+
661
  // Call to Action [Before]
662
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
663
  do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
664
  $alm_has_cta = true;
665
  }
666
  // End Call to Action [Before]
667
+
668
+ // Repeater Templates
669
+
670
+ if($theme_repeater !== 'null' && has_action('alm_get_theme_repeater')){
671
+ // Theme Repeater
672
  do_action('alm_get_theme_repeater', $theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current);
673
+
674
+ }
675
+ else{
676
+ // Default Repeaters
677
+ include(alm_get_current_repeater($repeater, $type));
678
+
679
  }
680
  // End Repeater Template
681
+
682
  // Call to Action [After]
683
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'after' && in_array($alm_current, $cta_array)){
684
  do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
685
  $alm_has_cta = true;
686
  }
687
  // End Call to Action [After]
688
+
689
  endwhile; wp_reset_query();
690
  // End ALM Loop
691
+
692
  $data = ob_get_clean();
693
+
694
+
695
  /*
696
  * alm_cache_file
697
  *
712
  // Standard Cache
713
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
714
  }
715
+ }
716
+
717
  $return = array(
718
  'html' => $data,
719
  'meta' => array(
723
  )
724
  );
725
  wp_send_json($return);
726
+
727
  } else {
728
+
729
  $return = array(
730
  'html' => null,
731
  'meta' => array(
734
  'debug' => $debug
735
  )
736
  );
737
+
738
  wp_send_json($return);
739
+
740
  }
741
+
742
  }
743
+
744
  elseif($queryType === 'totalposts'){ // Paging add-on
745
+
746
  // Paging add-on
747
  wp_send_json(array(
748
  'totalposts' => $alm_total_posts
749
  ));
750
+
751
  }
752
+
753
  wp_die();
754
+
755
+ }
756
 
757
  }
758
+
759
 
760
 
761
  /**
772
  }
773
  return $ajax_load_more;
774
  }
775
+
776
  AjaxLoadMore(); // initialize
777
+
778
+
779
 
780
  endif; // class_exists check
core/classes/class.alm-enqueue.php CHANGED
File without changes
core/classes/class.alm-localize.php CHANGED
@@ -29,6 +29,7 @@ if(!class_exists('ALM_LOCALIZE')):
29
  * @since 3.7
30
  */
31
  public static function add_localized_var($key = '', $value = '', $id = 'ajax-load-more', $position = ''){
 
32
  if($position){
33
  self::$vars[$id][$position][$key] = $value; // Add key & val
34
  } else {
29
  * @since 3.7
30
  */
31
  public static function add_localized_var($key = '', $value = '', $id = 'ajax-load-more', $position = ''){
32
+
33
  if($position){
34
  self::$vars[$id][$position][$key] = $value; // Add key & val
35
  } else {
core/classes/class.alm-noscript.php CHANGED
File without changes
core/classes/class.alm-queryargs.php CHANGED
File without changes
core/classes/class.alm-shortcode.php CHANGED
@@ -84,6 +84,8 @@ if( !class_exists('ALM_SHORTCODE') ):
84
  // Extact shortcode arrtibutes
85
  extract(shortcode_atts(array(
86
  'nested' => false,
 
 
87
  'tabs' => false,
88
  'tab_template' => '',
89
  'filters' => false,
@@ -239,7 +241,8 @@ if( !class_exists('ALM_SHORTCODE') ):
239
 
240
 
241
  // WooCommerce
242
- $woocommerce = ($woocommerce === 'true') ? true : false;
 
243
 
244
 
245
  // Archives
@@ -337,6 +340,11 @@ if( !class_exists('ALM_SHORTCODE') ):
337
  }
338
  }
339
  }
 
 
 
 
 
340
 
341
 
342
 
@@ -417,7 +425,7 @@ if( !class_exists('ALM_SHORTCODE') ):
417
  $alm_loading_style = ($loading_style !== '') ? ' ' . $loading_style : $alm_loading_style;
418
 
419
  // Get paging color
420
- $paging_color = (isset($options['_alm_paging_color']) && has_action('alm_paging_installed') && $paging === 'true') ? ' paging-'.$options['_alm_paging_color'] : '';
421
 
422
  // Layouts Class
423
  $alm_layouts = (has_action('alm_layouts_installed')) ? ' alm-layouts' : '';
@@ -631,6 +639,20 @@ if( !class_exists('ALM_SHORTCODE') ):
631
  }
632
  }
633
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
634
 
635
 
636
  // Single Post Add-on
@@ -843,6 +865,27 @@ if( !class_exists('ALM_SHORTCODE') ):
843
  }
844
 
845
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
846
  // Paging Add-on
847
  if(has_action('alm_paging_installed') && $paging === 'true'){
848
  $paging_return = apply_filters(
@@ -878,19 +921,6 @@ if( !class_exists('ALM_SHORTCODE') ):
878
  $pause = "true";
879
  }
880
  }
881
-
882
-
883
- // Term Query
884
- if(has_action('alm_terms_installed') && $term_query){
885