WordPress Infinite Scroll – Ajax Load More - Version 2.8.0

Version Description

  • NEW - Adding required support and functionality for new Previous Post add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/
  • NEW - Adding a set of filters to inject content into ALM containers.
  • NEW - Adding 'container_type' shortcode parameter that allows for override of the global Container Type.
  • NEW - Adding 'pause_override' shortcode parameter that will allow scrolling to override the Pause parameter and trigger the loading of posts on scroll.
  • NEW - Adding 'meta_type' shortcode parameter that will allow for specification of a custom field type..
  • UPDATE - Added unique id(classname/data-id) to each instance of ajax load more - this will allow for targeting of specific instances from outside elements.
  • FIX - Fixed JS issue with Paging add-on + SEO add-on URLs.
  • UPDATE - Various admin fixes and updates.
Download this release

Release Info

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

Code changes from version 2.7.3 to 2.8.0

README.txt CHANGED
@@ -1,20 +1,20 @@
1
  === Ajax Load More ===
2
  Contributors: dcooney
3
  Donate link: http://connekthq.com/donate/
4
- Tags: infinite scroll, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, loop, query, dynamic, shortcode builder, wp_query, search, tags, category, post types, taxonomy, meta_query, archives, date
5
  Requires at least: 3.6
6
- Tested up to: 4.3
7
- Stable tag: 2.7.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- A powerful solution to add infinite scroll / lazy load functionality to any website.
12
 
13
  == Description ==
14
 
15
- Ajax Load More is a powerful solution for infinite scrolling WordPress posts and pages using Ajax.
16
  Build complex WordPress queries using the Ajax Load More custom shortcode builder and then add the shortcode to your pages via the content editor or directly into your template files.
17
-
18
 
19
  = Features =
20
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder.(see Shortcode Parameters).
@@ -24,7 +24,7 @@ Build complex WordPress queries using the Ajax Load More custom shortcode builde
24
  * **Multiple Instances** - You can include multiple instances of Ajax Load More on a single page, post or template.
25
  * **Multisite Compatibility** - As of Ajax Load More 2.7.2 you can now manage repeater templates across all sites in your network.
26
 
27
- **Check out the [demo site](http://connekthq.com/plugins/ajax-load-more/) for more information!**
28
 
29
  ***
30
 
@@ -49,7 +49,8 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
49
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
50
  * **meta_key** - Custom field key(name). Default = null
51
  * **meta_value** - Custom field value. Default = null
52
- * **meta_compare** - Operator to compare meta_key and meta_value against (IN/NOT IN/=/!=/>/>=/</<= etc.). Default = ‘IN’
 
53
  * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
54
  * **author** - Query by author id. Default = null
55
  * **post__in** - Comma separated list of post ID’s to include in query. Default = null
@@ -64,11 +65,13 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
64
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
65
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
66
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '5'
 
67
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
68
  * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
69
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
70
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
71
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
 
72
  * **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
73
  * **cache** - Turn on content caching for the specific Ajax Load More query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - (true/false). Default = ‘false’
74
  * **cache_id** - A unique 10 digit ID for the cached query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - Default = A random 10 digit integer
@@ -127,6 +130,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
127
  > #### Preloaded
128
  > The **[Preloaded](http://connekthq.com/plugins/ajax-load-more/preloaded/)** add-on will allow you to quickly and easily preload an initial set of posts before completing any Ajax requests to the server.<br />
129
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/preloaded/)
 
 
 
 
130
  >
131
  > #### Search Engine Optimization
132
  > The **[SEO](http://connekthq.com/plugins/ajax-load-more/seo/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.<br />
@@ -271,6 +278,17 @@ How to install Ajax Load More.
271
  == Changelog ==
272
 
273
 
 
 
 
 
 
 
 
 
 
 
 
274
  = 2.7.3 =
275
  * NEW - Adding required support and functionality for new Theme Repeaters add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/
276
  * NEW - Added new shortcode parameter 'images_loaded' which will allow you to wait for all images to load before displaying ajax loaded content.
1
  === Ajax Load More ===
2
  Contributors: dcooney
3
  Donate link: http://connekthq.com/donate/
4
+ Tags: infinite scroll, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, loop, query, dynamic, shortcode builder, wp_query, search, tags, category, post types, taxonomy, meta_query, archives, date, infinite scrolling
5
  Requires at least: 3.6
6
+ Tested up to: 4.3.1
7
+ Stable tag: 2.8.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ A powerful solution to add infinite scroll functionality to your website
12
 
13
  == Description ==
14
 
15
+ Ajax Load More is a robust and intuitive solution for infinite scrolling WordPress posts and pages with Ajax.
16
  Build complex WordPress queries using the Ajax Load More custom shortcode builder and then add the shortcode to your pages via the content editor or directly into your template files.
17
+
18
 
19
  = Features =
20
  * **Shortcode Builder** - Easily create your own Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder.(see Shortcode Parameters).
24
  * **Multiple Instances** - You can include multiple instances of Ajax Load More on a single page, post or template.
25
  * **Multisite Compatibility** - As of Ajax Load More 2.7.2 you can now manage repeater templates across all sites in your network.
26
 
27
+ Check out the **[demo site](http://connekthq.com/plugins/ajax-load-more/)** for more information!
28
 
29
  ***
30
 
49
  * **taxonomy_operator** - Operator to compare Taxonomy Terms against (IN/NOT IN). Default = ‘IN’
50
  * **meta_key** - Custom field key(name). Default = null
51
  * **meta_value** - Custom field value. Default = null
52
+ * **meta_compare** - Operator to compare meta_key and meta_value against. Default = ‘IN’
53
+ * **meta_type** - Custom field type. Default = ‘CHAR’
54
  * **meta_relation** - Used with multiple custom field entries (AND/OR). Default = ‘AND’
55
  * **author** - Query by author id. Default = null
56
  * **post__in** - Comma separated list of post ID’s to include in query. Default = null
65
  * **scroll** - Load more posts as the user scrolls the page (true/false). Default = ‘true’
66
  * **scroll_distance** - The distance from the bottom of the screen to trigger the loading of posts while scrolling. Default = '150'
67
  * **max_pages** - Maximum number of pages to load while user is scrolling (activated on when scroll = true). Default = '5'
68
+ * **pause_override** - Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll. Default = null
69
  * **pause** - Do not load posts until user clicks the Load More button (true/false). Default = 'false'
70
  * **transition** - Choose a posts reveal transition (slide/fade/none). Default = 'slide'
71
  * **images_loaded** - Wait for all images to load before displaying ajax loaded content (true/false). Default = 'false'
72
  * **destroy_after** - Remove ajax load more functionality after 'n' number of pages have been loaded. Default = null
73
  * **button_label** - The label text for Load More button. Default = 'Older Posts'
74
+ * **container_type** - Override the global Container Type that was set on ALM Settings page. Default = null
75
  * **css_classes** - Add custom CSS classes to the Ajax Load More container. Default = null
76
  * **cache** - Turn on content caching for the specific Ajax Load More query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - (true/false). Default = ‘false’
77
  * **cache_id** - A unique 10 digit ID for the cached query. <a href="http://connekthq.com/plugins/ajax-load-more/cache/">add-on only</a> - Default = A random 10 digit integer
130
  > #### Preloaded
131
  > The **[Preloaded](http://connekthq.com/plugins/ajax-load-more/preloaded/)** add-on will allow you to quickly and easily preload an initial set of posts before completing any Ajax requests to the server.<br />
132
  > [Get More Information](http://connekthq.com/plugins/ajax-load-more/preloaded/)
133
+ >
134
+ > #### Previous Post
135
+ > The **[Preloaded](http://connekthq.com/plugins/ajax-load-more/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
136
+ > [Get More Information](http://connekthq.com/plugins/ajax-load-more/previous-post/)
137
  >
138
  > #### Search Engine Optimization
139
  > The **[SEO](http://connekthq.com/plugins/ajax-load-more/seo/)** add-on will optimize your ajax loaded content for search engines and site visitors by generating standard WordPress paging URLs with each Ajax Load More query.<br />
278
  == Changelog ==
279
 
280
 
281
+ = 2.8.0 =
282
+ * NEW - Adding required support and functionality for new Previous Post add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/
283
+ * NEW - Adding a set of filters to inject content into ALM containers.
284
+ * NEW - Adding 'container_type' shortcode parameter that allows for override of the global Container Type.
285
+ * NEW - Adding 'pause_override' shortcode parameter that will allow scrolling to override the Pause parameter and trigger the loading of posts on scroll.
286
+ * NEW - Adding 'meta_type' shortcode parameter that will allow for specification of a custom field type..
287
+ * UPDATE - Added unique id(classname/data-id) to each instance of ajax load more - this will allow for targeting of specific instances from outside elements.
288
+ * FIX - Fixed JS issue with Paging add-on + SEO add-on URLs.
289
+ * UPDATE - Various admin fixes and updates.
290
+
291
+
292
  = 2.7.3 =
293
  * NEW - Adding required support and functionality for new Theme Repeaters add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/
294
  * NEW - Added new shortcode parameter 'images_loaded' which will allow you to wait for all images to load before displaying ajax loaded content.
admin/admin.php CHANGED
@@ -735,6 +735,12 @@ function alm_admin_init(){
735
  }
736
 
737
 
 
 
 
 
 
 
738
  // PRELOADED
739
  if(has_action('alm_preloaded_settings')){
740
  do_action('alm_preloaded_settings');
@@ -875,23 +881,6 @@ function alm_disable_dynamic_callback(){
875
  }
876
 
877
 
878
- /*
879
- * alm_class_callback
880
- * Add classes to the Ajax Load More wrapper
881
- *
882
- * @since 2.0.0
883
- */
884
-
885
- function alm_class_callback(){
886
- $options = get_option( 'alm_settings' );
887
-
888
- $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - classes are applied globally and will appear with every instance of Ajax Load More.<span style="display:block">You can also add classes to the ALM container when building a shortcode.</span>', ALM_NAME).'</label><br/>';
889
- $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
890
-
891
- echo $html;
892
- }
893
-
894
-
895
  /*
896
  * alm_container_type_callback
897
  * The type of container ul or div
@@ -911,12 +900,31 @@ function alm_container_type_callback() {
911
 
912
  $html .= '<input type="radio" id="_alm_container_type_two" name="alm_settings[_alm_container_type]" value="2"' . checked( 2, $options['_alm_container_type'], false ) . '/>';
913
  $html .= '<label for="_alm_container_type_two">&lt;div&gt; <span>&lt;!-- '.__('Ajax Posts Here', ALM_NAME).' --&gt;</span> &lt;/div&gt;</label>';
 
 
914
 
915
  echo $html;
916
 
917
  }
918
 
919
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
920
 
921
  /*
922
  * alm_btn_color_callback
@@ -994,7 +1002,14 @@ function alm_btn_class_callback(){
994
  var colorArray = "default grey purple green red blue white";
995
  jQuery("select#alm_settings_btn_color").change(function() {
996
  var color = jQuery(this).val();
997
- jQuery('.ajax-load-more-wrap.core').removeClass(colorArray);
 
 
 
 
 
 
 
998
  jQuery('.ajax-load-more-wrap.core').addClass(color);
999
  });
1000
  jQuery("select#alm_settings_btn_color").click(function(e){
735
  }
736
 
737
 
738
+ // PREVIOUS POST
739
+ if(has_action('alm_prev_post_settings')){
740
+ do_action('alm_prev_post_settings');
741
+ }
742
+
743
+
744
  // PRELOADED
745
  if(has_action('alm_preloaded_settings')){
746
  do_action('alm_preloaded_settings');
881
  }
882
 
883
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
884
  /*
885
  * alm_container_type_callback
886
  * The type of container ul or div
900
 
901
  $html .= '<input type="radio" id="_alm_container_type_two" name="alm_settings[_alm_container_type]" value="2"' . checked( 2, $options['_alm_container_type'], false ) . '/>';
902
  $html .= '<label for="_alm_container_type_two">&lt;div&gt; <span>&lt;!-- '.__('Ajax Posts Here', ALM_NAME).' --&gt;</span> &lt;/div&gt;</label>';
903
+
904
+ $html .= '<label style="cursor: default !important"><span style="display:block">'.__('You can modify the container type when building a shortcode.', ALM_NAME).'</span></label>';
905
 
906
  echo $html;
907
 
908
  }
909
 
910
 
911
+ /*
912
+ * alm_class_callback
913
+ * Add classes to the Ajax Load More wrapper
914
+ *
915
+ * @since 2.0.0
916
+ */
917
+
918
+ function alm_class_callback(){
919
+ $options = get_option( 'alm_settings' );
920
+
921
+ $html = '<label for="alm_settings[_alm_classname]">'.__('Add classes to Ajax Load More container - classes are applied globally and will appear with every instance of Ajax Load More. <span style="display:block">You can also add classes when building a shortcode.</span>', ALM_NAME).'</label><br/>';
922
+ $html .= '<input type="text" id="alm_settings[_alm_classname]" name="alm_settings[_alm_classname]" value="'.$options['_alm_classname'].'" placeholder="posts listing etc..." /> ';
923
+
924
+ echo $html;
925
+ }
926
+
927
+
928
 
929
  /*
930
  * alm_btn_color_callback
1002
  var colorArray = "default grey purple green red blue white";
1003
  jQuery("select#alm_settings_btn_color").change(function() {
1004
  var color = jQuery(this).val();
1005
+ // Remove other colors
1006
+ jQuery('.ajax-load-more-wrap.core').removeClass('default');
1007
+ jQuery('.ajax-load-more-wrap.core').removeClass('grey');
1008
+ jQuery('.ajax-load-more-wrap.core').removeClass('purple');
1009
+ jQuery('.ajax-load-more-wrap.core').removeClass('green');
1010
+ jQuery('.ajax-load-more-wrap.core').removeClass('red');
1011
+ jQuery('.ajax-load-more-wrap.core').removeClass('blue');
1012
+ jQuery('.ajax-load-more-wrap.core').removeClass('white');
1013
  jQuery('.ajax-load-more-wrap.core').addClass(color);
1014
  });
1015
  jQuery("select#alm_settings_btn_color").click(function(e){
admin/css/admin.css CHANGED
@@ -272,7 +272,7 @@
272
  width: calc(100% + 40px);
273
  top: -20px;
274
  left: -20px;
275
- border-bottom: 1px solid #efefef;
276
  background: #f7f7f7;
277
  border-radius: 3px 3px 0 0;
278
  }
@@ -445,6 +445,9 @@
445
  border: 1px solid #ccc;
446
  width: 60%;
447
  }
 
 
 
448
 
449
  .ajax-load-more .wrap-30{
450
  width: 32.333%;
@@ -452,6 +455,12 @@
452
  display: inline-block;
453
  vertical-align: top;
454
  }
 
 
 
 
 
 
455
  .ajax-load-more .wrap-30 input[type=text].sm,
456
  .ajax-load-more .wrap-30 .select2-container{
457
  width: 100%;
@@ -879,6 +888,35 @@
879
  color: #999;
880
  padding-top: 4px;
881
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
882
 
883
  .admin.ajax-load-more .form-table textarea{
884
  clear: both;
@@ -946,6 +984,9 @@
946
  .admin.ajax-load-more.settings .form-table th{
947
  padding: 20px 0 16px;
948
  }
 
 
 
949
 
950
  .admin.ajax-load-more.settings .form-table p{
951
  margin-top: 0;
@@ -2352,6 +2393,34 @@ p.cache-stats{
2352
  */
2353
 
2354
  #alm-mailing-list{}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2355
 
2356
  #alm-mailing-list .form-wrap{
2357
  background-color: #f7f7f7;
@@ -2544,6 +2613,10 @@ p.cache-stats{
2544
  margin: 10px 0 20px;
2545
  width: 100%;
2546
  }
 
 
 
 
2547
  #alm-add-ons .group{
2548
  width: 48%;
2549
  }
272
  width: calc(100% + 40px);
273
  top: -20px;
274
  left: -20px;
275
+ border-bottom: 1px solid #ebebeb;
276
  background: #f7f7f7;
277
  border-radius: 3px 3px 0 0;
278
  }
445
  border: 1px solid #ccc;
446
  width: 60%;
447
  }
448
+ .ajax-load-more input[type=text].full{
449
+ width: 100%;
450
+ }
451
 
452
  .ajax-load-more .wrap-30{
453
  width: 32.333%;
455
  display: inline-block;
456
  vertical-align: top;
457
  }
458
+ .ajax-load-more .wrap-30.wrap-50{
459
+ width: 48.6666%;
460
+ }
461
+ .ajax-load-more .wrap-30.wrap-50.padding-top{
462
+ padding-top: 15px;
463
+ }
464
  .ajax-load-more .wrap-30 input[type=text].sm,
465
  .ajax-load-more .wrap-30 .select2-container{
466
  width: 100%;
888
  color: #999;
889
  padding-top: 4px;
890
  }
891
+
892
+ .form-table .template-tags{
893
+ overflow: hidden;
894
+ border: 1px solid #eeeddf;
895
+ padding: 6px 10px;
896
+ background: #faf9ee;
897
+ margin: 10px 0 0;
898
+ border-radius: 3px;
899
+ }
900
+ .form-table .template-tags h4,
901
+ .form-table .template-tags li{
902
+ margin: 0 0 8px;
903
+ padding:0;
904
+ font-size: 13px;
905
+ }
906
+ .form-table .template-tags li{
907
+ margin: 2px 0;
908
+ }
909
+ .form-table .template-tags ul{
910
+ margin: 0;
911
+ padding: 0;
912
+ }
913
+ .form-table .template-tags pre{
914
+ display: inline-block;
915
+ min-width: 120px;
916
+ padding: 0;
917
+ margin: 0;
918
+ color: #888;
919
+ }
920
 
921
  .admin.ajax-load-more .form-table textarea{
922
  clear: both;
984
  .admin.ajax-load-more.settings .form-table th{
985
  padding: 20px 0 16px;
986
  }
987
+ .admin.ajax-load-more.settings .form-table th{
988
+ padding-left: 17px;
989
+ }
990
 
991
  .admin.ajax-load-more.settings .form-table p{
992
  margin-top: 0;
2393
  */
2394
 
2395
  #alm-mailing-list{}
2396
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn{
2397
+ display: inline-block;
2398
+ background-color: #fff;
2399
+ color: #333;
2400
+ font-size: 24px;
2401
+ padding: 0;
2402
+ width: 44px;
2403
+ height: 44px;
2404
+ line-height: 44px;
2405
+ text-align: center;
2406
+ vertical-align: top;
2407
+ border-radius: 4px;
2408
+ margin: 5px 5px 20px 0;
2409
+ opacity: 0.9;
2410
+ }
2411
+
2412
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn.facebook{
2413
+ background-color: #3b5998;
2414
+ color: #fff;
2415
+ }
2416
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn.twitter{
2417
+ background-color: #00aced;
2418
+ color: #fff;
2419
+ }
2420
+ .ajax-load-more .cnkt-sidebar .cta.social .follow-btn:hover{
2421
+ box-shadow: 0 0 0 4px #efefef;
2422
+ opacity: 1;
2423
+ }
2424
 
2425
  #alm-mailing-list .form-wrap{
2426
  background-color: #f7f7f7;
2613
  margin: 10px 0 20px;
2614
  width: 100%;
2615
  }
2616
+
2617
+ .admin.ajax-load-more.settings .form-table th{
2618
+ padding-left: 0;
2619
+ }
2620
  #alm-add-ons .group{
2621
  width: 48%;
2622
  }
admin/img/add-ons/cache-add-on.jpg ADDED
Binary file
admin/img/add-ons/cache-add-ons.jpg DELETED
Binary file
admin/img/add-ons/prev-post-add-on.jpg ADDED
Binary file
admin/img/add-ons/seo-add-ons.jpg CHANGED
Binary file
admin/img/add-ons/unlimited-add-ons.jpg CHANGED
Binary file
admin/img/alm-logo-48x48.png CHANGED
Binary file
admin/includes/cta/about.php CHANGED
@@ -1,14 +1,10 @@
1
- <div class="cta padding-bottom">
2
- <h3>About the plugin</h3>
3
- <p>Ajax Load More is a simple solution for lazy loading/infinite scrolling posts and pages with Ajax.</p>
4
- <p class='small'>Developed by <a target='_blank' href='http://connekthq.com/'>Darren Cooney</a></p><br/>
5
- <h4 style='margin-bottom: 10px;'>Other Projects</h4>
6
  <ul>
7
  <li><strong><a target="blank" href="https://wordpress.org/plugins/easy-query/">Easy Query</a></strong><br>The fastest and simplest way to build WordPress queries without ever touching a single line of code.</li>
8
  <li><strong><a target="blank" href="https://wordpress.org/plugins/unsplash-stock-photo-library/">Unsplash WP</a></strong><br>The fastest way to upload high quality stock photos from unsplash.com directly to your media library</li>
9
  <li><strong><a target="blank" href="https://github.com/dcooney/flexpanel">FlexPanel</a></strong><br>A responsive scrolling panel navigation for mobile and desktop</li>
10
  <li><strong><a target="blank" href="http://connekthq.com">Connekt Media</a></strong><br>A digital creation company</li>
11
  </ul>
12
- <a href="http://twitter.com/kaptonkaos" target="blank" class="visit"><i class="fa fa-twitter"></i> Follow on Twitter</a>
13
  </div>
14
 
1
+ <div class="cta">
2
+ <h3>Other Projects</h3>
 
 
 
3
  <ul>
4
  <li><strong><a target="blank" href="https://wordpress.org/plugins/easy-query/">Easy Query</a></strong><br>The fastest and simplest way to build WordPress queries without ever touching a single line of code.</li>
5
  <li><strong><a target="blank" href="https://wordpress.org/plugins/unsplash-stock-photo-library/">Unsplash WP</a></strong><br>The fastest way to upload high quality stock photos from unsplash.com directly to your media library</li>
6
  <li><strong><a target="blank" href="https://github.com/dcooney/flexpanel">FlexPanel</a></strong><br>A responsive scrolling panel navigation for mobile and desktop</li>
7
  <li><strong><a target="blank" href="http://connekthq.com">Connekt Media</a></strong><br>A digital creation company</li>
8
  </ul>
 
9
  </div>
10
 
admin/includes/cta/add-ons.php CHANGED
@@ -4,6 +4,7 @@
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Cache">Cache</a></li>
5
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Custom%20Repeaters">Custom Repeaters</a></li><li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/paging/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Paging">Paging</a></li>
6
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Preloaded">Preloaded</a></li>
 
7
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=SEO">Search Engine Optimization</a></li>
8
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Theme Repeaters">Theme Repeaters</a></li>
9
  </ul>
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Cache">Cache</a></li>
5
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Custom%20Repeaters">Custom Repeaters</a></li><li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/paging/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Paging">Paging</a></li>
6
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Preloaded">Preloaded</a></li>
7
+ <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Previous">Previous Post</a></li>
8
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=SEO">Search Engine Optimization</a></li>
9
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Theme Repeaters">Theme Repeaters</a></li>
10
  </ul>
admin/includes/cta/dyk.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <div class="cta">
2
+ <h3><?php _e('Did you know?', ALM_NAME); ?></h3>
3
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
4
+ <?php _e('<p class="addon-intro">You can generate shortcodes while editing pages!</p><p>Click the Ajax Load More icon in the content editor toolbar and the <a href="?page=ajax-load-more-shortcode-builder">shortcode builder</a> will open in an overlay window.', ALM_NAME); ?></p>
5
+ </div>
admin/includes/cta/mailinglist.php CHANGED
@@ -1,7 +1,12 @@
1
- <div class="cta mailing-list" id="alm-mailing-list">
2
  <div class="head-wrap">
3
- <h3><?php _e('Product Updates', ALM_NAME); ?></h3>
4
- <p><?php _e('Recieve product updates and release notifications delivered (infrequently) directly to your inbox.', ALM_NAME); ?></p>
 
 
 
 
 
5
  </div>
6
  <form action="" method="post" id="alm-mc-embedded" name="mc-embedded-subscribe-form" class="validate" data-path="<?php echo ALM_ADMIN_URL; ?>includes/mailchimp/mailchimp-info.php" novalidate>
7
  <div class="form-wrap">
1
+ <div class="cta mailing-list social" id="alm-mailing-list">
2
  <div class="head-wrap">
3
+ <h3><?php _e('Stay Informed', ALM_NAME); ?></h3>
4
+ <h4><?php _e('Follow Ajax Load More', ALM_NAME); ?></h4>
5
+ <a class="follow-btn facebook" href="http://facebook.com/ajaxloadmore" target="_blank"><i class="fa fa-facebook"></i></a>
6
+ <a class="follow-btn twitter" href="http://twitter.com/ajaxloadmore" target="_blank"><i class="fa fa-twitter"></i></a>
7
+
8
+ <h4 style="padding-top: 15px; border-top: 1px solid #efefef;"><?php _e('Join the Mailing List', ALM_NAME); ?></h4>
9
+ <p><?php _e('Receive product updates delivered (infrequently) directly to your inbox.', ALM_NAME); ?></p>
10
  </div>
11
  <form action="" method="post" id="alm-mc-embedded" name="mc-embedded-subscribe-form" class="validate" data-path="<?php echo ALM_ADMIN_URL; ?>includes/mailchimp/mailchimp-info.php" novalidate>
12
  <div class="form-wrap">
admin/shortcode-builder/includes/meta-query-options.php CHANGED
@@ -1,16 +1,17 @@
1
  <div class="inner border-top">
2
- <div class="wrap-30">
3
  <?php // Meta Key ?>
4
  <label for="meta-key" class="full"><?php _e('Key (Name):', ALM_NAME); ?></label>
5
  <input class="alm_element sm meta-key" name="meta-key" type="text" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
6
  </div>
7
  <?php // Meta Value ?>
8
- <div class="wrap-30">
9
  <label for="meta-value" class="full"><?php _e('Value:', ALM_NAME); ?></label>
10
  <input class="alm_element sm meta-value" name="meta-value" type="text" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
11
  </div>
 
12
  <?php // Meta Compare ?>
13
- <div class="wrap-30">
14
  <label for="meta-compare" class="full"><?php _e('Operator:', ALM_NAME); ?></label>
15
  <select class="alm_element meta-compare" name="meta-compare">
16
  <option value="IN" selected="selected">IN</option>
@@ -29,5 +30,20 @@
29
  <option value="NOT EXISTS">NOT EXISTS</option>
30
  </select>
31
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <a class="remove remove-meta-query" href="javascript:void(0);"><i class="fa fa-remove"></i></a>
33
  </div>
1
  <div class="inner border-top">
2
+ <div class="wrap-30 wrap-50">
3
  <?php // Meta Key ?>
4
  <label for="meta-key" class="full"><?php _e('Key (Name):', ALM_NAME); ?></label>
5
  <input class="alm_element sm meta-key" name="meta-key" type="text" value="" placeholder="<?php _e('Enter custom field key(name)', ALM_NAME); ?>">
6
  </div>
7
  <?php // Meta Value ?>
8
+ <div class="wrap-30 wrap-50">
9
  <label for="meta-value" class="full"><?php _e('Value:', ALM_NAME); ?></label>
10
  <input class="alm_element sm meta-value" name="meta-value" type="text" value="" placeholder="<?php _e('Enter custom field value', ALM_NAME); ?>">
11
  </div>
12
+ <div class="clear"></div>
13
  <?php // Meta Compare ?>
14
+ <div class="wrap-30 wrap-50 padding-top">
15
  <label for="meta-compare" class="full"><?php _e('Operator:', ALM_NAME); ?></label>
16
  <select class="alm_element meta-compare" name="meta-compare">
17
  <option value="IN" selected="selected">IN</option>
30
  <option value="NOT EXISTS">NOT EXISTS</option>
31
  </select>
32
  </div>
33
+ <?php // Meta Type ?>
34
+ <div class="wrap-30 wrap-50 padding-top">
35
+ <label for="meta-type" class="full"><?php _e('Type:', ALM_NAME); ?></label>
36
+ <select class="alm_element meta-type" name="meta-type">
37
+ <option value="BINARY">BINARY</option>
38
+ <option value="CHAR" selected="selected">CHAR</option>
39
+ <option value="DATE">DATE</option>
40
+ <option value="DATETIME">DATETIME</option>
41
+ <option value="DECIMAL">DECIMAL</option>
42
+ <option value="NUMERIC">NUMERIC</option>
43
+ <option value="SIGNED">SIGNED</option>
44
+ <option value="TIME">TIME</option>
45
+ <option value="UNSIGNED">UNSIGNED</option>
46
+ </select>
47
+ </div>
48
  <a class="remove remove-meta-query" href="javascript:void(0);"><i class="fa fa-remove"></i></a>
49
  </div>
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -17,7 +17,7 @@ jQuery(document).ready(function($) {
17
  */
18
  _alm.select2 = function(){
19
  // Default Select2
20
- $('.row select, .cnkt-main select, select.jump-menu').not('.multiple, .meta-compare').select2({});
21
 
22
  // multiple
23
  $('.ajax-load-more .categories select.multiple').select2({
@@ -46,7 +46,7 @@ jQuery(document).ready(function($) {
46
  // Add additional meta_query
47
  var meta_query_obj = $('.meta-query-wrap').eq(0).clone();
48
  $('.meta-query-wrap .remove').remove();
49
- $('select.meta-compare').select2();
50
  $('#add-meta-query').on('click', function(e){
51
  e.preventDefault();
52
 
@@ -163,7 +163,26 @@ jQuery(document).ready(function($) {
163
  output += ' preloaded_amount="'+preload_amount+'"';
164
  }else{
165
  $('.preload_amount').slideUp(100, 'alm_easeInOutQuad');
166
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
 
169
  // ---------------------------
@@ -317,12 +336,17 @@ jQuery(document).ready(function($) {
317
  var meta_key = $.trim($('.meta-query-wrap').eq(0).find('input.meta-key').val()),
318
  meta_value = $.trim($('.meta-query-wrap').eq(0).find('input.meta-value').val()),
319
  meta_compare = $('.meta-query-wrap').eq(0).find('select.meta-compare').val(),
 
320
  meta_relation = $('select.meta-relation').val(),
321
  meta_query_length = $('.meta-query-wrap').length;
322
 
323
  // Set meta_compare default value
324
  if(meta_compare === '' || meta_compare == undefined)
325
- meta_compare = '=';
 
 
 
 
326
 
327
  // Single Meta_Query()
328
  if(meta_query_length === 1){
@@ -330,9 +354,13 @@ jQuery(document).ready(function($) {
330
  output += ' meta_key="'+meta_key+'"';
331
  output += ' meta_value="'+meta_value+'"';
332
 
333
- if(meta_compare !== '=')
334
  output += ' meta_compare="'+meta_compare+'"';
 
335
 
 
 
 
336
  }
337
  }
338
  // Multiple Meta_Query()
@@ -340,21 +368,25 @@ jQuery(document).ready(function($) {
340
  meta_key = '';
341
  meta_value = '';
342
  meta_compare = '';
 
343
  $('.meta-query-wrap').each(function(e){
344
  var el = $(this),
345
  mk = $.trim(el.find('input.meta-key').val()),
346
  mv = $.trim(el.find('input.meta-value').val()),
347
- mc = $.trim(el.find('select.meta-compare').val());
 
348
 
349
  if(e === 0){ // first on first only
350
  meta_key += mk;
351
  meta_value += mv;
352
  meta_compare += mc;
 
353
  }else{
354
  if(mk.length > 0 && mv.length > 0){
355
  meta_key += ':'+ mk;
356
  meta_value += ':'+ mv;
357
  meta_compare += ':'+ mc;
 
358
  }
359
  }
360
 
@@ -362,6 +394,7 @@ jQuery(document).ready(function($) {
362
  output += ' meta_key="'+meta_key+'"';
363
  output += ' meta_value="'+meta_value+'"';
364
  output += ' meta_compare="'+meta_compare+'"';
 
365
 
366
  var isRelation = $('#meta-query-relation').css("display");
367
  if(meta_relation !== '' && meta_relation !== undefined && isRelation === 'block'){
@@ -470,8 +503,9 @@ jQuery(document).ready(function($) {
470
  // ---------------------------
471
 
472
  var pause_load = $('.pause_load input[name=pause]:checked').val();
473
- if(pause_load === 't')
474
- output += ' pause="true"';
 
475
 
476
 
477
 
@@ -481,17 +515,24 @@ jQuery(document).ready(function($) {
481
 
482
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
483
  if(scroll_load === 'f'){
484
- $('.max_pages, .scroll_distance').slideUp(100, 'alm_easeInOutQuad');
485
  if($('.scroll_load input').hasClass('changed'))
486
  output += ' scroll="false"';
487
  }else{
488
- $('.max_pages, .scroll_distance').slideDown(100, 'alm_easeInOutQuad');
 
489
  var scroll_distance = $('.scroll_distance input').val();
490
  if(scroll_distance != 150)
491
  output += ' scroll_distance="'+$('.scroll_distance input').val()+'"';
 
492
  var max_pages = $('.max_pages input').val();
493
  if(max_pages != 5)
494
- output += ' max_pages="'+$('.max_pages input').val()+'"';
 
 
 
 
 
495
  }
496
 
497
 
@@ -532,13 +573,22 @@ jQuery(document).ready(function($) {
532
  output += ' button_label="'+btn_lbl+'"';
533
 
534
 
 
 
 
 
 
 
 
 
 
535
  // ---------------------------
536
  // - Container Classes
537
  // ---------------------------
538
 
539
- var container_classes = $('.alm-classes input').val();
540
  container_classes = $.trim(container_classes);
541
- if(container_classes !== '' && $('.alm-classes input').hasClass('changed'))
542
  output += ' css_classes="'+container_classes+'"';
543
 
544
 
17
  */
18
  _alm.select2 = function(){
19
  // Default Select2
20
+ $('.row select, .cnkt-main select, select.jump-menu').not('.multiple, .meta-compare, .meta-type').select2({});
21
 
22
  // multiple
23
  $('.ajax-load-more .categories select.multiple').select2({
46
  // Add additional meta_query
47
  var meta_query_obj = $('.meta-query-wrap').eq(0).clone();
48
  $('.meta-query-wrap .remove').remove();
49
+ $('select.meta-compare, select.meta-type').select2();
50
  $('#add-meta-query').on('click', function(e){
51
  e.preventDefault();
52
 
163
  output += ' preloaded_amount="'+preload_amount+'"';
164
  }else{
165
  $('.preload_amount').slideUp(100, 'alm_easeInOutQuad');
166
+ }
167
+
168
+
169
+
170
+ // ---------------------------
171
+ // - Previous Post
172
+ // ---------------------------
173
+
174
+ var previous = $('.previous-post input[name=prev-post]:checked').val();
175
+ if(previous !== 'false' && previous != undefined){
176
+
177
+ var prev_post_id = $('#prev_post_id').val();
178
+ $('.prev_post_id').slideDown(100, 'alm_easeInOutQuad');
179
+
180
+ output += ' previous_post="'+previous+'"';
181
+ output += ' previous_post_id="\'.'+prev_post_id+'.\'"';
182
+
183
+ }else{
184
+ $('.prev_post_id').slideUp(100, 'alm_easeInOutQuad');
185
+ }
186
 
187
 
188
  // ---------------------------
336
  var meta_key = $.trim($('.meta-query-wrap').eq(0).find('input.meta-key').val()),
337
  meta_value = $.trim($('.meta-query-wrap').eq(0).find('input.meta-value').val()),
338
  meta_compare = $('.meta-query-wrap').eq(0).find('select.meta-compare').val(),
339
+ meta_type = $('.meta-query-wrap').eq(0).find('select.meta-type').val(),
340
  meta_relation = $('select.meta-relation').val(),
341
  meta_query_length = $('.meta-query-wrap').length;
342
 
343
  // Set meta_compare default value
344
  if(meta_compare === '' || meta_compare == undefined)
345
+ meta_compare = '=';
346
+
347
+ // Set meta_type default value
348
+ if(meta_type === '' || meta_type == undefined)
349
+ meta_type = 'CHAR';
350
 
351
  // Single Meta_Query()
352
  if(meta_query_length === 1){
354
  output += ' meta_key="'+meta_key+'"';
355
  output += ' meta_value="'+meta_value+'"';
356
 
357
+ if(meta_compare !== '='){
358
  output += ' meta_compare="'+meta_compare+'"';
359
+ }
360
 
361
+ if(meta_type !== 'CHAR'){
362
+ output += ' meta_type="'+meta_type+'"';
363
+ }
364
  }
365
  }
366
  // Multiple Meta_Query()
368
  meta_key = '';
369
  meta_value = '';
370
  meta_compare = '';
371
+ meta_type = '';
372
  $('.meta-query-wrap').each(function(e){
373
  var el = $(this),
374
  mk = $.trim(el.find('input.meta-key').val()),
375
  mv = $.trim(el.find('input.meta-value').val()),
376
+ mc = $.trim(el.find('select.meta-compare').val()),
377
+ mt = $.trim(el.find('select.meta-type').val());
378
 
379
  if(e === 0){ // first on first only
380
  meta_key += mk;
381
  meta_value += mv;
382
  meta_compare += mc;
383
+ meta_type += mt;
384
  }else{
385
  if(mk.length > 0 && mv.length > 0){
386
  meta_key += ':'+ mk;
387
  meta_value += ':'+ mv;
388
  meta_compare += ':'+ mc;
389
+ meta_type += ':'+ mt;
390
  }
391
  }
392
 
394
  output += ' meta_key="'+meta_key+'"';
395
  output += ' meta_value="'+meta_value+'"';
396
  output += ' meta_compare="'+meta_compare+'"';
397
+ output += ' meta_type="'+meta_type+'"';
398
 
399
  var isRelation = $('#meta-query-relation').css("display");
400
  if(meta_relation !== '' && meta_relation !== undefined && isRelation === 'block'){
503
  // ---------------------------
504
 
505
  var pause_load = $('.pause_load input[name=pause]:checked').val();
506
+ if(pause_load === 't'){
507
+ output += ' pause="true"';
508
+ }
509
 
510
 
511
 
515
 
516
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
517
  if(scroll_load === 'f'){
518
+ $('.max_pages, .scroll_distance, .pause_override').slideUp(100, 'alm_easeInOutQuad');
519
  if($('.scroll_load input').hasClass('changed'))
520
  output += ' scroll="false"';
521
  }else{
522
+ $('.max_pages, .scroll_distance, .pause_override').slideDown(100, 'alm_easeInOutQuad');
523
+
524
  var scroll_distance = $('.scroll_distance input').val();
525
  if(scroll_distance != 150)
526
  output += ' scroll_distance="'+$('.scroll_distance input').val()+'"';
527
+
528
  var max_pages = $('.max_pages input').val();
529
  if(max_pages != 5)
530
+ output += ' max_pages="'+$('.max_pages input').val()+'"';
531
+
532
+ var pause_override = $('.pause_override input[name=pause_override]:checked').val();
533
+ if(pause_override === 't' && pause_load === 't')
534
+ output += ' pause_override="true"';
535
+
536
  }
537
 
538
 
573
  output += ' button_label="'+btn_lbl+'"';
574
 
575
 
576
+ // ---------------------------
577
+ // - Container Type
578
+ // ---------------------------
579
+
580
+ var container_type = $('.container_type input[name=alm_container_type]:checked').val();
581
+ if(container_type)
582
+ output += ' container_type="'+container_type+'"';
583
+
584
+
585
  // ---------------------------
586
  // - Container Classes
587
  // ---------------------------
588
 
589
+ var container_classes = $('.alm-classes input#container-classes').val();
590
  container_classes = $.trim(container_classes);
591
+ if(container_classes !== '' && $('.alm-classes input#container-classes').hasClass('changed'))
592
  output += ' css_classes="'+container_classes+'"';
593
 
594
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -16,7 +16,8 @@
16
  <h3 class="heading"><?php _e('Cache', ALM_NAME); ?></h3>
17
  <div class="expand-wrap">
18
  <div class="section-title">
19
- <p><?php _e('Turn on content caching for this Ajax Load More query.', ALM_NAME); ?></p>
 
20
  </div>
21
  <div class="wrap">
22
  <div class="inner">
@@ -156,7 +157,7 @@
156
  <div class="clear"></div>
157
  <hr>
158
  <div class="section-title">
159
- <h4>Preload Amount</h4>
160
  <p><?php _e('Enter the number of posts to preload.', ALM_NAME); ?></p>
161
  </div>
162
  <div class="wrap">
@@ -170,6 +171,50 @@
170
  <?php } ?>
171
 
172
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
173
  <?php if(has_action('alm_seo_installed')){ ?>
174
  <!-- SEO -->
175
  <div class="row input seo add-on" id="alm-seo">
@@ -579,7 +624,7 @@
579
  <h3 class="heading"><?php _e('Post Parameters', ALM_NAME); ?></h3>
580
  <div class="expand-wrap">
581
  <div class="section-title">
582
- <h4>Include</h4>
583
  <p><?php _e('A comma separated list of post ID\'s to query.', ALM_NAME); ?></p>
584
  </div>
585
  <div class="wrap">
@@ -590,7 +635,7 @@
590
  <div class="clear"></div>
591
  <hr/>
592
  <div class="section-title">
593
- <h4>Exclude</h4>
594
  <p><?php _e('A comma separated list of post ID\'s to exclude from query.', ALM_NAME); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-exclude">view example</a></p>
595
  </div>
596
  <div class="wrap">
@@ -611,7 +656,7 @@
611
  <div class="wrap">
612
  <div class="inner">
613
  <select class="alm_element" name="post-status" id="post-status">
614
- <option value="publish" selected="selected">Published</option>
615
  <option value="future">Future</option>
616
  <option value="draft">Draft</option>
617
  <option value="pending">Pending</option>
@@ -632,14 +677,14 @@
632
  </div>
633
  <div class="wrap">
634
  <div class="inner half">
635
- <label class="full">Order:</label>
636
  <select class="alm_element" name="post-order" id="post-order">
637
  <option value="DESC" selected="selected">DESC (default)</option>
638
  <option value="ASC">ASC</option>
639
  </select>
640
  </div>
641
  <div class="inner half">
642
- <label class="full">Order By:</label>
643
  <select class="alm_element" name="post-orderby" id="post-orderby">
644
  <option value="date" selected="selected">Date (default)</option>
645
  <option value="title">Title</option>
@@ -714,7 +759,7 @@
714
  <h3 class="heading"><?php _e('Scrolling', ALM_NAME); ?></h3>
715
  <div class="expand-wrap">
716
  <div class="section-title">
717
- <h4>Enable Scrolling</h4>
718
  <p><?php _e('Load more posts as the user scrolls the page.', ALM_NAME); ?></p>
719
  </div>
720
  <div class="wrap">
@@ -736,7 +781,7 @@
736
  <div class="clear"></div>
737
  <hr>
738
  <div class="section-title">
739
- <h4>Scroll Distance</h4>
740
  <p><?php _e('The distance from the bottom of the screen to trigger the loading of posts while scrolling. (Default = 150)', ALM_NAME); ?></p>
741
  </div>
742
  <div class="wrap">
@@ -749,7 +794,7 @@
749
  <div class="clear"></div>
750
  <hr>
751
  <div class="section-title">
752
- <h4>Maximum Pages</h4>
753
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', ALM_NAME); ?></p>
754
  </div>
755
  <div class="wrap">
@@ -757,7 +802,27 @@
757
  <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="5">
758
  </div>
759
  </div>
760
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
761
  </div>
762
  </div>
763
 
@@ -772,7 +837,7 @@
772
  <div class="inner">
773
  <ul>
774
  <li>
775
- <input class="alm_element" type="radio" name="transition" value="slide" id="transition-slide" checked>
776
  <label for="transition-slide"><?php _e('Slide', ALM_NAME); ?></label>
777
  </li>
778
  <li>
@@ -804,7 +869,7 @@
804
  <label for="images_loaded_t"><?php _e('True', ALM_NAME); ?></label>
805
  </li>
806
  <li>
807
- <input class="alm_element" type="radio" name="images_loaded" value="f" id="images_loaded_f" checked>
808
  <label for="images_loaded_f"><?php _e('False', ALM_NAME); ?></label>
809
  </li>
810
  </ul>
@@ -845,9 +910,31 @@
845
 
846
  <!-- Container Classes -->
847
  <div class="row input alm-classes" id="alm-classes">
848
- <h3 class="heading"><?php _e('Container Classes', ALM_NAME); ?></h3>
849
  <div class="expand-wrap">
 
850
  <div class="section-title">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
851
  <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', ALM_NAME); ?></p>
852
  </div>
853
  <div class="wrap">
@@ -855,6 +942,7 @@
855
  <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
856
  </div>
857
  </div>
 
858
  </div>
859
  </div>
860
 
16
  <h3 class="heading"><?php _e('Cache', ALM_NAME); ?></h3>
17
  <div class="expand-wrap">
18
  <div class="section-title">
19
+ <h4>Enable Caching</h4>
20
+ <p><?php _e('Turn on content caching.', ALM_NAME); ?></p>
21
  </div>
22
  <div class="wrap">
23
  <div class="inner">
157
  <div class="clear"></div>
158
  <hr>
159
  <div class="section-title">
160
+ <h4><?php _e('Preload Amount', ALM_NAME); ?></h4>
161
  <p><?php _e('Enter the number of posts to preload.', ALM_NAME); ?></p>
162
  </div>
163
  <div class="wrap">
171
  <?php } ?>
172
 
173
 
174
+ <?php if(has_action('alm_prev_post_installed')){ ?>
175
+ <!-- PREV POST -->
176
+ <div class="row input previous-post add-on" id="alm-previous-post">
177
+ <h3 class="heading"><?php _e('Previous Post', ALM_NAME); ?></h3>
178
+ <div class="expand-wrap">
179
+ <div class="section-title">
180
+ <p><?php _e('Enable the infinite scrolling of single posts.', ALM_NAME); ?></p>
181
+ </div>
182
+ <div class="wrap">
183
+ <div class="inner">
184
+ <ul>
185
+ <li>
186
+ <input class="alm_element" type="radio" name="prev-post" value="true" id="prev-post-true" >
187
+ <label for="prev-post-true"><?php _e('True', ALM_NAME); ?></label>
188
+ </li>
189
+ <li>
190
+ <input class="alm_element" type="radio" name="prev-post" value="false" id="prev-post-false" checked="checked">
191
+ <label for="prev-post-false"><?php _e('False', ALM_NAME); ?></label>
192
+ </li>
193
+ </ul>
194
+ </div>
195
+ </div>
196
+ <div class="clear"></div>
197
+ <div class="prev_post_id" style="display: none;">
198
+ <div class="clear"></div>
199
+ <hr>
200
+ <div class="section-title">
201
+ <h4><?php _e('Post ID', ALM_NAME); ?></h4>
202
+ <p><?php _e('The current post ID to pass to Ajax Load More.', ALM_NAME); ?></p>
203
+ </div>
204
+ <div class="wrap">
205
+ <div class="inner">
206
+ <input type="text" value="get_the_ID()" id="prev_post_id" class="alm_element disabled-input" disabled="disabled">
207
+ </div>
208
+ </div>
209
+ <p class="warning-callout">
210
+ <?php _e('You must add the Previous Post shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/" target="_blank">View documentation</a>', ALM_NAME); ?>
211
+ </p>
212
+ </div>
213
+ </div>
214
+ </div>
215
+ <?php } ?>
216
+
217
+
218
  <?php if(has_action('alm_seo_installed')){ ?>
219
  <!-- SEO -->
220
  <div class="row input seo add-on" id="alm-seo">
624
  <h3 class="heading"><?php _e('Post Parameters', ALM_NAME); ?></h3>
625
  <div class="expand-wrap">
626
  <div class="section-title">
627
+ <h4><?php _e('Include', ALM_NAME); ?></h4>
628
  <p><?php _e('A comma separated list of post ID\'s to query.', ALM_NAME); ?></p>
629
  </div>
630
  <div class="wrap">
635
  <div class="clear"></div>
636
  <hr/>
637
  <div class="section-title">
638
+ <h4><?php _e('Exclude', ALM_NAME); ?></h4>
639
  <p><?php _e('A comma separated list of post ID\'s to exclude from query.', ALM_NAME); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-examples#example-exclude">view example</a></p>
640
  </div>
641
  <div class="wrap">
656
  <div class="wrap">
657
  <div class="inner">
658
  <select class="alm_element" name="post-status" id="post-status">
659
+ <option value="publish" selected="selected"><?php _e('Published', ALM_NAME); ?></option>
660
  <option value="future">Future</option>
661
  <option value="draft">Draft</option>
662
  <option value="pending">Pending</option>
677
  </div>
678
  <div class="wrap">
679
  <div class="inner half">
680
+ <label class="full"><?php _e('Order', ALM_NAME); ?>:</label>
681
  <select class="alm_element" name="post-order" id="post-order">
682
  <option value="DESC" selected="selected">DESC (default)</option>
683
  <option value="ASC">ASC</option>
684
  </select>
685
  </div>
686
  <div class="inner half">
687
+ <label class="full"><?php _e('Order By', ALM_NAME); ?>:</label>
688
  <select class="alm_element" name="post-orderby" id="post-orderby">
689
  <option value="date" selected="selected">Date (default)</option>
690
  <option value="title">Title</option>
759
  <h3 class="heading"><?php _e('Scrolling', ALM_NAME); ?></h3>
760
  <div class="expand-wrap">
761
  <div class="section-title">
762
+ <h4><?php _e('Enable Scrolling', ALM_NAME); ?></h4>
763
  <p><?php _e('Load more posts as the user scrolls the page.', ALM_NAME); ?></p>
764
  </div>
765
  <div class="wrap">
781
  <div class="clear"></div>
782
  <hr>
783
  <div class="section-title">
784
+ <h4><?php _e('Scroll Distance', ALM_NAME); ?></h4>
785
  <p><?php _e('The distance from the bottom of the screen to trigger the loading of posts while scrolling. (Default = 150)', ALM_NAME); ?></p>
786
  </div>
787
  <div class="wrap">
794
  <div class="clear"></div>
795
  <hr>
796
  <div class="section-title">
797
+ <h4><?php _e('Maximum Pages', ALM_NAME); ?></h4>
798
  <p><?php _e('Maximum number of pages to load while scrolling. (0 = unlimited)', ALM_NAME); ?></p>
799
  </div>
800
  <div class="wrap">
802
  <input type="number" class="alm_element numbers-only" name="max-select" id="max-select" step="1" min="0" value="5">
803
  </div>
804
  </div>
805
+ </div>
806
+ <div class="pause_override">
807
+ <div class="clear"></div>
808
+ <hr>
809
+ <div class="section-title">
810
+ <h4><?php _e('Pause Override', ALM_NAME); ?></h4>
811
+ <p><?php _e('Allow scrolling to override the Pause parameter and trigger the loading of posts on scroll.', ALM_NAME); ?></p>
812
+ </div>
813
+ <div class="wrap">
814
+ <ul>
815
+ <li>
816
+ <input class="alm_element" type="radio" name="pause_override" value="t" id="pause_override_t">
817
+ <label for="pause_override_t"><?php _e('True', ALM_NAME); ?></label>
818
+ </li>
819
+ <li>
820
+ <input class="alm_element" type="radio" name="pause_override" value="f" id="pause_override_f" checked="checked">
821
+ <label for="pause_override_f"><?php _e('False', ALM_NAME); ?></label>
822
+ </li>
823
+ </ul>
824
+ </div>
825
+ </div>
826
  </div>
827
  </div>
828
 
837
  <div class="inner">
838
  <ul>
839
  <li>
840
+ <input class="alm_element" type="radio" name="transition" value="slide" id="transition-slide" checked="checked">
841
  <label for="transition-slide"><?php _e('Slide', ALM_NAME); ?></label>
842
  </li>
843
  <li>
869
  <label for="images_loaded_t"><?php _e('True', ALM_NAME); ?></label>
870
  </li>
871
  <li>
872
+ <input class="alm_element" type="radio" name="images_loaded" value="f" id="images_loaded_f" checked="checked">
873
  <label for="images_loaded_f"><?php _e('False', ALM_NAME); ?></label>
874
  </li>
875
  </ul>
910
 
911
  <!-- Container Classes -->
912
  <div class="row input alm-classes" id="alm-classes">
913
+ <h3 class="heading"><?php _e('Container Options', ALM_NAME); ?></h3>
914
  <div class="expand-wrap">
915
+
916
  <div class="section-title">
917
+ <h4><?php _e('Container Type', ALM_NAME); ?></h4>
918
+ <p><?php _e('Override the global Container Type that was set on <a href="admin.php?page=ajax-load-more">ALM Settings page</a>.', ALM_NAME); ?></p>
919
+ </div>
920
+ <div class="wrap">
921
+ <div class="inner">
922
+ <ul class="container_type">
923
+ <li>
924
+ <input type="radio" id="type-ul" value="ul" name="alm_container_type" class="alm_element">
925
+ <label for="type-ul">&lt;ul&gt; &lt;/ul&gt;</label>
926
+ </li>
927
+ <li>
928
+ <input type="radio" id="type-div" value="div" name="alm_container_type" class="alm_element">
929
+ <label for="type-div">&lt;div&gt; &lt;/div&gt;</label>
930
+ </li>
931
+ </ul>
932
+ </div>
933
+ </div>
934
+ <div class="clear"></div>
935
+ <hr/>
936
+ <div class="section-title">
937
+ <h4><?php _e('Container Classes', ALM_NAME); ?></h4>
938
  <p><?php _e('Add custom CSS classes to the Ajax Load More container. <br/><br/> e.g. portfolio-listing large-12 etc', ALM_NAME); ?></p>
939
  </div>
940
  <div class="wrap">
942
  <input class="alm_element" name="container-classes" type="text" id="container-classes" placeholder="portfolio-listing large-12">
943
  </div>
944
  </div>
945
+
946
  </div>
947
  </div>
948
 
admin/views/add-ons.php CHANGED
@@ -14,7 +14,7 @@
14
 
15
  <a href="<?php echo $cache_url; ?>">
16
  <div class="expand-wrap">
17
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-ons.jpg">
18
  <h2 class="addon-title"><?php _e('Cache', ALM_NAME); ?></h2>
19
  <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', ALM_NAME); ?></p>
20
  <p><?php _e('The Cache add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.', ALM_NAME); ?></p>
@@ -33,7 +33,7 @@
33
  <!-- End Cache -->
34
 
35
 
36
- <!-- Custom Repeaters v2 -->
37
  <div class="group">
38
  <div class="row no-brd">
39
  <?php $cr_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Custom%20Repeaters'; ?>
@@ -56,7 +56,7 @@
56
  </div>
57
 
58
  </div>
59
- <!-- End Custom Repeaters v2 -->
60
 
61
 
62
  <!-- Paging -->
@@ -69,8 +69,8 @@
69
  <div class="expand-wrap">
70
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg">
71
  <h2 class="addon-title"><?php _e('Paging', ALM_NAME); ?></h2>
72
- <p class="addon-intro"><?php _e('Extend Ajax Load More with a numbered paging navigation.', ALM_NAME); ?></p>
73
- <p><?php _e('The Paging add-on will transform Ajax Load More infinite scroll functionality into a robust ajax powered navigation system.', ALM_NAME); ?></p>
74
  <?php
75
  if (has_action('alm_paging_installed')){
76
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
@@ -83,7 +83,7 @@
83
  </div>
84
 
85
  </div>
86
- <!-- End Custom Repeaters v2 -->
87
 
88
 
89
  <!-- Preloaded -->
@@ -112,6 +112,32 @@
112
  <!-- End Preloaded -->
113
 
114
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  <!-- SEO -->
116
  <div class="group">
117
  <div class="row no-brd">
@@ -148,7 +174,7 @@
148
  <div class="expand-wrap">
149
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg">
150
  <h2 class="addon-title"><?php _e('Theme Repeaters', ALM_NAME); ?></h2>
151
- <p class="addon-intro"><?php _e('Manage repeater templates within your current theme directory', ALM_NAME); ?></p>
152
  <p><?php _e('The Theme Repeater add-on will allow you load, edit and maintain templates from your current theme directory.</p>', ALM_NAME); ?></p>
153
  <?php
154
 
14
 
15
  <a href="<?php echo $cache_url; ?>">
16
  <div class="expand-wrap">
17
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg">
18
  <h2 class="addon-title"><?php _e('Cache', ALM_NAME); ?></h2>
19
  <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', ALM_NAME); ?></p>
20
  <p><?php _e('The Cache add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.', ALM_NAME); ?></p>
33
  <!-- End Cache -->
34
 
35
 
36
+ <!-- Custom Repeaters -->
37
  <div class="group">
38
  <div class="row no-brd">
39
  <?php $cr_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Custom%20Repeaters'; ?>
56
  </div>
57
 
58
  </div>
59
+ <!-- End Custom Repeaters -->
60
 
61
 
62
  <!-- Paging -->
69
  <div class="expand-wrap">
70
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg">
71
  <h2 class="addon-title"><?php _e('Paging', ALM_NAME); ?></h2>
72
+ <p class="addon-intro"><?php _e('Extend Ajax Load More with a numbered navigation.', ALM_NAME); ?></p>
73
+ <p><?php _e('The Paging add-on will transform the default infinite scroll functionality into a robust ajax powered navigation system.', ALM_NAME); ?></p>
74
  <?php
75
  if (has_action('alm_paging_installed')){
76
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
83
  </div>
84
 
85
  </div>
86
+ <!-- End Paging -->
87
 
88
 
89
  <!-- Preloaded -->
112
  <!-- End Preloaded -->
113
 
114
 
115
+ <!-- Previous Post -->
116
+ <div class="group">
117
+ <div class="row no-brd">
118
+ <?php
119
+ $prev_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Previous Post';
120
+ ?>
121
+ <a href="<?php echo $prev_url; ?>">
122
+ <div class="expand-wrap">
123
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg">
124
+ <h2 class="addon-title"><?php _e('Previous Post', ALM_NAME); ?></h2>
125
+ <p class="addon-intro"><?php _e('An extension to enable infinite scrolling of single posts.', ALM_NAME); ?></p>
126
+ <p><?php _e('The Previous Post add-on will load single posts as you scroll and update the browser URL to the current post.', ALM_NAME); ?></p>
127
+ <?php
128
+ if (has_action('alm_prev_post_installed')){
129
+ echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
130
+ }else{
131
+ echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
132
+ }
133
+ ?>
134
+ </div>
135
+ </a>
136
+ </div>
137
+ </div>
138
+ <!-- End Previous Post -->
139
+
140
+
141
  <!-- SEO -->
142
  <div class="group">
143
  <div class="row no-brd">
174
  <div class="expand-wrap">
175
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg">
176
  <h2 class="addon-title"><?php _e('Theme Repeaters', ALM_NAME); ?></h2>
177
+ <p class="addon-intro"><?php _e('Manage repeater templates within your current theme directory.', ALM_NAME); ?></p>
178
  <p><?php _e('The Theme Repeater add-on will allow you load, edit and maintain templates from your current theme directory.</p>', ALM_NAME); ?></p>
179
  <?php
180
 
admin/views/examples.php CHANGED
@@ -70,17 +70,9 @@
70
 
71
  </div>
72
  <div class="cnkt-sidebar">
73
-
74
- <div class="cta">
75
- <h3><?php _e('Did you know?', ALM_NAME); ?></h3>
76
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
77
- <?php _e('<p class="addon-intro">You can generate shortcodes while editing pages!</p><p>Click the Ajax Load More icon in the content editor toolbar and the <a href="?page=ajax-load-more-shortcode-builder">shortcode builder</a> will open in an overlay window.', ALM_NAME); ?></p>
78
- </div>
79
-
80
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
81
-
82
- </div>
83
-
84
 
85
  </div>
86
  </div>
70
 
71
  </div>
72
  <div class="cnkt-sidebar">
 
 
 
 
 
 
 
73
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
74
+ <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
75
+ </div>
 
76
 
77
  </div>
78
  </div>
admin/views/licenses.php CHANGED
@@ -15,6 +15,7 @@
15
  // alm_unlimited_installed
16
  // alm_preload_installed
17
  // alm_paging_installed
 
18
  // alm_seo_installed
19
  // alm_theme_repeaters_installed
20
  ?>
@@ -191,7 +192,7 @@
191
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
192
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
193
  ?>
194
- <div class="license" id="license-paging">
195
  <div class="license-title">
196
  <div class="status <?php if($alm_preloaded_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
197
  <h2><?php _e('Preloaded', ALM_NAME); ?></h2>
@@ -238,6 +239,59 @@
238
  // End PRELOADED
239
  ?>
240
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
 
242
  <?php
243
  if (has_action('alm_seo_installed')){
15
  // alm_unlimited_installed
16
  // alm_preload_installed
17
  // alm_paging_installed
18
+ // alm_prev_post_installed
19
  // alm_seo_installed
20
  // alm_theme_repeaters_installed
21
  ?>
192
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
193
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
194
  ?>
195
+ <div class="license" id="license-preloaded">
196
  <div class="license-title">
197
  <div class="status <?php if($alm_preloaded_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
198
  <h2><?php _e('Preloaded', ALM_NAME); ?></h2>
239
  // End PRELOADED
240
  ?>
241
 
242
+ <?php
243
+ if (has_action('alm_prev_post_installed')){
244
+ // PREVIOUS POST
245
+ $alm_prev_post_license = get_option( 'alm_prev_post_license_key' );
246
+ $alm_prev_post_status = get_option( 'alm_prev_post_license_status' );
247
+ ?>
248
+ <div class="license" id="license-previous-post">
249
+ <div class="license-title">
250
+ <div class="status <?php if($alm_prev_post_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
251
+ <h2><?php _e('Previous Post', ALM_NAME); ?></h2>
252
+ </div>
253
+ <div class="license-wrap">
254
+ <form method="post" action="options.php">
255
+
256
+ <?php settings_fields('alm_prev_post_license'); ?>
257
+ <label class="description" for="alm_prev_post_license_key"><?php _e('Enter License Key', ALM_NAME); ?></label>
258
+ <div class="license-key-field">
259
+ <input id="alm_prev_post_license_key" name="alm_prev_post_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_prev_post_license ); ?>" placeholder="<?php _e('Enter License Key', ALM_NAME); ?>" />
260
+ <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
261
+ <span class="status active">
262
+ <?php _e('Active', ALM_NAME); ?>
263
+ </span>
264
+ <?php } else { ?>
265
+ <span class="status inactive">
266
+ <?php _e('In-active', ALM_NAME); ?>
267
+ </span>
268
+ <?php } ?>
269
+ </div>
270
+
271
+ <?php wp_nonce_field( 'alm_prev_post_license_nonce', 'alm_prev_post_license_nonce' ); ?>
272
+ <?php if($alm_prev_post_status === '' || $alm_prev_post_status !== 'valid') {
273
+ submit_button(__('Save License Key', ALM_NAME), 'primary', '', false);
274
+ } ?>
275
+
276
+ <?php if( false !== $alm_prev_post_license ) { ?>
277
+
278
+ <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
279
+ <input type="submit" class="button-secondary" name="alm_prev_post_license_deactivate" value="<?php _e('De-activate License', ALM_NAME); ?>"/>
280
+ <?php } else { ?>
281
+ <?php if(!empty($alm_prev_post_license)){ ?>
282
+ <input type="submit" class="button-secondary" name="alm_prev_post_license_activate" value="<?php _e('Activate License', ALM_NAME); ?>"/>
283
+ <?php } ?>
284
+ <?php } ?>
285
+ <?php } ?>
286
+
287
+ </form>
288
+ </div>
289
+ </div>
290
+ <?php
291
+ }
292
+ // End PREVIOUS POST
293
+ ?>
294
+
295
 
296
  <?php
297
  if (has_action('alm_seo_installed')){
admin/views/settings.php CHANGED
@@ -2,7 +2,7 @@
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h2><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span></h2>
5
- <p><?php _e('A WordPress plugin for lazy loading posts with Ajax', ALM_NAME); ?></p>
6
  </div>
7
  <?php if( isset($_GET['settings-updated']) ) { ?>
8
  <div id="message" class="updated inline">
@@ -12,7 +12,7 @@
12
  <div class="cnkt-main">
13
  <div class="group">
14
  <?php
15
- if(has_action('alm_cache_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
16
  ?>
17
  <ul class="alm-settings-nav">
18
  <li><a href="javascript:void(0);"><?php _e('Global Settings', ALM_NAME); ?></a></li>
@@ -22,6 +22,8 @@
22
  echo '<li><a href="javascript:void(0);">'.__('Cache', ALM_NAME).'</a></li>';
23
  if(has_action('alm_paging_settings'))
24
  echo '<li><a href="javascript:void(0);">'.__('Paging', ALM_NAME).'</a></li>';
 
 
25
  if(has_action('alm_seo_settings'))
26
  echo '<li><a href="javascript:void(0);">'.__('SEO', ALM_NAME).'</a></li>';
27
  if(has_action('alm_theme_repeaters_settings'))
@@ -63,10 +65,10 @@
63
  </div>
64
  </div>
65
  <div class="cnkt-sidebar">
66
- <?php include_once( ALM_PATH . 'admin/includes/cta/mailinglist.php'); ?>
67
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
68
  <?php include_once( ALM_PATH . 'admin/includes/cta/add-ons.php'); ?>
69
- <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
70
  </div>
71
  </div>
72
  </div>
2
  <div class="wrap">
3
  <div class="header-wrap">
4
  <h2><?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span></h2>
5
+ <p><?php _e('A powerful solution to add infinite scroll functionality to any website.', ALM_NAME); ?></p>
6
  </div>
7
  <?php if( isset($_GET['settings-updated']) ) { ?>
8
  <div id="message" class="updated inline">
12
  <div class="cnkt-main">
13
  <div class="group">
14
  <?php
15
+ if(has_action('alm_cache_settings') || has_action('alm_next_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
16
  ?>
17
  <ul class="alm-settings-nav">
18
  <li><a href="javascript:void(0);"><?php _e('Global Settings', ALM_NAME); ?></a></li>
22
  echo '<li><a href="javascript:void(0);">'.__('Cache', ALM_NAME).'</a></li>';
23
  if(has_action('alm_paging_settings'))
24
  echo '<li><a href="javascript:void(0);">'.__('Paging', ALM_NAME).'</a></li>';
25
+ if(has_action('alm_prev_post_settings'))
26
+ echo '<li><a href="javascript:void(0);">'.__('Previous Post', ALM_NAME).'</a></li>';
27
  if(has_action('alm_seo_settings'))
28
  echo '<li><a href="javascript:void(0);">'.__('SEO', ALM_NAME).'</a></li>';
29
  if(has_action('alm_theme_repeaters_settings'))
65
  </div>
66
  </div>
67
  <div class="cnkt-sidebar">
68
+ <?php include_once( ALM_PATH . 'admin/includes/cta/mailinglist.php'); ?>
69
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
70
  <?php include_once( ALM_PATH . 'admin/includes/cta/add-ons.php'); ?>
71
+ <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
72
  </div>
73
  </div>
74
  </div>
ajax-load-more.php CHANGED
@@ -2,18 +2,18 @@
2
  /*
3
  Plugin Name: Ajax Load More
4
  Plugin URI: http://connekthq.com/plugins/ajax-load-more
5
- Description: A simple solution for lazy loading WordPress posts and pages with Ajax.
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
- Version: 2.7.3
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
- define( 'ALM_VERSION', '2.7.3' );
15
- define( 'ALM_RELEASE', 'August 6, 2015' );
16
- define( 'ALM_STORE_URL', 'https://connekthq.com' ); // EDD CONSTANT - Store URL
17
 
18
 
19
  /*
@@ -97,8 +97,8 @@ function alm_create_table(){
97
 
98
 
99
 
100
-
101
  if( !class_exists('AjaxLoadMore') ):
 
102
  class AjaxLoadMore {
103
 
104
  function __construct(){
@@ -238,8 +238,9 @@ if( !class_exists('AjaxLoadMore') ):
238
 
239
  function alm_shortcode( $atts, $content = null ) {
240
  $options = get_option( 'alm_settings' ); //Get plugin options
241
-
242
  extract(shortcode_atts(array(
 
 
243
  'cache' => 'false',
244
  'cache_id' => '',
245
  'paging' => 'false',
@@ -264,6 +265,7 @@ if( !class_exists('AjaxLoadMore') ):
264
  'meta_value' => '',
265
  'meta_compare' => '',
266
  'meta_relation' => '',
 
267
  'year' => '',
268
  'month' => '',
269
  'day' => '',
@@ -280,18 +282,32 @@ if( !class_exists('AjaxLoadMore') ):
280
  'scroll' => 'true',
281
  'scroll_distance' => '150',
282
  'max_pages' => '5',
 
283
  'pause' => 'false',
284
  'destroy_after' => '',
285
  'transition' => 'slide',
286
  'images_loaded' => 'false',
287
  'button_label' => __('Older Posts', ALM_NAME),
 
288
  'css_classes' => '',
289
  ), $atts));
290
-
 
 
291
  // Get container elements (ul | div)
 
292
  $container_element = 'ul';
293
- if($options['_alm_container_type'] == '2')
294
  $container_element = 'div';
 
 
 
 
 
 
 
 
 
295
 
296
  // Get extra classnames
297
  $classname = '';
@@ -335,9 +351,27 @@ if( !class_exists('AjaxLoadMore') ):
335
  }
336
 
337
  // Start ALM object
338
- $ajaxloadmore = '<div id="ajax-load-more" class="ajax-load-more-wrap '. $btn_color .''. $paging_color .'">';
339
 
340
- // Preload Posts
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
341
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
342
 
343
  // If SEO then set $preloaded_amount to $posts_per_page
@@ -359,6 +393,7 @@ if( !class_exists('AjaxLoadMore') ):
359
  'meta_value' => $meta_value,
360
  'meta_compare' => $meta_compare,
361
  'meta_relation' => $meta_relation,
 
362
  'year' => $year,
363
  'month' => $month,
364
  'day' => $day,
@@ -392,31 +427,33 @@ if( !class_exists('AjaxLoadMore') ):
392
  while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
393
  $alm_loop_count++;
394
  $alm_item = $alm_loop_count; // Get current item in loop
 
395
  if($theme_repeater != 'null' && has_filter('alm_get_theme_repeater')){
396
  $preloaded_type = null;
397
- $output .= apply_filters('alm_preload_inc', $repeater, $preloaded_type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item);
398
- }else{
399
- $output .= apply_filters('alm_preload_inc', $repeater, $preloaded_type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item);
400
- }
401
- endwhile;
402
- wp_reset_query();
403
  endif;
404
  $preloaded_output = '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
405
  $preloaded_output .= $output;
406
  $preloaded_output .= '</'.$container_element.'>';
407
 
408
- $ajaxloadmore .= $preloaded_output; // Add $preloadeded data to $ajaxloadmore
409
  }
410
  // End Preload Posts
411
 
412
 
413
  $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $paging_container_class .' '. $classname . ' '. $css_classes .'"'; // Build ALM container
414
 
415
- //Cache Add-on
 
416
  if(has_action('alm_cache_installed') && $cache === 'true'){
417
  $cache_return = apply_filters('alm_cache_shortcode', $cache, $cache_id, $options);
418
  $ajaxloadmore .= $cache_return;
419
  }
 
420
 
421
  // Paging Add-on
422
  if(has_action('alm_paging_installed') && $paging === 'true'){
@@ -424,21 +461,30 @@ if( !class_exists('AjaxLoadMore') ):
424
  $ajaxloadmore .= $paging_return;
425
  }
426
 
 
427
  // Preloaded Add-on
428
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
429
  $ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
430
  $ajaxloadmore .= ' data-preloaded-amount="'.$preloaded_amount.'"';
431
  }
 
432
 
433
  // SEO Add-on
434
  if(has_action('alm_seo_installed') && $seo === 'true'){
435
  $seo_return = apply_filters('alm_seo_shortcode', $seo, $preloaded, $options);
436
  $ajaxloadmore .= $seo_return;
437
  }
 
 
 
 
 
 
 
 
438
 
439
- $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
440
- if($theme_repeater != 'null')
441
- $ajaxloadmore .= ' data-theme-repeater="'.$theme_repeater.'"';
442
  $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
443
  $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
444
  $ajaxloadmore .= ' data-category="'.$category.'"';
@@ -452,6 +498,7 @@ if( !class_exists('AjaxLoadMore') ):
452
  $ajaxloadmore .= ' data-meta-value="'.$meta_value.'"';
453
  $ajaxloadmore .= ' data-meta-compare="'.$meta_compare.'"';
454
  $ajaxloadmore .= ' data-meta-relation="'.$meta_relation.'"';
 
455
  $ajaxloadmore .= ' data-year="'.$year.'"';
456
  $ajaxloadmore .= ' data-month="'.$month.'"';
457
  $ajaxloadmore .= ' data-day="'.$day.'"';
@@ -469,6 +516,7 @@ if( !class_exists('AjaxLoadMore') ):
469
  $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
470
  $ajaxloadmore .= ' data-scroll-distance="'.$scroll_distance.'"';
471
  $ajaxloadmore .= ' data-max-pages="'.$max_pages.'"';
 
472
  $ajaxloadmore .= ' data-pause="'.$pause.'"';
473
  $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
474
  $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
@@ -476,11 +524,39 @@ if( !class_exists('AjaxLoadMore') ):
476
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
477
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
478
 
479
- $ajaxloadmore .= '></'.$container_element.'>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
 
481
- $ajaxloadmore .= '</div>';
482
- // End Build ALM container
483
 
 
 
 
 
 
 
 
 
 
 
484
  return $ajaxloadmore;
485
  }
486
 
@@ -546,6 +622,8 @@ if( !class_exists('AjaxLoadMore') ):
546
  if($meta_compare == '') $meta_compare = 'IN';
547
  $meta_relation = $_GET['meta_relation'];
548
  if($meta_relation == '') $meta_relation = 'AND';
 
 
549
 
550
  $s = (isset($_GET['search'])) ? $_GET['search'] : '';
551
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
@@ -566,7 +644,7 @@ if( !class_exists('AjaxLoadMore') ):
566
  $numPosts = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
567
  $page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;
568
 
569
- // Preload
570
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
571
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
572
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
@@ -575,7 +653,11 @@ if( !class_exists('AjaxLoadMore') ):
575
  $offset = $offset + $preloaded_amount;
576
  }
577
 
578
- //SEO
 
 
 
 
579
  $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
580
 
581
  // Language (Is this needed?)
@@ -643,34 +725,35 @@ if( !class_exists('AjaxLoadMore') ):
643
  $meta_keys = explode(":", $meta_key); // convert to array
644
  $meta_value = explode(":", $meta_value); // convert to array
645
  $meta_compare = explode(":", $meta_compare); // convert to array
 
646
 
647
  if($total == 1){
648
  $args['meta_query'] = array(
649
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
650
  );
651
  }
652
  if($total == 2){
653
  $args['meta_query'] = array(
654
  'relation' => $meta_relation,
655
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
656
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
657
  );
658
  }
659
  if($total == 3){
660
  $args['meta_query'] = array(
661
  'relation' => $meta_relation,
662
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
663
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
664
- alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2]),
665
  );
666
  }
667
  if($total == 4){
668
  $args['meta_query'] = array(
669
  'relation' => $meta_relation,
670
- alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0]),
671
- alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1]),
672
- alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2]),
673
- alm_get_meta_query($meta_keys[3], $meta_value[3], $meta_compare[3]),
674
  );
675
  }
676
 
@@ -731,7 +814,15 @@ if( !class_exists('AjaxLoadMore') ):
731
  $alm_page_count = 1;
732
  }else{
733
  $alm_page_count = $page + 1;
734
- }
 
 
 
 
 
 
 
 
735
 
736
  // WP_Query()
737
  $alm_query = new WP_Query( $args );
@@ -780,12 +871,12 @@ if( !class_exists('AjaxLoadMore') ):
780
 
781
  endwhile; wp_reset_query();
782
 
783
- // If cache is enabled and seo_start_page is 1 (meaning, a user has not requested /page/12/)
784
- // - Only create cached files if the user visits pages in order 1, 2, 3 etc.
785
-
786
- if(!empty($cache_id) && has_action('alm_cache_installed') && $seo_start_page == 1){
787
- apply_filters('alm_cache_file', $cache_id, $page, $page_cache);
788
- }
789
 
790
  endif;
791
 
2
  /*
3
  Plugin Name: Ajax Load More
4
  Plugin URI: http://connekthq.com/plugins/ajax-load-more
5
+ Description: A powerful solution to add infinite scroll functionality to your website.
6
  Author: Darren Cooney
7
  Twitter: @KaptonKaos
8
  Author URI: http://connekthq.com
9
+ Version: 2.8.0
10
  License: GPL
11
  Copyright: Darren Cooney & Connekt Media
12
  */
13
 
14
+ define( 'ALM_VERSION', '2.8.0' );
15
+ define( 'ALM_RELEASE', 'September 14, 2015' );
16
+ define( 'ALM_STORE_URL', 'https://connekthq.com' );
17
 
18
 
19
  /*
97
 
98
 
99
 
 
100
  if( !class_exists('AjaxLoadMore') ):
101
+
102
  class AjaxLoadMore {
103
 
104
  function __construct(){
238
 
239
  function alm_shortcode( $atts, $content = null ) {
240
  $options = get_option( 'alm_settings' ); //Get plugin options
 
241
  extract(shortcode_atts(array(
242
+ 'previous_post' => false,
243
+ 'previous_post_id' => 'null',
244
  'cache' => 'false',
245
  'cache_id' => '',
246
  'paging' => 'false',
265
  'meta_value' => '',
266
  'meta_compare' => '',
267
  'meta_relation' => '',
268
+ 'meta_type' => '',
269
  'year' => '',
270
  'month' => '',
271
  'day' => '',
282
  'scroll' => 'true',
283
  'scroll_distance' => '150',
284
  'max_pages' => '5',
285
+ 'pause_override' => 'false',
286
  'pause' => 'false',
287
  'destroy_after' => '',
288
  'transition' => 'slide',
289
  'images_loaded' => 'false',
290
  'button_label' => __('Older Posts', ALM_NAME),
291
+ 'container_type' => '',
292
  'css_classes' => '',
293
  ), $atts));
294
+
295
+ if($previous_post === 'true') $previous_post === true;
296
+
297
  // Get container elements (ul | div)
298
+
299
  $container_element = 'ul';
300
+ if($options['_alm_container_type'] == '2' || $previous_post)
301
  $container_element = 'div';
302
+ // override shortcode param
303
+ if($container_type){
304
+ $container_element = $container_type;
305
+ }
306
+ // Previous post override
307
+ if($previous_post){
308
+ $container_element = 'div';
309
+ }
310
+
311
 
312
  // Get extra classnames
313
  $classname = '';
351
  }
352
 
353
  // Start ALM object
 
354
 
355
+ $ajaxloadmore = '';
356
+
357
+ // ALM Filter (alm_before_container)
358
+ $ajaxloadmore .= apply_filters('alm_before_container', '');
359
+
360
+ $ajaxloadmore .= '<div id="ajax-load-more" class="ajax-load-more-wrap '. $btn_color .''. $paging_color .'" data-id="">';
361
+
362
+
363
+ // Previous Post
364
+ // - Set other add-on params to false
365
+ if($previous_post){
366
+ $preloaded = false;
367
+ $seo = false;
368
+ $paging = false;
369
+ $cache = false;
370
+ }
371
+
372
+
373
+ // Preloaded Add-on
374
+ // Get preloaded posts and append to ajax load more object
375
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
376
 
377
  // If SEO then set $preloaded_amount to $posts_per_page
393
  'meta_value' => $meta_value,
394
  'meta_compare' => $meta_compare,
395
  'meta_relation' => $meta_relation,
396
+ 'meta_type' => $meta_type,
397
  'year' => $year,
398
  'month' => $month,
399
  'day' => $day,
427
  while ($alm_preload_query->have_posts()) : $alm_preload_query->the_post();
428
  $alm_loop_count++;
429
  $alm_item = $alm_loop_count; // Get current item in loop
430
+
431
  if($theme_repeater != 'null' && has_filter('alm_get_theme_repeater')){
432
  $preloaded_type = null;
433
+ }
434
+
435
+ $output .= apply_filters('alm_preload_inc', $repeater, $preloaded_type, $theme_repeater, $alm_found_posts, $alm_page, $alm_item);
436
+
437
+ endwhile; wp_reset_query();
 
438
  endif;
439
  $preloaded_output = '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
440
  $preloaded_output .= $output;
441
  $preloaded_output .= '</'.$container_element.'>';
442
 
443
+ $ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
444
  }
445
  // End Preload Posts
446
 
447
 
448
  $ajaxloadmore .= '<'.$container_element.' class="alm-listing alm-ajax'. $paging_container_class .' '. $classname . ' '. $css_classes .'"'; // Build ALM container
449
 
450
+
451
+ // Cache Add-on
452
  if(has_action('alm_cache_installed') && $cache === 'true'){
453
  $cache_return = apply_filters('alm_cache_shortcode', $cache, $cache_id, $options);
454
  $ajaxloadmore .= $cache_return;
455
  }
456
+
457
 
458
  // Paging Add-on
459
  if(has_action('alm_paging_installed') && $paging === 'true'){
461
  $ajaxloadmore .= $paging_return;
462
  }
463
 
464
+
465
  // Preloaded Add-on
466
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
467
  $ajaxloadmore .= ' data-preloaded="'.$preloaded.'"';
468
  $ajaxloadmore .= ' data-preloaded-amount="'.$preloaded_amount.'"';
469
  }
470
+
471
 
472
  // SEO Add-on
473
  if(has_action('alm_seo_installed') && $seo === 'true'){
474
  $seo_return = apply_filters('alm_seo_shortcode', $seo, $preloaded, $options);
475
  $ajaxloadmore .= $seo_return;
476
  }
477
+
478
+
479
+ // Previous Post Post Add-on
480
+ if(has_action('alm_prev_post_installed') && $previous_post){
481
+ $prev_post_return = apply_filters('alm_prev_post_shortcode', $previous_post_id, $options);
482
+ $ajaxloadmore .= $prev_post_return;
483
+ }
484
+
485
 
486
+ $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
487
+ if($theme_repeater != 'null') $ajaxloadmore .= ' data-theme-repeater="'.$theme_repeater.'"';
 
488
  $ajaxloadmore .= ' data-post-type="'.$post_type.'"';
489
  $ajaxloadmore .= ' data-post-format="'.$post_format.'"';
490
  $ajaxloadmore .= ' data-category="'.$category.'"';
498
  $ajaxloadmore .= ' data-meta-value="'.$meta_value.'"';
499
  $ajaxloadmore .= ' data-meta-compare="'.$meta_compare.'"';
500
  $ajaxloadmore .= ' data-meta-relation="'.$meta_relation.'"';
501
+ $ajaxloadmore .= ' data-meta-type="'.$meta_type.'"';
502
  $ajaxloadmore .= ' data-year="'.$year.'"';
503
  $ajaxloadmore .= ' data-month="'.$month.'"';
504
  $ajaxloadmore .= ' data-day="'.$day.'"';
516
  $ajaxloadmore .= ' data-scroll="'.$scroll.'"';
517
  $ajaxloadmore .= ' data-scroll-distance="'.$scroll_distance.'"';
518
  $ajaxloadmore .= ' data-max-pages="'.$max_pages.'"';
519
+ $ajaxloadmore .= ' data-pause-override="'.$pause_override.'"';
520
  $ajaxloadmore .= ' data-pause="'.$pause.'"';
521
  $ajaxloadmore .= ' data-button-label="'.$button_label.'"';
522
  $ajaxloadmore .= ' data-button-class="'.$button_classname.'"';
524
  $ajaxloadmore .= ' data-transition="'.$transition.'"';
525
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
526
 
527
+ $ajaxloadmore .= '>';
528
+
529
+
530
+ // Previous Post Add-on
531
+ // - Get first post and append to ajax load more object
532
+ if(has_action('alm_prev_post_installed') && $previous_post){
533
+ $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
534
+ $repeater_type = $repeater_type[0]; // (default | repeater | template_)
535
+ if($theme_repeater != 'null' && has_filter('alm_get_theme_repeater')){
536
+ $repeater_type = null;
537
+ }
538
+ // Get next post include and build the output from the next post filter
539
+ $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. get_permalink($previous_post_id) .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set teh post id .alm-reveal div
540
+ $previous_post_output .= apply_filters('alm_prev_post_inc', $repeater, $repeater_type, $theme_repeater, $previous_post_id, $post_type);
541
+ $previous_post_output .= '</div>';
542
+ $ajaxloadmore .= $previous_post_output; // Add $next_post_output data to $ajaxloadmore
543
+
544
+ }
545
+ // End Previous Post
546
+
547
 
548
+ $ajaxloadmore .= '</'.$container_element.'>';
 
549
 
550
+ // ALM Filter (alm_before_button)
551
+ $ajaxloadmore .= apply_filters('alm_before_button', '');
552
+
553
+ $ajaxloadmore .= '</div>';
554
+
555
+
556
+ // ALM Filter (alm_after_container)
557
+ $ajaxloadmore .= apply_filters('alm_after_container', '');
558
+
559
+ // End ALM object
560
  return $ajaxloadmore;
561
  }
562
 
622
  if($meta_compare == '') $meta_compare = 'IN';
623
  $meta_relation = $_GET['meta_relation'];
624
  if($meta_relation == '') $meta_relation = 'AND';
625
+ $meta_type = $_GET['meta_type'];
626
+ if($meta_type == '') $meta_type = 'CHAR';
627
 
628
  $s = (isset($_GET['search'])) ? $_GET['search'] : '';
629
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
644
  $numPosts = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
645
  $page = (isset($_GET['pageNumber'])) ? $_GET['pageNumber'] : 0;
646
 
647
+ // Preload Add-on
648
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
649
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
650
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
653
  $offset = $offset + $preloaded_amount;
654
  }
655
 
656
+ //Next Post Add-on
657
+ $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
658
+ $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
659
+
660
+ //SEO Add-on
661
  $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
662
 
663
  // Language (Is this needed?)
725
  $meta_keys = explode(":", $meta_key); // convert to array
726
  $meta_value = explode(":", $meta_value); // convert to array
727
  $meta_compare = explode(":", $meta_compare); // convert to array
728
+ $meta_type = explode(":", $meta_type); // convert to array
729
 
730
  if($total == 1){
731
  $args['meta_query'] = array(
732
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
733
  );
734
  }
735
  if($total == 2){
736
  $args['meta_query'] = array(
737
  'relation' => $meta_relation,
738
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
739
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
740
  );
741
  }
742
  if($total == 3){
743
  $args['meta_query'] = array(
744
  'relation' => $meta_relation,
745
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
746
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
747
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
748
  );
749
  }
750
  if($total == 4){
751
  $args['meta_query'] = array(
752
  'relation' => $meta_relation,
753
+ alm_get_meta_query($meta_keys[0], $meta_value[0], $meta_compare[0], $meta_type[0]),
754
+ alm_get_meta_query($meta_keys[1], $meta_value[1], $meta_compare[1], $meta_type[1]),
755
+ alm_get_meta_query($meta_keys[2], $meta_value[2], $meta_compare[2], $meta_type[2]),
756
+ alm_get_meta_query($meta_keys[3], $meta_value[3], $meta_compare[3], $meta_type[3]),
757
  );
758
  }
759
 
814
  $alm_page_count = 1;
815
  }else{
816
  $alm_page_count = $page + 1;
817
+ }
818
+
819
+
820
+ // Next Post Add-on
821
+ // Hijack $args and and return previous post only
822
+ if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
823
+ $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
824
+ }
825
+
826
 
827
  // WP_Query()
828
  $alm_query = new WP_Query( $args );
871
 
872
  endwhile; wp_reset_query();
873
 
874
+ // If cache is enabled and seo_start_page is 1 (meaning, a user has not requested /page/12/)
875
+ // - Only create cached files if the user visits pages in order 1, 2, 3 etc.
876
+
877
+ if(!empty($cache_id) && has_action('alm_cache_installed') && $seo_start_page == 1){
878
+ apply_filters('alm_cache_file', $cache_id, $page, $page_cache);
879
+ }
880
 
881
  endif;
882
 
core/functions.php CHANGED
@@ -223,11 +223,11 @@ function alm_get_tax_query($post_format, $taxonomy, $taxonomy_terms, $taxonomy_o
223
  * @return $args = array();
224
  * @since 2.5.0
225
  */
226
- function alm_get_meta_query($meta_key, $meta_value, $meta_compare){
227
  if(!empty($meta_key) && !empty($meta_value)){
228
 
229
  $meta_values = alm_parse_meta_value($meta_value, $meta_compare);
230
- $return = array('key' => $meta_key,'value' => $meta_values,'compare' => $meta_compare);
231
 
232
  return $return;
233
 
223
  * @return $args = array();
224
  * @since 2.5.0
225
  */
226
+ function alm_get_meta_query($meta_key, $meta_value, $meta_compare, $meta_type){
227
  if(!empty($meta_key) && !empty($meta_value)){
228
 
229
  $meta_values = alm_parse_meta_value($meta_value, $meta_compare);
230
+ $return = array('key' => $meta_key,'value' => $meta_values,'compare' => $meta_compare,'type' => $meta_type);
231
 
232
  return $return;
233
 
core/js/ajax-load-more.js CHANGED
@@ -15,13 +15,14 @@
15
  (function ($) {
16
  "use strict";
17
 
18
- $.ajaxloadmore = function (el) {
 
 
19
 
20
  //Prevent loading of unnessasry posts - move user to top of page
21
  if(alm_localize.scrolltop === 'true'){
22
  $(window).scrollTop(0);
23
  }
24
-
25
  //Set variables
26
  var alm = this;
27
  alm.AjaxLoadMore = {};
@@ -36,8 +37,10 @@
36
  alm.button_label = '';
37
  alm.data;
38
  alm.el = el;
39
- alm.content = $('.alm-listing.alm-ajax', alm.el);
40
- alm.content_preloaded = $('.alm-listing.alm-preloaded', alm.el);
 
 
41
  alm.prefix = 'alm-';
42
 
43
  alm.cache = alm.content.attr('data-cache'); // cache (true/false)
@@ -49,7 +52,8 @@
49
 
50
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
51
  alm.max_pages = parseInt(alm.content.attr('data-max-pages'));
52
- alm.pause = alm.content.attr('data-pause'); // true | false
 
53
  alm.transition = alm.content.attr('data-transition');
54
  alm.images_loaded = alm.content.attr('data-images-loaded');
55
  alm.destroy_after = alm.content.attr('data-destroy-after');
@@ -57,6 +61,9 @@
57
  alm.orginal_posts_per_page = alm.content.attr('data-posts-per-page'); // Used for paging add-on
58
  alm.posts_per_page = alm.content.attr('data-posts-per-page');
59
 
 
 
 
60
  alm.seo = alm.content.attr('data-seo'); // true | false
61
 
62
  alm.preloaded = alm.content.attr('data-preloaded'); // true | false
@@ -151,6 +158,29 @@
151
  alm.start_page = 1;
152
  }
153
  /* /end SEO */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
 
156
  /* Define offset */
@@ -248,15 +278,17 @@
248
 
249
 
250
  /* Append 'load More' button to .ajax-load-more-wrap */
251
- alm.el.append('<div class="' + alm.prefix + 'btn-wrap"/>');
252
- alm.btnWrap = $('.' + alm.prefix + 'btn-wrap', alm.el);
253
- if(!alm.paging){
254
- // If paging is false
255
- $('.'+ alm.prefix + 'btn-wrap', alm.el).append('<button id="load-more" class="' + alm.prefix + 'load-more-btn more'+ alm.button_class +'">' + alm.button_label + '</button>');
256
- alm.button = $('.alm-load-more-btn', alm.el);
257
- }else{
258
- // Paging add-on
259
  alm.content.parent().addClass('loading'); // add loading class to main container
 
 
 
 
 
 
260
  }
261
 
262
 
@@ -273,11 +305,10 @@
273
  if(!alm.paging){
274
  alm.button.addClass('loading');
275
  }
276
- alm.loading = true;
277
 
278
  // If cache = true && cache_logged_in setting is false
279
  if(alm.cache === 'true' && !alm.cache_logged_in){
280
-
281
  if(alm.init && alm.seo && alm.isPaged){
282
 
283
  // if alm.init = true, SEO = true and SEO page > 1
@@ -285,20 +316,14 @@
285
  alm.AjaxLoadMore.ajax('standard');
286
 
287
  } else {
288
- // Build and/or get cache
289
-
290
  var cachePage = alm.cache_path + '/page-' + alm.page +'.html';
291
 
292
  $.get(cachePage, function( data ) {
293
-
294
- alm.AjaxLoadMore.success(data); // data contains whatever the request has returned
295
-
296
  }).fail(function() {
297
-
298
- alm.AjaxLoadMore.ajax('standard');
299
-
300
  });
301
-
302
  }
303
 
304
  } else { // Standard ALM query
@@ -319,6 +344,11 @@
319
  */
320
 
321
  alm.AjaxLoadMore.ajax = function (queryType) {
 
 
 
 
 
322
  $.ajax({
323
  type: "GET",
324
  url: alm_localize.ajaxurl,
@@ -342,6 +372,7 @@
342
  meta_value: alm.content.attr('data-meta-value'),
343
  meta_compare: alm.content.attr('data-meta-compare'),
344
  meta_relation: alm.content.attr('data-meta-relation'),
 
345
  author: alm.content.attr('data-author'),
346
  year: alm.content.attr('data-year'),
347
  month: alm.content.attr('data-month'),
@@ -359,6 +390,8 @@
359
  preloaded: alm.preloaded,
360
  preloaded_amount: alm.preloaded_amount,
361
  seo_start_page: alm.start_page,
 
 
362
  lang: alm.lang
363
  },
364
  dataType: "html",
@@ -376,7 +409,8 @@
376
  if($.isFunction($.fn.almBuildPagination)){
377
  $.fn.almBuildPagination(data, alm);
378
  }
379
- }
 
380
  },
381
  error: function (jqXHR, textStatus, errorThrown) {
382
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
@@ -399,12 +433,20 @@
399
 
400
  alm.AjaxLoadMore.success = function (data) {
401