WordPress Infinite Scroll – Ajax Load More - Version 2.14.0

Version Description

  • February 14, 2016 =

  • NEW - Adding functionality for Next Page add-on (https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/).

  • NEW - Added support for SEO add-on to be integrated with default WP search page.

  • NEW - Added support for Paging + Preloaded + SEO to be used on a single instance.

  • NEW - Added functions for triggering callbacks to various addons on load complete.

  • UPDATE - Various UI tweaks

  • UPDATE - Improving core JS functions and methods

Download this release

Release Info

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

Code changes from version 2.13.1 to 2.14.0

README.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Ajax Load More - Infinite Scroll ===
2
  Contributors: dcooney
3
  Donate link: https://connekthq.com/donate/
4
- Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce
5
  Requires at least: 3.6
6
- Tested up to: 4.7.1
7
- Stable tag: 2.13.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -33,15 +33,16 @@ Check out the **[demo site](https://connekthq.com/plugins/ajax-load-more/)** for
33
  ***
34
 
35
  = Content Types =
36
- Ajax Load More can infinite scroll any content type WordPress offers - from blog posts to WooCommerce products Ajax Load More can handle it.
37
 
38
  Check out the examples below:
39
 
40
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
41
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
42
  * [Pages](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)
 
43
  * [Single Posts](https://connekthq.com/ajax-load-more-posts/alm-post-example/) **
44
- * [Comments](http://comments.connekthq.com/example-post/) **
45
 
46
  ** Add-on required
47
 
@@ -130,11 +131,11 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
130
  ***
131
 
132
  = Add-ons =
133
- The following Add-ons are available to increase the functionality of Ajax Load More.
134
 
135
  > #### Cache
136
- > The **[Cache](https://connekthq.com/plugins/ajax-load-more/cache/)** add-oncreates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
137
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/cache/)
138
  >
139
  > #### Call to Actions
140
  > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.<br />
@@ -145,37 +146,54 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
145
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
146
  >
147
  > #### Custom Repeaters
148
- > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.<br />
149
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/custom-repeaters/)
150
  >
151
  > #### Layouts
152
- > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.<br />
153
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/layouts/)
 
 
 
 
154
  >
155
  > #### Paging
156
- > The **[Paging](https://connekthq.com/plugins/ajax-load-more/paging/)** add-on will transform Ajax Load More’s lazy load/infinite scroll functionality into a robust ajax powered navigation system.<br />
157
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/paging/)
158
  >
159
  > #### Preloaded
160
- > The **[Preloaded](https://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 />
161
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/preloaded/)
162
  >
163
  > #### Previous Post
164
- > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
165
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/previous-post/)
166
- >
167
- > #### REST API
168
- > The **[REST API](https://connekthq.com/plugins/ajax-load-more/rest-api/)** add-on will enable compatibility between Ajax Load More and the WP REST API plugin.<br />
169
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/rest-api/)
170
  >
171
  > #### Search Engine Optimization
172
- > The **[SEO](https://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 />
173
- > [Get More Information](https://connekthq.com/plugins/ajax-load-more/seo/)
174
  >
175
  > #### Theme Repeaters
176
  > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.<br />
177
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  ***
180
 
181
  = Callback Functions =
@@ -329,6 +347,15 @@ How to install Ajax Load More.
329
 
330
  == Changelog ==
331
 
 
 
 
 
 
 
 
 
 
332
 
333
  = 2.13.1 - December 5, 2016 =
334
 
@@ -346,13 +373,13 @@ How to install Ajax Load More.
346
  * FIX - Support for preserving querystring parameters in Previous Post add-on.
347
 
348
 
349
-
350
  = 2.13.0.1 - November 10, 2016 =
351
 
352
  * FIX - almEmpty() callback function not firing because of updated return value of empty query.
353
  * FIX - almdebug() filter causing 'Missing argument 2 for apply_filters()' error for some users.
354
  * FIX - Shortcode builder UI heading update.
355
 
 
356
  = 2.13.0 - November 6, 2016 =
357
 
358
  * NEW - ID shortcode parameter. Assigning a unique ID to an Ajax Load More instance will allow for filters to be run more easily.
1
  === Ajax Load More - Infinite Scroll ===
2
  Contributors: dcooney
3
  Donate link: https://connekthq.com/donate/
4
+ Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, pagination, ajax pagination, ajax, ajax posts, ajax load posts, search, tags, category, post types, taxonomy, meta_query, woocommerce, ajax load more
5
  Requires at least: 3.6
6
+ Tested up to: 4.7.3
7
+ Stable tag: 2.14.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
33
  ***
34
 
35
  = Content Types =
36
+ Ajax Load More can infinite scroll any content type WordPress offers - from blog posts to multipage content to WooCommerce products - Ajax Load More can handle it all.
37
 
38
  Check out the examples below:
39
 
40
  * [Standard Posts](https://connekthq.com/plugins/ajax-load-more/examples/default/)
41
  * [Custom Post Types](https://connekthq.com/plugins/ajax-load-more/examples/masonry/)
42
  * [Pages](https://connekthq.com/plugins/ajax-load-more/examples/search-results/)
43
+ * [Multipage Posts & Pages](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/next-page-default/) **
44
  * [Single Posts](https://connekthq.com/ajax-load-more-posts/alm-post-example/) **
45
+ * [Comments](http://examples.connekthq.com/alm-comments/example-post/) **
46
 
47
  ** Add-on required
48
 
131
  ***
132
 
133
  = Add-ons =
134
+ The following [add-ons](https://connekthq.com/plugins/ajax-load-more/add-ons/) are available to increase the functionality of Ajax Load More.
135
 
136
  > #### Cache
137
+ > The **[Cache](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)** add-oncreates static HTML files of Ajax Load More requests then serves those static pages to your visitors without querying the database.<br />
138
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/cache/)
139
  >
140
  > #### Call to Actions
141
  > The **[Call to Actions](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)** add-on will provide functionality to inject a custom CTA template within an Ajax Load More query.<br />
146
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
147
  >
148
  > #### Custom Repeaters
149
+ > The **[Custom Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)** add-on will allow for **unlimited repeater templates** and provide the ability to create unique templates for different content types throughout your theme.<br />
150
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/)
151
  >
152
  > #### Layouts
153
+ > The **[Layouts](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)** add-on will provide a library of fully responsive layout templates ready for use on your website.<br />
154
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/)
155
+ >
156
+ > #### Next Page
157
+ > The **[Next Page](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)** add-on Load and display paginated WordPress content on demand using the `<!–-nextpage–->` Quicktag.<br />
158
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)
159
  >
160
  > #### Paging
161
+ > The **[Paging](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)** add-on will transform Ajax Load More’s lazy load/infinite scroll functionality into a robust ajax powered navigation system.<br />
162
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)
163
  >
164
  > #### Preloaded
165
+ > The **[Preloaded](https://connekthq.com/plugins/ajax-load-more/add-ons/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 />
166
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)
167
  >
168
  > #### Previous Post
169
+ > The **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)** add-on will allow you to navigate single posts with Ajax Load More.<br />
170
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)
 
 
 
 
171
  >
172
  > #### Search Engine Optimization
173
+ > The **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)** 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 />
174
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)
175
  >
176
  > #### Theme Repeaters
177
  > The **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)** add-on will allow you load, edit and maintain templates from your current theme directory.<br />
178
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)
179
 
180
+
181
+ ***
182
+
183
+ = Extensions =
184
+ The following [extensions](https://connekthq.com/plugins/ajax-load-more/extensions/) are available to provide compatibility with popular WordPress plugins and core features.
185
+
186
+ > #### Relvanssi
187
+ > The **[Relevanssi](https://connekthq.com/plugins/ajax-load-more/extensions/relevanssi/)** extension provides the functionality for returning Relevanssi query results to Ajax Load More.
188
+ >
189
+ > #### REST API
190
+ > The **[REST API](https://connekthq.com/plugins/ajax-load-more/extensions/rest-api/)** extension will enable compatibility between Ajax Load More and the WordPress REST API.
191
+ >
192
+ > #### SearchWP
193
+ > The **[SearchWP](https://connekthq.com/plugins/ajax-load-more/extensions/searchwp/)** extension provides the functionality for returning SearchWP query results to Ajax Load More.
194
+ >
195
+
196
+
197
  ***
198
 
199
  = Callback Functions =
347
 
348
  == Changelog ==
349
 
350
+ = 2.14.0 - February 14, 2016 =
351
+
352
+ * NEW - Adding functionality for Next Page add-on (https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/).
353
+ * NEW - Added support for SEO add-on to be integrated with default WP search page.
354
+ * NEW - Added support for Paging + Preloaded + SEO to be used on a single instance.
355
+ * NEW - Added functions for triggering callbacks to various addons on load complete.
356
+ * UPDATE - Various UI tweaks
357
+ * UPDATE - Improving core JS functions and methods
358
+
359
 
360
  = 2.13.1 - December 5, 2016 =
361
 
373
  * FIX - Support for preserving querystring parameters in Previous Post add-on.
374
 
375
 
 
376
  = 2.13.0.1 - November 10, 2016 =
377
 
378
  * FIX - almEmpty() callback function not firing because of updated return value of empty query.
379
  * FIX - almdebug() filter causing 'Missing argument 2 for apply_filters()' error for some users.
380
  * FIX - Shortcode builder UI heading update.
381
 
382
+
383
  = 2.13.0 - November 6, 2016 =
384
 
385
  * NEW - ID shortcode parameter. Assigning a unique ID to an Ajax Load More instance will allow for filters to be run more easily.
admin/admin-functions.php CHANGED
@@ -28,7 +28,7 @@ function alm_is_admin_screen(){
28
  */
29
 
30
  function alm_has_addon(){
31
- if(has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) {
32
  return true;
33
  } else {
34
  return false;
28
  */
29
 
30
  function alm_has_addon(){
31
+ if(has_action('alm_cache_installed') || has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed')) {
32
  return true;
33
  } else {
34
  return false;
admin/admin.php CHANGED
@@ -430,7 +430,9 @@ function alm_admin_menu() {
430
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
431
  add_action( 'load-' . $alm_examples_page, 'alm_set_admin_nonce' );
432
  add_action( 'load-' . $alm_help_page, 'alm_load_admin_js' );
 
433
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
 
434
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
435
  add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
436
  }
@@ -448,7 +450,9 @@ function alm_load_admin_js(){
448
  add_action( 'admin_enqueue_scripts', 'alm_enqueue_admin_scripts' );
449
  }
450
  function alm_load_cache_admin_js(){
451
- add_action( 'admin_enqueue_scripts', 'alm_enqueue_cache_admin_scripts' );
 
 
452
  }
453
 
454
 
@@ -497,9 +501,6 @@ function alm_enqueue_admin_scripts(){
497
  wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ));
498
  }
499
 
500
- function alm_enqueue_cache_admin_scripts(){
501
- wp_enqueue_script( 'alm-cache-admin', ALM_CACHE_URL. '/js/alm-cache.js', array( 'jquery' ));
502
- }
503
 
504
 
505
 
430
  add_action( 'load-' . $alm_examples_page, 'alm_load_admin_js' );
431
  add_action( 'load-' . $alm_examples_page, 'alm_set_admin_nonce' );
432
  add_action( 'load-' . $alm_help_page, 'alm_load_admin_js' );
433
+ add_action( 'load-' . $alm_help_page, 'alm_set_admin_nonce' );
434
  add_action( 'load-' . $alm_addons_page, 'alm_load_admin_js' );
435
+ add_action( 'load-' . $alm_addons_page, 'alm_set_admin_nonce' );
436
  add_action( 'load-' . $alm_licenses_page, 'alm_load_admin_js' );
437
  add_action( 'load-' . $alm_licenses_page, 'alm_set_admin_nonce' );
438
  }
450
  add_action( 'admin_enqueue_scripts', 'alm_enqueue_admin_scripts' );
451
  }
452
  function alm_load_cache_admin_js(){
453
+ if(class_exists('ALMCache')){
454
+ ALMCache::alm_enqueue_cache_admin_scripts();
455
+ }
456
  }
457
 
458
 
501
  wp_enqueue_script( 'alm-shortcode-builder', ALM_ADMIN_URL. 'shortcode-builder/js/shortcode-builder.js', array( 'jquery' ));
502
  }
503
 
 
 
 
504
 
505
 
506
 
admin/css/admin.css CHANGED
@@ -123,20 +123,22 @@
123
  min-width: 48%;
124
  display: inline-block;
125
  vertical-align: top;
126
- }
127
-
128
 
129
  #alm-settings form h2{
130
- padding: 2px 0 6px 12px;
131
- border-left: 5px solid #ff5a58;
132
  margin: 0;
 
 
133
  }
134
  #alm-settings form h2 + p{
135
  color: #999;
136
- padding: 0 0 0 12px;
137
- border-left: 5px solid #ff5a58;
138
  margin: 0 0 24px;
139
  font-size: 14px;
 
140
  }
141
  .ajax-load-more code{
142
  background: #fcf3d0;
@@ -708,7 +710,7 @@ a.layout-hover{
708
 
709
  .ajax-load-more .row{
710
  padding: 0 !important;
711
- margin: 10px 0 0;
712
  height: auto;
713
  width: 100%;
714
  display: block;
@@ -824,11 +826,16 @@ a.layout-hover{
824
  font-size: 15px;
825
  margin-bottom: 13px;
826
  }
827
- .ajax-load-more .section-title p{
 
828
  font-size: 13px;
829
  line-height: 20px;
830
  color: #999;
831
  }
 
 
 
 
832
  .ajax-load-more .section-title p .fa.tooltip,
833
  .form-table label .fa.tooltip{
834
  margin: 0 2px;
@@ -886,7 +893,8 @@ a.layout-hover{
886
  .cache_id,
887
  .alternate_template_wrap,
888
  .cta_template_wrap,
889
- .restapi_options{
 
890
  display: none;
891
  }
892
 
@@ -1100,17 +1108,17 @@ a.layout-hover{
1100
 
1101
  .form-table .template-tags{
1102
  overflow: hidden;
1103
- border: 1px solid #eeeddf;
1104
- padding: 6px 10px;
1105
- background: #faf9ee;
1106
  margin: 10px 0 0;
1107
- border-radius: 3px;
1108
  }
1109
  .form-table .template-tags h4,
1110
  .form-table .template-tags li{
1111
  margin: 0 0 8px;
1112
  padding:0;
1113
- font-size: 14px;
1114
  }
1115
  .form-table .template-tags li{
1116
  margin: 2px 0;
@@ -1192,13 +1200,12 @@ a.layout-hover{
1192
  /* Table Overrides */
1193
  .admin.ajax-load-more.settings .form-table td,
1194
  .admin.ajax-load-more.settings .form-table th{
1195
- padding: 20px 0 16px;
1196
  line-height: 1.5;
1197
  }
1198
  .admin.ajax-load-more.settings .form-table th{
1199
  padding-left: 17px;
1200
  }
1201
-
1202
  .admin.ajax-load-more.settings .form-table p{
1203
  margin-top: 0;
1204
  }
@@ -1209,7 +1216,6 @@ a.layout-hover{
1209
  overflow: hidden;
1210
  color: #999;
1211
  }
1212
-
1213
  .header-wrap{
1214
  overflow: hidden;
1215
  padding: 10px 0 3px;
@@ -1401,11 +1407,6 @@ table.highlight{
1401
  -webkit-border-radius: 3px;
1402
  -moz-border-radius: 3px;
1403
  border-radius: 3px;
1404
- /*
1405
- -webkit-box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
1406
- -moz-box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
1407
- box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
1408
- */
1409
  }
1410
  .ajax-load-more .cnkt-main.full{
1411
  width: 100%;
@@ -1787,8 +1788,8 @@ table.highlight{
1787
  }
1788
  .license-key-field .status{
1789
  position: absolute;
1790
- right:5px;
1791
- top: 5px;
1792
  display: inline-block;
1793
  border-radius: 2px;
1794
  padding: 6px 12px;
@@ -1839,7 +1840,7 @@ table.highlight{
1839
  background: #fff;
1840
  padding: 20px;
1841
  margin: 0 0 20px;
1842
- overflow: hidden;
1843
  position: relative;
1844
  }
1845
  .ajax-load-more .cnkt-sidebar .cta.mailing-list{
@@ -1876,7 +1877,7 @@ table.highlight{
1876
  font-size: 14px;
1877
  }
1878
  .ajax-load-more .cnkt-sidebar .cta.dyk p{
1879
- margin: 5px 0;
1880
  display: block;
1881
  overflow: hidden;
1882
  }
@@ -1888,7 +1889,7 @@ table.highlight{
1888
  .ajax-load-more .cnkt-sidebar li{
1889
  font-size: 14px;
1890
  margin: 0 0 10px;
1891
- line-height: 1.4;
1892
  }
1893
 
1894
  .ajax-load-more .cnkt-sidebar .cta.resources li{
@@ -2553,7 +2554,7 @@ p.cache-stats{
2553
  .ajax-load-more .form-table input[type=radio] + label{
2554
  background: #fff url('../img/bkg-chkbox_off.png') no-repeat left 1px;
2555
  height: auto;
2556
- min-height: 20px;
2557
  width: 100%;
2558
  display:inline-block;
2559
  padding: 1px 0 0 30px;
@@ -3438,6 +3439,12 @@ ul.share li.facebook a:hover{
3438
  float: none;
3439
  padding: 10px;
3440
  }
 
 
 
 
 
 
3441
  .ajax-load-more input[type=text],
3442
  .ajax-load-more input[type=number],
3443
  .select2-container,
123
  min-width: 48%;
124
  display: inline-block;
125
  vertical-align: top;
126
+ }
 
127
 
128
  #alm-settings form h2{
129
+ padding: 12px 0 6px 12px;
130
+ border-left: 7px solid #ff5a58;
131
  margin: 0;
132
+ font-weight: 600;
133
+ font-size: 1.35em;
134
  }
135
  #alm-settings form h2 + p{
136
  color: #999;
137
+ padding: 0 0 10px 12px;
138
+ border-left: 7px solid #ff5a58;
139
  margin: 0 0 24px;
140
  font-size: 14px;
141
+ font-style: italic;
142
  }
143
  .ajax-load-more code{
144
  background: #fcf3d0;
710
 
711
  .ajax-load-more .row{
712
  padding: 0 !important;
713
+ margin: 15px 0 0;
714
  height: auto;
715
  width: 100%;
716
  display: block;
826
  font-size: 15px;
827
  margin-bottom: 13px;
828
  }
829
+ .ajax-load-more .section-title p,
830
+ .ajax-load-more .wrap p.descriptor{
831
  font-size: 13px;
832
  line-height: 20px;
833
  color: #999;
834
  }
835
+ .ajax-load-more .wrap p.descriptor{
836
+ margin: 0;
837
+ font-style: italic;
838
+ }
839
  .ajax-load-more .section-title p .fa.tooltip,
840
  .form-table label .fa.tooltip{
841
  margin: 0 2px;
893
  .cache_id,
894
  .alternate_template_wrap,
895
  .cta_template_wrap,
896
+ .restapi_options,
897
+ .next-page-content{
898
  display: none;
899
  }
900
 
1108
 
1109
  .form-table .template-tags{
1110
  overflow: hidden;
1111
+ border: 1px solid #dfd8c2;;
1112
+ padding: 15px;
1113
+ background: #fff9ea;
1114
  margin: 10px 0 0;
1115
+ border-radius: 2px;
1116
  }
1117
  .form-table .template-tags h4,
1118
  .form-table .template-tags li{
1119
  margin: 0 0 8px;
1120
  padding:0;
1121
+ font-size: 13px;
1122
  }
1123
  .form-table .template-tags li{
1124
  margin: 2px 0;
1200
  /* Table Overrides */
1201
  .admin.ajax-load-more.settings .form-table td,
1202
  .admin.ajax-load-more.settings .form-table th{
1203
+ padding: 24px 0 20px;
1204
  line-height: 1.5;
1205
  }
1206
  .admin.ajax-load-more.settings .form-table th{
1207
  padding-left: 17px;
1208
  }
 
1209
  .admin.ajax-load-more.settings .form-table p{
1210
  margin-top: 0;
1211
  }
1216
  overflow: hidden;
1217
  color: #999;
1218
  }
 
1219
  .header-wrap{
1220
  overflow: hidden;
1221
  padding: 10px 0 3px;
1407
  -webkit-border-radius: 3px;
1408
  -moz-border-radius: 3px;
1409
  border-radius: 3px;
 
 
 
 
 
1410
  }
1411
  .ajax-load-more .cnkt-main.full{
1412
  width: 100%;
1788
  }
1789
  .license-key-field .status{
1790
  position: absolute;
1791
+ right:9px;
1792
+ top: 9px;
1793
  display: inline-block;
1794
  border-radius: 2px;
1795
  padding: 6px 12px;
1840
  background: #fff;
1841
  padding: 20px;
1842
  margin: 0 0 20px;
1843
+ overflow: visible;
1844
  position: relative;
1845
  }
1846
  .ajax-load-more .cnkt-sidebar .cta.mailing-list{
1877
  font-size: 14px;
1878
  }
1879
  .ajax-load-more .cnkt-sidebar .cta.dyk p{
1880
+ margin: 15px 0 0;
1881
  display: block;
1882
  overflow: hidden;
1883
  }
1889
  .ajax-load-more .cnkt-sidebar li{
1890
  font-size: 14px;
1891
  margin: 0 0 10px;
1892
+ line-height: 1.5;
1893
  }
1894
 
1895
  .ajax-load-more .cnkt-sidebar .cta.resources li{
2554
  .ajax-load-more .form-table input[type=radio] + label{
2555
  background: #fff url('../img/bkg-chkbox_off.png') no-repeat left 1px;
2556
  height: auto;
2557
+ min-height: 22px;
2558
  width: 100%;
2559
  display:inline-block;
2560
  padding: 1px 0 0 30px;
3439
  float: none;
3440
  padding: 10px;
3441
  }
3442
+ .ajax-load-more .section-title{
3443
+ padding: 20px 20px 10px;
3444
+ }
3445
+ .ajax-load-more .row .wrap{
3446
+ padding: 10px 20px;
3447
+ }
3448
  .ajax-load-more input[type=text],
3449
  .ajax-load-more input[type=number],
3450
  .select2-container,
admin/css/select2.css CHANGED
@@ -212,7 +212,7 @@
212
 
213
  /* results UL */
214
  .select2-results {
215
- max-height: 200px;
216
  padding: 0 0 0 0;
217
  margin: 0 0 0 0;
218
  position: relative;
212
 
213
  /* results UL */
214
  .select2-results {
215
+ max-height: 311px;
216
  padding: 0 0 0 0;
217
  margin: 0 0 0 0;
218
  position: relative;
admin/img/add-ons/next-page-add-on.jpg ADDED
Binary file
admin/includes/cta/dyk.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="cta dyk">
2
  <h3><?php _e('Did You Know?', 'ajax-load-more'); ?></h3>
3
  <?php
4
- $random = rand(1, 4);
5
  ?>
6
  <?php if($random == 1){ ?>
7
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
@@ -30,4 +30,11 @@
30
  <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments">Learn More &raquo;</a></p>
31
  <?php } ?>
32
 
 
 
 
 
 
 
 
33
  </div>
1
  <div class="cta dyk">
2
  <h3><?php _e('Did You Know?', 'ajax-load-more'); ?></h3>
3
  <?php
4
+ $random = rand(1, 5);
5
  ?>
6
  <?php if($random == 1){ ?>
7
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/shortcode-editor.jpg"><br/>
30
  <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Comments">Learn More &raquo;</a></p>
31
  <?php } ?>
32
 
33
+ <?php if($random == 5){ ?>
34
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg"><br/>
35
+ <p class="addon-intro">You can infinite scroll just about anything with the Next Page add-on!</p>
36
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page">Next Page</a> add-on will allow you to split post content into pages using the <span style="display: inline-block; font-style: italic; color: #999;">&lt;!--nextpage--&gt;</span> <a href="https://codex.wordpress.org/Write_Post_SubPanel#Quicktags" target="_blank">Quicktag</a> and load the generated pages on demand.</p>
37
+ <p><a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=Next Page">Learn More &raquo;</a></p>
38
+ <?php } ?>
39
+
40
  </div>
admin/includes/cta/resources.php CHANGED
@@ -2,9 +2,10 @@
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
  <ul>
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
 
5
  <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support and Issues', 'ajax-load-more'); ?></a></li>
6
- <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
7
  <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
 
8
  <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
9
  <li><a target="blank" href="https://github.com/dcooney/wordpress-ajax-load-more"><i class="fa fa-github"></i> <?php _e('Github', 'ajax-load-more'); ?></a></li>
10
  </ul>
2
  <h3><?php _e('Resources', 'ajax-load-more'); ?></h3>
3
  <ul>
4
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/"><i class="fa fa-mouse-pointer"></i> <?php _e('Ajax Load More Demo Site', 'ajax-load-more'); ?></a></li>
5
+ <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/docs/"><i class="fa fa-pencil"></i> <?php _e('Documentation', 'ajax-load-more'); ?></a></li>
6
  <li><a target="blank" href="http://wordpress.org/support/plugin/ajax-load-more"><i class="fa fa-question-circle"></i> <?php _e('Plugin Support and Issues', 'ajax-load-more'); ?></a></li>
 
7
  <li><a target="blank" href="https://wordpress.org/support/view/plugin-reviews/ajax-load-more"><i class="fa fa-star"></i> <?php _e('Reviews', 'ajax-load-more'); ?></a></li>
8
+ <li><a target="blank" href="http://twitter.com/ajaxloadmore"><i class="fa fa-twitter"></i> <?php _e('Twitter', 'ajax-load-more'); ?></a></li>
9
  <li><a target="blank" href="http://facebook.com/ajaxloadmore"><i class="fa fa-facebook"></i> <?php _e('Facebook', 'ajax-load-more'); ?></a></li>
10
  <li><a target="blank" href="https://github.com/dcooney/wordpress-ajax-load-more"><i class="fa fa-github"></i> <?php _e('Github', 'ajax-load-more'); ?></a></li>
11
  </ul>
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -279,6 +279,43 @@ jQuery(document).ready(function($) {
279
  }else{
280
  $('.comments_extras').slideUp(100, 'alm_easeInOutQuad');
281
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
 
283
 
284
 
279
  }else{
280
  $('.comments_extras').slideUp(100, 'alm_easeInOutQuad');
281
  }
282
+
283
+
284
+
285
+ // ---------------------------
286
+ // - Next Page
287
+ // ---------------------------
288
+
289
+ var nextpage = $('.next-page input[name=next-page]:checked').val();
290
+ if(nextpage !== 'false' && nextpage != undefined){
291
+
292
+ var nextpage_post_id = $('#next-page_post_id').val(),
293
+ nextpage_url = $('input#next-page-url:checked').val(),
294
+ nextpage_pageviews = $('input#next-page-pageviews:checked').val(),
295
+ nextpage_scrollspeed = $('input#next-page-scroll-speed').val(),
296
+ nextpage_scrolltop = $('input#next-page-scroll-top').val();
297
+
298
+ $('.next-page-content').slideDown(100, 'alm_easeInOutQuad');
299
+
300
+ output += ' nextpage="'+nextpage+'"';
301
+ output += ' nextpage_post_id="\'.'+nextpage_post_id+'.\'"';
302
+
303
+ if(nextpage_url !== 'true'){
304
+ output += ' nextpage_urls="false"';
305
+ }
306
+ if(nextpage_pageviews !== 'true'){
307
+ output += ' nextpage_pageviews="false"';
308
+ }
309
+
310
+ if(!nextpage_scrollspeed.length) nextpage_scrollspeed = 250;
311
+ if(!nextpage_scrolltop.length) nextpage_scrollspeed = 30;
312
+
313
+ output += ' nextpage_scroll="'+ nextpage_scrollspeed +':'+ nextpage_scrolltop +'"';
314
+
315
+
316
+ }else{
317
+ $('.next-page-content').slideUp(100, 'alm_easeInOutQuad');
318
+ }
319
 
320
 
321
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -304,6 +304,124 @@
304
  <?php } ?>
305
 
306
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
307
  <?php if(has_action('alm_paging_installed')){ ?>
308
  <!-- PAGING -->
309
  <div class="row input paging add-on" id="alm-paging">
@@ -980,7 +1098,7 @@
980
  <ul>
981
  <li style="width:100%;">
982
  <input class="alm_element" type="checkbox" name="remove_container" id="remove_container" value="f">
983
- <label for="remove_container">Remove Container</label>
984
  </li>
985
  </ul>
986
  </div>
304
  <?php } ?>
305
 
306
 
307
+ <?php if(has_action('alm_nextpage_installed')){ ?>
308
+ <!-- NEXT PAGE -->
309
+ <div class="row input next-page add-on" id="alm-next-page">
310
+ <h3 class="heading"><?php _e('Next Page', 'ajax-load-more'); ?></h3>
311
+ <div class="expand-wrap">
312
+ <div class="section-title">
313
+ <p><?php _e('Enable the infinite scrolling of multipage WordPress content using the', 'ajax-load-more'); ?> <span>< !--nextpage-- ></span> <?php _e('Quicktag', 'ajax-load-more'); ?>.</p>
314
+ </div>
315
+ <div class="wrap">
316
+ <div class="inner">
317
+ <ul>
318
+ <li>
319
+ <input class="alm_element" type="radio" name="next-page" value="true" id="next-page-true" >
320
+ <label for="next-page-true"><?php _e('True', 'ajax-load-more'); ?></label>
321
+ </li>
322
+ <li>
323
+ <input class="alm_element" type="radio" name="next-page" value="false" id="next-page-false" checked="checked">
324
+ <label for="next-page-false"><?php _e('False', 'ajax-load-more'); ?></label>
325
+ </li>
326
+ </ul>
327
+ </div>
328
+ </div>
329
+
330
+ <div class="clear"></div>
331
+
332
+ <div class="next-page-content" style="display: none;">
333
+
334
+ <div class="clear"></div>
335
+ <hr>
336
+ <div class="section-title">
337
+ <h4><?php _e('Post ID', 'ajax-load-more'); ?></h4>
338
+ <p><?php _e('The ID of the current page/post.', 'ajax-load-more'); ?></p>
339
+ </div>
340
+ <div class="wrap">
341
+ <div class="inner">
342
+ <input type="text" value="get_the_ID()" id="next-page_post_id" class="alm_element disabled-input" disabled="disabled">
343
+ </div>
344
+ </div>
345
+
346
+ <div class="clear"></div>
347
+ <hr/>
348
+
349
+ <div class="section-title">
350
+ <h4><?php _e('URL Rewrite', 'ajax-load-more'); ?></h4>
351
+ <p><?php _e('Update the browser address bar as pages come into view', 'ajax-load-more'); ?>.</p>
352
+ </div>
353
+ <div class="wrap">
354
+ <div class="inner">
355
+ <ul>
356
+ <li style="width:100%;">
357
+ <input class="alm_element" type="checkbox" name="next-page-url" id="next-page-url" value="true" checked="checked">
358
+ <label for="next-page-url"><?php _e('Yes, update the URL', 'ajax-load-more'); ?>.</label>
359
+ </li>
360
+ </ul>
361
+ <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
362
+ </div>
363
+ </div>
364
+
365
+ <div class="clear"></div>
366
+ <hr/>
367
+
368
+ <div class="section-title">
369
+ <h4>
370
+ <?php _e('Google Analytics', 'ajax-load-more'); ?>
371
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('You must have a reference to your Google Analytics tracking code already on the page','ajax-load-more'); ?>"></a>
372
+ </h4>
373
+ <p><?php _e('Each time a page is loaded it will count as a pageview', 'ajax-load-more'); ?>.</p>
374
+ </div>
375
+ <div class="wrap">
376
+ <div class="inner">
377
+ <ul>
378
+ <li style="width:100%;">
379
+ <input class="alm_element" type="checkbox" name="next-page-pageviews" id="next-page-pageviews" value="true" checked="checked">
380
+ <label for="next-page-pageviews"><?php _e('Yes, send pageviews to Google Analytics', 'ajax-load-more'); ?>.</label>
381
+ </li>
382
+ </ul>
383
+ <input type="checkbox" class="alm_element" name="next-page-url" id="next-page-url" checked="checked">
384
+ </div>
385
+ </div>
386
+
387
+ <div class="clear"></div>
388
+ <hr>
389
+ <div class="section-title">
390
+ <h4>
391
+ <?php _e('Scroll to Page', 'ajax-load-more'); ?>
392
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set Scroll Speed to 0 to disable scrolling to page','ajax-load-more'); ?>"></a>
393
+ </h4>
394
+ <p>
395
+ <?php _e('Scroll users automatically to the next page on \'Load More\' button click', 'ajax-load-more'); ?>.
396
+ </p>
397
+ </div>
398
+ <div class="wrap">
399
+ <div class="inner half">
400
+ <label for="next-page-scroll-speed" class="full">
401
+ <?php _e('Scroll Speed', 'ajax-load-more'); ?>
402
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>"></a>
403
+ </label>
404
+ <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
405
+ </div>
406
+ <div class="inner half">
407
+ <label for="next-page-scroll-top" class="full">
408
+ <?php _e('Scroll Top', 'ajax-load-more'); ?>
409
+ <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The scrolltop position of the window (used with scrolling and fwd/back browser buttons)','ajax-load-more'); ?>"></a>
410
+ </label>
411
+ <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
412
+ </div>
413
+ </div>
414
+
415
+ <p class="warning-callout">
416
+ <?php _e('You must add the Next Page 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/next-page/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
417
+ </p>
418
+
419
+ </div>
420
+ </div>
421
+ </div>
422
+ <?php } ?>
423
+
424
+
425
  <?php if(has_action('alm_paging_installed')){ ?>
426
  <!-- PAGING -->
427
  <div class="row input paging add-on" id="alm-paging">
1098
  <ul>
1099
  <li style="width:100%;">
1100
  <input class="alm_element" type="checkbox" name="remove_container" id="remove_container" value="f">
1101
+ <label for="remove_container"><?php _e('Remove Container', 'ajax-load-more'); ?></label>
1102
  </li>
1103
  </ul>
1104
  </div>
admin/views/add-ons.php CHANGED
@@ -1,3 +1,4 @@
 
1
  <div class="admin ajax-load-more" id="alm-add-ons">
2
  <div class="wrap">
3
  <div class="header-wrap">
@@ -14,7 +15,7 @@
14
  <?php
15
  $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
16
 
17
- <a href="<?php echo $cache_url; ?>">
18
  <div class="expand-wrap">
19
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg" alt="">
20
  <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
@@ -41,7 +42,7 @@
41
  <?php
42
  $cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Call to Actions'; ?>
43
 
44
- <a href="<?php echo $cta_url; ?>">
45
  <div class="expand-wrap">
46
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
47
  <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
@@ -68,7 +69,7 @@
68
  <?php
69
  $comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Comments'; ?>
70
 
71
- <a href="<?php echo $comments_url; ?>">
72
  <div class="expand-wrap">
73
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg" alt="">
74
  <h2 class="addon-title"><?php _e('Comments', 'ajax-load-more'); ?></h2>
@@ -93,7 +94,7 @@
93
  <div class="group<?php if (has_action('alm_unlimited_installed')){echo ' installed'; } ?>">
94
  <div class="row no-brd">
95
  <?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'; ?>
96
- <a href="<?php echo $cr_url; ?>">
97
  <div class="expand-wrap">
98
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg" alt="">
99
  <h2 class="addon-title"><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
@@ -121,7 +122,7 @@
121
  <?php
122
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Layouts';
123
  ?>
124
- <a href="<?php echo $layout_url; ?>">
125
  <div class="expand-wrap">
126
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/layouts-add-on.jpg" alt="">
127
  <h2 class="addon-title"><?php _e('Layouts', 'ajax-load-more'); ?></h2>
@@ -138,7 +139,33 @@
138
  </a>
139
  </div>
140
  </div>
141
- <!-- End Layouts -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
 
143
 
144
  <!-- Paging -->
@@ -147,7 +174,7 @@
147
  <?php
148
  $paging_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/paging/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Paging';
149
  ?>
150
- <a href="<?php echo $paging_url; ?>">
151
  <div class="expand-wrap">
152
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg" alt="">
153
  <h2 class="addon-title"><?php _e('Paging', 'ajax-load-more'); ?></h2>
@@ -174,7 +201,7 @@
174
  <?php
175
  $preload_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Preloaded';
176
  ?>
177
- <a href="<?php echo $preload_url; ?>">
178
  <div class="expand-wrap">
179
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/preloaded-add-ons.jpg" alt="">
180
  <h2 class="addon-title"><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
@@ -200,7 +227,7 @@
200
  <?php
201
  $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';
202
  ?>
203
- <a href="<?php echo $prev_url; ?>">
204
  <div class="expand-wrap">
205
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg" alt="">
206
  <h2 class="addon-title"><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
@@ -226,7 +253,7 @@
226
  <?php
227
  $seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=RESTAPI';
228
  ?>
229
- <a href="<?php echo $seo_url; ?>">
230
  <div class="expand-wrap">
231
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/rest-api-add-on.jpg" alt="">
232
  <h2 class="addon-title"><?php _e('REST API', 'ajax-load-more'); ?></h2>
@@ -254,7 +281,7 @@
254
  <?php
255
  $seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=SEO';
256
  ?>
257
- <a href="<?php echo $seo_url; ?>">
258
  <div class="expand-wrap">
259
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg" alt="">
260
  <h2 class="addon-title"><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
@@ -280,7 +307,7 @@
280
  <div class="group<?php if (has_action('alm_theme_repeaters_installed')){echo ' installed'; } ?>">
281
  <div class="row no-brd">
282
  <?php $themer_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Theme Repeaters'; ?>
283
- <a href="<?php echo $themer_url; ?>">
284
  <div class="expand-wrap">
285
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg" alt="">
286
  <h2 class="addon-title"><?php _e('Theme Repeaters', 'ajax-load-more'); ?></h2>
1
+ <?php $target = 'target="_blank"'; ?>
2
  <div class="admin ajax-load-more" id="alm-add-ons">
3
  <div class="wrap">
4
  <div class="header-wrap">
15
  <?php
16
  $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
17
 
18
+ <a href="<?php echo $cache_url; ?>" <?php echo $target; ?>>
19
  <div class="expand-wrap">
20
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg" alt="">
21
  <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
42
  <?php
43
  $cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Call to Actions'; ?>
44
 
45
+ <a href="<?php echo $cta_url; ?>" <?php echo $target; ?>>
46
  <div class="expand-wrap">
47
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
48
  <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
69
  <?php
70
  $comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Comments'; ?>
71
 
72
+ <a href="<?php echo $comments_url; ?>" <?php echo $target; ?>>
73
  <div class="expand-wrap">
74
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/comments-add-on.jpg" alt="">
75
  <h2 class="addon-title"><?php _e('Comments', 'ajax-load-more'); ?></h2>
94
  <div class="group<?php if (has_action('alm_unlimited_installed')){echo ' installed'; } ?>">
95
  <div class="row no-brd">
96
  <?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'; ?>
97
+ <a href="<?php echo $cr_url; ?>" <?php echo $target; ?>>
98
  <div class="expand-wrap">
99
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/unlimited-add-ons.jpg" alt="">
100
  <h2 class="addon-title"><?php _e('Custom Repeaters', 'ajax-load-more'); ?></h2>
122
  <?php
123
  $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Layouts';
124
  ?>
125
+ <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
126
  <div class="expand-wrap">
127
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/layouts-add-on.jpg" alt="">
128
  <h2 class="addon-title"><?php _e('Layouts', 'ajax-load-more'); ?></h2>
139
  </a>
140
  </div>
141
  </div>
142
+ <!-- End Layouts -->
143
+
144
+
145
+ <!-- Layouts -->
146
+ <div class="group<?php if (has_action('alm_nextpage_installed')){echo ' installed'; } ?>">
147
+ <div class="row no-brd">
148
+ <?php
149
+ $layout_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Next Page';
150
+ ?>
151
+ <a href="<?php echo $layout_url; ?>" <?php echo $target; ?>>
152
+ <div class="expand-wrap">
153
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/next-page-add-on.jpg" alt="">
154
+ <h2 class="addon-title"><?php _e('Next Page', 'ajax-load-more'); ?></h2>
155
+ <p class="addon-intro"><?php _e('Load and display multipage WordPress content.', 'ajax-load-more'); ?></p>
156
+ <p><?php _e('The Next Page add-on will provide functionality for infinite scrolling paginated posts and pages.', 'ajax-load-more'); ?></p>
157
+ <?php
158
+ if (has_action('alm_nextpage_installed')){
159
+ echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
160
+ }else{
161
+ echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
162
+ }
163
+ ?>
164
+ </div>
165
+ </a>
166
+ </div>
167
+ </div>
168
+ <!-- End Next Page -->
169
 
170
 
171
  <!-- Paging -->
174
  <?php
175
  $paging_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/paging/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Paging';
176
  ?>
177
+ <a href="<?php echo $paging_url; ?>" <?php echo $target; ?>>
178
  <div class="expand-wrap">
179
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/paging-add-ons.jpg" alt="">
180
  <h2 class="addon-title"><?php _e('Paging', 'ajax-load-more'); ?></h2>
201
  <?php
202
  $preload_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Preloaded';
203
  ?>
204
+ <a href="<?php echo $preload_url; ?>" <?php echo $target; ?>>
205
  <div class="expand-wrap">
206
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/preloaded-add-ons.jpg" alt="">
207
  <h2 class="addon-title"><?php _e('Preloaded', 'ajax-load-more'); ?></h2>
227
  <?php
228
  $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';
229
  ?>
230
+ <a href="<?php echo $prev_url; ?>" <?php echo $target; ?>>
231
  <div class="expand-wrap">
232
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/prev-post-add-on.jpg" alt="">
233
  <h2 class="addon-title"><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
253
  <?php
254
  $seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=RESTAPI';
255
  ?>
256
+ <a href="<?php echo $seo_url; ?>" <?php echo $target; ?>>
257
  <div class="expand-wrap">
258
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/rest-api-add-on.jpg" alt="">
259
  <h2 class="addon-title"><?php _e('REST API', 'ajax-load-more'); ?></h2>
281
  <?php
282
  $seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=SEO';
283
  ?>
284
+ <a href="<?php echo $seo_url; ?>" <?php echo $target; ?>>
285
  <div class="expand-wrap">
286
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/seo-add-ons.jpg" alt="">
287
  <h2 class="addon-title"><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
307
  <div class="group<?php if (has_action('alm_theme_repeaters_installed')){echo ' installed'; } ?>">
308
  <div class="row no-brd">
309
  <?php $themer_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Theme Repeaters'; ?>
310
+ <a href="<?php echo $themer_url; ?>" <?php echo $target; ?>>
311
  <div class="expand-wrap">
312
  <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/theme-repeater-add-on.jpg" alt="">
313
  <h2 class="addon-title"><?php _e('Theme Repeaters', 'ajax-load-more'); ?></h2>
admin/views/licenses.php CHANGED
@@ -18,6 +18,7 @@
18
  // alm_comments_installed
19
  // alm_unlimited_installed
20
  // alm_layouts_installed
 
21
  // alm_preload_installed
22
  // alm_paging_installed
23
  // alm_prev_post_installed
@@ -27,7 +28,7 @@
27
  ?>
28
 
29
  <?php
30
- // Check if any add ons are installed.
31
  if(alm_has_addon()) : ?>
32
 
33
 
@@ -360,6 +361,72 @@
360
  ?>
361
 
362
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
363
 
364
  <?php
365
  if (has_action('alm_paging_installed')){
18
  // alm_comments_installed
19
  // alm_unlimited_installed
20
  // alm_layouts_installed
21
+ // alm_nextpage_installed
22
  // alm_preload_installed
23
  // alm_paging_installed
24
  // alm_prev_post_installed
28
  ?>
29
 
30
  <?php
31
+ // Check if any add ons are installed. /admin/admin-functions.php
32
  if(alm_has_addon()) : ?>
33
 
34
 
361
  ?>
362
 
363
 
364
+ <?php
365
+ if (has_action('alm_nextpage_installed')){
366
+ // NEXT PAGE
367
+ $alm_nextpage_license = get_option( 'alm_nextpage_license_key' );
368
+ $alm_nextpage_status = get_option( 'alm_nextpage_license_status' );
369
+ $alm_nextpage_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/';
370
+ ?>
371
+ <div class="license" id="license-nextpage">
372
+ <div class="license-title">
373
+ <div class="status <?php if($alm_nextpage_status == 'valid'){echo 'valid';}else{echo 'invalid';} ?> "></div>
374
+ <h2><?php _e('Next Page', 'ajax-load-more'); ?></h2>
375
+ </div>
376
+ <div class="license-wrap">
377
+ <form method="post" action="options.php">
378
+
379
+ <?php if( $alm_nextpage_status !== false && $alm_nextpage_status == 'valid' ) { ?>
380
+ <!-- nothing -->
381
+ <?php } else { ?>
382
+ <div class="no-license">
383
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
384
+ <p><?php _e('A valid license is required to activate and receive plugin updates directly in your WordPress dashboard', 'ajax-load-more'); ?> &rarr; <a href="<?php echo $alm_nextpage_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=nextpage" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
385
+ </div>
386
+ <?php } ?>
387
+
388
+ <?php settings_fields('alm_nextpage_license'); ?>
389
+
390
+ <label class="description offscreen" for="alm_nextpage_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
391
+ <div class="license-key-field">
392
+ <input id="alm_nextpage_license_key" name="alm_nextpage_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_nextpage_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
393
+ <?php if( $alm_nextpage_status !== false && $alm_nextpage_status == 'valid' ) { ?>
394
+ <span class="status active">
395
+ <?php _e('Active', 'ajax-load-more'); ?>
396
+ </span>
397
+ <?php } else { ?>
398
+ <span class="status inactive">
399
+ <?php _e('Inactive', 'ajax-load-more'); ?>
400
+ </span>
401
+ <?php } ?>
402
+ </div>
403
+
404
+ <?php wp_nonce_field( 'alm_nextpage_license_nonce', 'alm_nextpage_license_nonce' ); ?>
405
+ <div class="license-btn-wrap"
406
+ data-name="<?php echo ALM_NEXTPAGE_ITEM_NAME; ?>"
407
+ data-url="<?php echo ALM_STORE_URL; ?>"
408
+ data-option-status="alm_nextpage_license_status"
409
+ data-option-key="alm_nextpage_license_key"
410
+ data-upgrade-url="<?php echo $alm_nextpage_url; ?>">
411
+ <button type="button" class="activate license-btn <?php if($alm_nextpage_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
412
+ <?php _e('Activate License', 'ajax-load-more'); ?>
413
+ </button>
414
+
415
+ <button type="button" class="deactivate license-btn <?php if($alm_nextpage_status !== 'valid'){ echo 'hide'; } ?> button-secondary" data-type="deactivate">
416
+ <?php _e('Deactivate License', 'ajax-load-more'); ?>
417
+ </button>
418
+ </div>
419
+
420
+ </form>
421
+ </div>
422
+ <div class="loading"></div>
423
+ </div>
424
+ <?php
425
+ }
426
+ // End NEXT PAGE
427
+ ?>
428
+
429
+
430
 
431
  <?php
432
  if (has_action('alm_paging_installed')){
admin/views/settings.php CHANGED
@@ -38,7 +38,7 @@
38
 
39
  <div class="group">
40
  <?php
41
- if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_next_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
42
  ?>
43
  <div class="admin-select">
44
  <label fo"alm-settings-nav" class="offscreen">
@@ -62,7 +62,7 @@
62
  if(has_action('alm_seo_settings'))
63
  echo '<option value="7">'.__('SEO', 'ajax-load-more').'</option>';
64
  if(has_action('alm_theme_repeaters_settings'))
65
- echo '<option value="8">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
66
  ?>
67
  </select>
68
  </div>
38
 
39
  <div class="group">
40
  <?php
41
+ if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
42
  ?>
43
  <div class="admin-select">
44
  <label fo"alm-settings-nav" class="offscreen">
62
  if(has_action('alm_seo_settings'))
63
  echo '<option value="7">'.__('SEO', 'ajax-load-more').'</option>';
64
  if(has_action('alm_theme_repeaters_settings'))
65
+ echo '<option value="8">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
66
  ?>
67
  </select>
68
  </div>
ajax-load-more.php CHANGED
@@ -7,15 +7,14 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
- Version: 2.13.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
- */
14
-
15
 
16
 
17
- define('ALM_VERSION', '2.13.1');
18
- define('ALM_RELEASE', 'December 5, 2016');
19
  define('ALM_STORE_URL', 'https://connekthq.com');
20
 
21
 
@@ -153,6 +152,7 @@ if( !class_exists('AjaxLoadMore') ):
153
  if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
154
  if (!defined('ALM_UNLIMITED_ITEM_NAME')) define('ALM_UNLIMITED_ITEM_NAME', '3118');
155
  if (!defined('ALM_LAYOUTS_ITEM_NAME')) define('ALM_LAYOUTS_ITEM_NAME', '11398');
 
156
  if (!defined('ALM_PAGING_ITEM_NAME')) define('ALM_PAGING_ITEM_NAME', '6898');
157
  if (!defined('ALM_PRELOADED_ITEM_NAME')) define('ALM_PRELOADED_ITEM_NAME', '4293');
158
  if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
@@ -274,6 +274,7 @@ if( !class_exists('AjaxLoadMore') ):
274
  'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
275
  'pluginurl' => ALM_URL,
276
  'scrolltop' => $scrolltop,
 
277
  )
278
  );
279
 
@@ -288,10 +289,8 @@ if( !class_exists('AjaxLoadMore') ):
288
  * @since 2.0.0
289
  */
290
 
291
- public function alm_shortcode($atts) {
292
-
293
- return ALM_SHORTCODE::alm_render_shortcode($atts);
294
-
295
  }
296
 
297
 
@@ -321,7 +320,7 @@ if( !class_exists('AjaxLoadMore') ):
321
  $canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
322
 
323
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
324
-
325
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
326
 
327
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
@@ -385,14 +384,14 @@ if( !class_exists('AjaxLoadMore') ):
385
  } else {
386
  $post_status = 'publish';
387
  }
388
- }
389
-
390
 
391
 
392
  // Page Parameters
393
  $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
394
  $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
395
 
 
396
  // Preload Add-on
397
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
398
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
@@ -402,6 +401,7 @@ if( !class_exists('AjaxLoadMore') ):
402
  $offset = $offset + $preloaded_amount;
403
  }
404
 
 
405
  // CTA Add-on
406
  $cta = false;
407
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
@@ -418,16 +418,20 @@ if( !class_exists('AjaxLoadMore') ):
418
  $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? $ctaData['cta_theme_repeater'] : 'null';
419
  }
420
 
 
421
  // Previous Post Add-on
422
  $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
423
  $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
424
 
 
425
  // Paging Add-on
426
  $paging = (isset($_GET['paging'])) ? $_GET['paging'] : false;
427
 
 
428
  // SEO Add-on
429
  $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
430
 
 
431
  // Language (Is this required?)
432
  $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
433
 
@@ -603,8 +607,7 @@ if( !class_exists('AjaxLoadMore') ):
603
  $args[$argument[0]] = $argument_arr;
604
  }else{
605
  $args[$argument[0]] = $argument[1];
606
- }
607
-
608
  }
609
  }
610
 
@@ -619,7 +622,8 @@ if( !class_exists('AjaxLoadMore') ):
619
  }else{
620
  $alm_page_count = $page + 1;
621
  }
622
-
 
623
 
624
  /*
625
  * alm_prev_post_args
@@ -654,7 +658,8 @@ if( !class_exists('AjaxLoadMore') ):
654
  * @return $args;
655
  */
656
  $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
657
-
 
658
 
659
  /*
660
  * WP_Query
@@ -663,10 +668,11 @@ if( !class_exists('AjaxLoadMore') ):
663
  *
664
  * @return $alm_query;
665
  */
666
- $alm_query = new WP_Query( $args ); // WP_Query()
667
 
 
 
668
 
669
- // If preload, update our loop count and total posts
670
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
671
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
672
  if($old_offset > 0)
@@ -800,9 +806,10 @@ if( !class_exists('AjaxLoadMore') ):
800
 
801
  }
802
 
803
- }elseif($queryType === 'totalposts'){
 
804
 
805
- echo $alm_total_posts; // Paging add-on
806
 
807
  }
808
 
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
+ Version: 2.14.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
+ */
 
14
 
15
 
16
+ define('ALM_VERSION', '2.14.0');
17
+ define('ALM_RELEASE', 'February 14, 2016');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
152
  if (!defined('ALM_COMMENTS_ITEM_NAME')) define('ALM_COMMENTS_ITEM_NAME', '12172');
153
  if (!defined('ALM_UNLIMITED_ITEM_NAME')) define('ALM_UNLIMITED_ITEM_NAME', '3118');
154
  if (!defined('ALM_LAYOUTS_ITEM_NAME')) define('ALM_LAYOUTS_ITEM_NAME', '11398');
155
+ if (!defined('ALM_NEXTPAGE_ITEM_NAME')) define('ALM_NEXTPAGE_ITEM_NAME', '24540');
156
  if (!defined('ALM_PAGING_ITEM_NAME')) define('ALM_PAGING_ITEM_NAME', '6898');
157
  if (!defined('ALM_PRELOADED_ITEM_NAME')) define('ALM_PRELOADED_ITEM_NAME', '4293');
158
  if (!defined('ALM_PREV_POST_ITEM_NAME')) define('ALM_PREV_POST_ITEM_NAME', '9686');
274
  'alm_nonce' => wp_create_nonce( "ajax_load_more_nonce" ),
275
  'pluginurl' => ALM_URL,
276
  'scrolltop' => $scrolltop,
277
+ 'ajax_object' => array('is_single' => true, 'is_singular' => true )
278
  )
279
  );
280
 
289
  * @since 2.0.0
290
  */
291
 
292
+ public function alm_shortcode($atts) {
293
+ return ALM_SHORTCODE::alm_render_shortcode($atts);
 
 
294
  }
295
 
296
 
320
  $canonical_url = (isset($_GET['canonical_url'])) ? $_GET['canonical_url'] : $_SERVER['HTTP_REFERER'];
321
 
322
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
323
+
324
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
325
 
326
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
384
  } else {
385
  $post_status = 'publish';
386
  }
387
+ }
 
388
 
389
 
390
  // Page Parameters
391
  $posts_per_page = (isset($_GET['posts_per_page'])) ? $_GET['posts_per_page'] : 5;
392
  $page = (isset($_GET['page'])) ? $_GET['page'] : 0;
393
 
394
+
395
  // Preload Add-on
396
  $preloaded = (isset($_GET['preloaded'])) ? $_GET['preloaded'] : 'false';
397
  $preloaded_amount = (isset($_GET['preloaded_amount'])) ? $_GET['preloaded_amount'] : '5';
401
  $offset = $offset + $preloaded_amount;
402
  }
403
 
404
+
405
  // CTA Add-on
406
  $cta = false;
407
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
418
  $cta_theme_repeater = (isset($ctaData['cta_theme_repeater'])) ? $ctaData['cta_theme_repeater'] : 'null';
419
  }
420
 
421
+
422
  // Previous Post Add-on
423
  $is_previous_post = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
424
  $previous_post_id = (isset($_GET['previous_post_id'])) ? $_GET['previous_post_id'] : '';
425
 
426
+
427
  // Paging Add-on
428
  $paging = (isset($_GET['paging'])) ? $_GET['paging'] : false;
429
 
430
+
431
  // SEO Add-on
432
  $seo_start_page = (isset($_GET['seo_start_page'])) ? $_GET['seo_start_page'] : 1;
433
 
434
+
435
  // Language (Is this required?)
436
  $lang = (isset($_GET['lang'])) ? $_GET['lang'] : '';
437
 
607
  $args[$argument[0]] = $argument_arr;
608
  }else{
609
  $args[$argument[0]] = $argument[1];
610
+ }
 
611
  }
612
  }
613
 
622
  }else{
623
  $alm_page_count = $page + 1;
624
  }
625
+
626
+
627
 
628
  /*
629
  * alm_prev_post_args
658
  * @return $args;
659
  */
660
  $args = apply_filters('alm_query_args_'.$id, $args); // ALM Core Filter Hook
661
+
662
+
663
 
664
  /*
665
  * WP_Query
668
  *
669
  * @return $alm_query;
670
  */
 
671
 
672
+ $alm_query = new WP_Query( $args );
673
+
674
 
675
+ // If preloaded, update our loop count and total posts
676
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
677
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
678
  if($old_offset > 0)
806
 
807
  }
808
 
809
+ }
810
+ elseif($queryType === 'totalposts'){ // Paging add-on
811
 
812
+ echo $alm_total_posts;
813
 
814
  }
815
 
core/classes/class.alm-shortcode.php CHANGED
@@ -56,6 +56,12 @@ if( !class_exists('ALM_SHORTCODE') ):
56
  'comments_template' => 'none',
57
  'comments_callback' => '',
58
  'comments_post_id' => 'null',
 
 
 
 
 
 
59
  'previous_post' => false,
60
  'previous_post_id' => 'null',
61
  'previous_post_taxonomy' => '',
@@ -135,8 +141,8 @@ if( !class_exists('ALM_SHORTCODE') ):
135
  if(has_action('alm_prev_post_installed') && $previous_post === 'true'){
136
  wp_enqueue_script( 'ajax-load-more-previous-post' );
137
  }
138
- if(has_action('alm_layouts_installed')){
139
- //wp_enqueue_script( 'ajax-load-more-layouts' ); // Not yet :)
140
  }
141
 
142
  if($previous_post === 'true'){
@@ -224,9 +230,8 @@ if( !class_exists('ALM_SHORTCODE') ):
224
  if($paging === 'true'){
225
  $paging_container_class = ' alm-paging-wrap';
226
 
227
- $preloaded = false;
228
  // If Preloaded & Paging, pause loading by default.
229
- // Still work to do here with SEO add-on
230
  if($preloaded === 'true'){
231
  $pause = 'true';
232
  $pause_override = 'false';
@@ -254,7 +259,13 @@ if( !class_exists('ALM_SHORTCODE') ):
254
  $the_id = '';
255
  }
256
 
257
- $ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '.$the_id.' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'">';
 
 
 
 
 
 
258
 
259
 
260
  // Previous Post Add-on
@@ -275,6 +286,17 @@ if( !class_exists('ALM_SHORTCODE') ):
275
  $seo = false;
276
  $paging = false;
277
  $cache = false;
 
 
 
 
 
 
 
 
 
 
 
278
  }
279
 
280
 
@@ -434,7 +456,12 @@ if( !class_exists('ALM_SHORTCODE') ):
434
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
435
 
436
  if($seo === "true" && $paging === 'false'){
437
- $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
 
 
 
 
 
438
  }
439
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
440
  $preloaded_output .= '<div class="alm-reveal">';
@@ -583,7 +610,22 @@ if( !class_exists('ALM_SHORTCODE') ):
583
  $options
584
  );
585
  $ajaxloadmore .= $prev_post_return;
586
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
587
 
588
  $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
589
  if($theme_repeater != 'null'){
@@ -644,7 +686,7 @@ if( !class_exists('ALM_SHORTCODE') ):
644
 
645
 
646
  // Previous Post Add-on
647
- // - Get first post and append to ajax load more object
648
  if(has_action('alm_prev_post_installed') && $previous_post){
649
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
650
  $repeater_type = $repeater_type[0]; // (default | repeater | template_)
@@ -657,6 +699,7 @@ if( !class_exists('ALM_SHORTCODE') ):
657
  // Get previous post include, build output from the next post filter
658
  $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set the post id .alm-reveal div
659
 
 
660
  /*
661
  * alm_prev_post_inc
662
  *
@@ -670,8 +713,24 @@ if( !class_exists('ALM_SHORTCODE') ):
670
  $ajaxloadmore .= $previous_post_output; // Add $previous_post_output data to $ajaxloadmore
671
 
672
  }
673
- // / Previous Post Add-on
674
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
675
 
676
  $ajaxloadmore .= '</'.$container_element.'>';
677
 
56
  'comments_template' => 'none',
57
  'comments_callback' => '',
58
  'comments_post_id' => 'null',
59
+ 'nextpage' => false,
60
+ 'nextpage_post_id' => 'null',
61
+ 'nextpage_urls' => 'true',
62
+ 'nextpage_scroll' => '250:30',
63
+ 'nextpage_pageviews' => 'true',
64
+ 'nextpage_start' => 1,
65
  'previous_post' => false,
66
  'previous_post_id' => 'null',
67
  'previous_post_taxonomy' => '',
141
  if(has_action('alm_prev_post_installed') && $previous_post === 'true'){
142
  wp_enqueue_script( 'ajax-load-more-previous-post' );
143
  }
144
+ if(has_action('alm_nextpage_installed') && $nextpage === 'true'){
145
+ wp_enqueue_script( 'ajax-load-more-nextpage' );
146
  }
147
 
148
  if($previous_post === 'true'){
230
  if($paging === 'true'){
231
  $paging_container_class = ' alm-paging-wrap';
232
 
 
233
  // If Preloaded & Paging, pause loading by default.
234
+ // Added in 2.14.0
235
  if($preloaded === 'true'){
236
  $pause = 'true';
237
  $pause_override = 'false';
259
  $the_id = '';
260
  }
261
 
262
+ // Is Search
263
+ $is_search = '';
264
+ if(is_search()){
265
+ $is_search = 'data-search="true"'; // set attr for use with SEO
266
+ }
267
+
268
+ $ajaxloadmore .= '<div id="'. $div_id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" '.$the_id.' data-alm-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'" '. $is_search .'>';
269
 
270
 
271
  // Previous Post Add-on
286
  $seo = false;
287
  $paging = false;
288
  $cache = false;
289
+ }
290
+
291
+
292
+ // Nextpage Add-on
293
+ // - Set other add-on params to false
294
+ if($nextpage){
295
+ $previous_post = false;
296
+ $seo = false;
297
+ $cache = false;
298
+ $comments = false;
299
+ $pause = 'true';
300
  }
301
 
302
 
456
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
457
 
458
  if($seo === "true" && $paging === 'false'){
459
+ if(is_search()){
460
+ // If search, append slug (?s=term) to data-url
461
+ $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.''. $slug .'">';
462
+ }else{
463
+ $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
464
+ }
465
  }
466
  if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
467
  $preloaded_output .= '<div class="alm-reveal">';
610
  $options
611
  );
612
  $ajaxloadmore .= $prev_post_return;
613
+ }
614
+
615
+
616
+ // Nextpage Post Add-on
617
+ if(has_action('alm_nextpage_installed') && $nextpage){
618
+ $nextpage_return = apply_filters(
619
+ 'alm_nextpage_shortcode',
620
+ $nextpage_urls,
621
+ $nextpage_pageviews,
622
+ $nextpage_post_id,
623
+ $nextpage_scroll,
624
+ $options
625
+ );
626
+ $ajaxloadmore .= $nextpage_return;
627
+ }
628
+
629
 
630
  $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
631
  if($theme_repeater != 'null'){
686
 
687
 
688
  // Previous Post Add-on
689
+ // - Get first post, append data to ajax load more object
690
  if(has_action('alm_prev_post_installed') && $previous_post){
691
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
692
  $repeater_type = $repeater_type[0]; // (default | repeater | template_)
699
  // Get previous post include, build output from the next post filter
700
  $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. get_the_title($previous_post_id) .'" data-id="'. $previous_post_id .'">'; // Set the post id .alm-reveal div
701
 
702
+
703
  /*
704
  * alm_prev_post_inc
705
  *
713
  $ajaxloadmore .= $previous_post_output; // Add $previous_post_output data to $ajaxloadmore
714
 
715
  }
716
+ // End Previous Post Add-on
717
+
718
+
719
+ // Next Page Add-on
720
+ if(has_action('alm_nextpage_installed') && $nextpage){
721
+
722
+ $nextpage_start = alm_get_startpage();
723
+
724
+ $nextpage_is_paged = false;
725
+ if($nextpage_start > 1){
726
+ $nextpage_is_paged = true;
727
+ }
728
+
729
+ $alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging);
730
+ $ajaxloadmore .= $alm_nextpage_output;
731
+
732
+ }
733
+ // End Next Page Add-on
734
 
735
  $ajaxloadmore .= '</'.$container_element.'>';
736
 
core/functions.php CHANGED
@@ -424,10 +424,14 @@ function alm_get_canonical_url(){
424
  $tax_id = $tax_term->term_id;
425
  $canonicalURL = get_term_link($tax_id);
426
  }
427
- // post_type
428
  elseif(is_post_type_archive()){
429
  $post_type_archive = get_post_type();
430
  $canonicalURL = get_post_type_archive_link($post_type_archive);
 
 
 
 
431
  }
432
  else{
433
  $canonicalURL = get_permalink();
@@ -452,7 +456,17 @@ function alm_get_page_slug($post){
452
  if(is_front_page() || is_home()){
453
  $slug = 'home';
454
  }else{
455
- $slug = $post->post_name;
 
 
 
 
 
 
 
 
 
 
456
  }
457
  }else{
458
  // Tax
@@ -503,6 +517,25 @@ function alm_get_page_slug($post){
503
 
504
 
505
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
506
  /*
507
  * alm_paging_no_script
508
  * Create paging navigation
424
  $tax_id = $tax_term->term_id;
425
  $canonicalURL = get_term_link($tax_id);
426
  }
427
+ // Post Type
428
  elseif(is_post_type_archive()){
429
  $post_type_archive = get_post_type();
430
  $canonicalURL = get_post_type_archive_link($post_type_archive);
431
+ }
432
+ // Search
433
+ elseif(is_search()){
434
+ $canonicalURL = get_home_url().'/';
435
  }
436
  else{
437
  $canonicalURL = get_permalink();
456
  if(is_front_page() || is_home()){
457
  $slug = 'home';
458
  }else{
459
+ // Search
460
+ if(is_search()){
461
+ $search_query = get_search_query();
462
+ if($search_query){
463
+ $slug = "?s=$search_query";
464
+ }else{
465
+ $slug = '?s=';
466
+ }
467
+ }else{
468
+ $slug = $post->post_name;
469
+ }
470
  }
471
  }else{
472
  // Tax
517
 
518
 
519
 
520
+ /*
521
+ * alm_get_startpage
522
+ * Get query param of start page (paged, page)
523
+ *
524
+ * @since 2.14.0
525
+ */
526
+ function alm_get_startpage(){
527
+ if ( get_query_var('paged') ) {
528
+ $start_page = get_query_var('paged');
529
+ } elseif ( get_query_var('page') ) {
530
+ $start_page = get_query_var('page');
531
+ } else {
532
+ $start_page = 1;
533
+ }
534
+ return $start_page;
535
+ }
536
+
537
+
538
+
539
  /*
540
  * alm_paging_no_script
541
  * Create paging navigation
core/js/ajax-load-more.js CHANGED
@@ -40,13 +40,16 @@
40
  alm.content = $('.alm-ajax', alm.container);
41
  alm.content_preloaded = $('.alm-listing.alm-preloaded', alm.container);
42
  alm.canonical_url = alm.el.attr('data-canonical-url');
 
43
  alm.slug = alm.el.attr('data-slug');
44
  alm.prefix = 'alm-';
45
- alm.cache = alm.content.attr('data-cache'); // cache (true/false)
 
46
  alm.cache_id = alm.content.attr('data-cache-id'); // cache value
47
  alm.cache_path = alm.content.attr('data-cache-path'); // cache path
48
  alm.cache_logged_in = alm.content.attr('data-cache-logged-in'); // cache logged in (settings)
49
- alm.repeater = alm.content.attr('data-repeater');
 
50
  alm.theme_repeater = alm.content.attr('data-theme-repeater');
51
 
52
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
@@ -63,18 +66,25 @@
63
  alm.posts_per_page = alm.content.attr('data-posts-per-page');
64
 
65
  alm.cta_array = '';
66
- alm.cta = alm.content.attr('data-cta'); // is Alternating Templates enabled?
67
  alm.cta_position = alm.content.attr('data-cta-position');
68
  alm.cta_repeater = alm.content.attr('data-cta-repeater');
69
  alm.cta_theme_repeater = alm.content.attr('data-cta-theme-repeater');
70
 
71
- alm.previous_post = alm.content.attr('data-previous-post'); // Next Post add-on
 
 
 
 
 
 
 
 
72
  alm.previous_post_id = alm.content.attr('data-previous-post-id'); // Get the post id
73
  alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy'); // Get the post taxonomy
74
 
75
- alm.comments = alm.content.attr('data-comments'); // true | false
76
- // if comments, then set alm.content to comments wrap
77
- if(alm.comments === 'true'){
78
  alm.content = $('.alm-comments', alm.container);
79
  }
80
  alm.comments_array = '';
@@ -135,6 +145,7 @@
135
  alm.paging = false;
136
  }
137
 
 
138
  if(alm.paging_controls === 'true'){
139
  alm.paging_controls = true;
140
  }else{
@@ -184,7 +195,11 @@
184
  }
185
  if (alm.seo === 'true'){
186
  alm.seo = true; // Convert string to boolean
187
- }
 
 
 
 
188
 
189
  alm.permalink = alm.content.attr('data-seo-permalink');
190
  alm.pageview = alm.content.attr('data-seo-pageview');
@@ -211,6 +226,33 @@
211
  alm.start_page = 1;
212
  }
213
  /* End SEO */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
 
216
  /* Previous Post */
@@ -429,11 +471,28 @@
429
 
430
  var action = 'alm_query_posts';
431
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
432
  if(alm.previous_post){
433
  alm.previous_post_id = alm.content.attr('data-previous-post-id');
434
  alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy');
435
  }
436
 
 
437
  // Comment query
438
  if(alm.comments === 'true'){
439
  action = 'alm_comments_query';
@@ -446,10 +505,10 @@
446
  'style': alm.comments_style,
447
  'template': alm.comments_template,
448
  'callback': alm.comments_callback,
449
- };
450
-
451
  }
452
 
 
453
  // CTA Add-on Query params
454
  if(alm.cta === 'true'){
455
  alm.cta_array = {
@@ -458,7 +517,8 @@
458
  'cta_repeater': alm.cta_repeater,
459
  'cta_theme_repeater': alm.cta_theme_repeater,
460
  };
461
- }
 
462
 
463
  // REST API
464
  if(alm.restapi){
@@ -555,6 +615,7 @@
555
  cache_id : alm.cache_id,
556
  repeater : alm.repeater,
557
  theme_repeater : alm.theme_repeater,
 
558
  cta : alm.cta_array,
559
  comments : alm.comments_array,
560
  post_type : alm.post_type,
@@ -611,7 +672,14 @@
611
  if(queryType === 'standard'){
612
  alm.AjaxLoadMore.success(data, false);
613
  }
614
- else if(queryType === 'totalposts' && alm.paging){
 
 
 
 
 
 
 
615
  if($.isFunction($.fn.almBuildPagination)){
616
  $.fn.almBuildPagination(data, alm);
617
  }
@@ -630,8 +698,18 @@
630
 
631
 
632
  // If pagination enabled, run totalposts query
633
- if(alm.paging){
634
- alm.AjaxLoadMore.ajax('totalposts'); // Create paging menu and query for total posts
 
 
 
 
 
 
 
 
 
 
635
  }
636
 
637
 
@@ -763,12 +841,12 @@
763
  if(k > 0 || alm.preloaded === 'true'){ // > Paged
764
  var pagenum = (k + 1 + p);
765
  if(alm.permalink === 'default'){
766
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
767
  }else{
768
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/" data-page="'+ pagenum +'" />');
769
  }
770
  }else{ // First Page
771
- div = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'" data-page="1" />');
772
  }
773
  div.append(data[k]);
774
  div = $(div); // convert to object
@@ -789,9 +867,9 @@
789
  var pagenum = (alm.page + 1 + p);
790
  if(alm.seo){
791
  if(alm.permalink === 'default'){
792
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'&paged='+ pagenum+'" data-page="'+ pagenum +'" />');
793
  }else{
794
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'page/'+ pagenum +'/" data-page="'+ pagenum +'" />');
795
  }
796
  }else{
797
  // Basic ALM
@@ -801,7 +879,7 @@
801
  }else{
802
  if(alm.seo){
803
  // SEO [Page 1]
804
- alm.el = $('<div class="alm-reveal alm-seo" data-url="'+alm.canonical_url+'" data-page="1" />');
805
  }else{
806
  // Basic ALM
807
  alm.el = $('<div class="alm-reveal" />');
@@ -826,9 +904,7 @@
826
  alm.button.delay(alm.speed).removeClass('loading');
827
  alm.AjaxLoadMore.resetBtnText();
828
  }
829
- if ($.isFunction($.fn.almSEO) && alm.seo) {
830
- $.fn.almSEO(alm);
831
- }
832
  });
833
  });
834
  }else{
@@ -838,9 +914,7 @@
838
  alm.button.delay(alm.speed).removeClass('loading');
839
  alm.AjaxLoadMore.resetBtnText();
840
  }
841
- if ($.isFunction($.fn.almSEO) && alm.seo) {
842
- $.fn.almSEO(alm);
843
- }
844
  });
845
  }
846
 
@@ -848,15 +922,11 @@
848
  if(alm.images_loaded === 'true'){
849
  alm.el.almWaitForImages().done(function(){
850
  alm.el.show();
851
- if ($.isFunction($.fn.almSEO) && alm.seo) {
852
- $.fn.almSEO(alm);
853
- }
854
  });
855
  }else{
856
  alm.el.show();
857
- if ($.isFunction($.fn.almSEO) && alm.seo) {
858
- $.fn.almSEO(alm);
859
- }
860
  }
861
  alm.loading = false;
862
  if(!alm.paging){
@@ -873,9 +943,7 @@
873
  alm.button.delay(alm.speed).removeClass('loading');
874
  alm.AjaxLoadMore.resetBtnText();
875
  }
876
- if ($.isFunction($.fn.almSEO) && alm.seo) {
877
- $.fn.almSEO(alm);
878
- }
879
  });
880
  });
881
  }else{
@@ -884,10 +952,8 @@
884
  if(!alm.paging){
885
  alm.button.delay(alm.speed).removeClass('loading');
886
  alm.AjaxLoadMore.resetBtnText();
887
- }
888
- if ($.isFunction($.fn.almSEO) && alm.seo) {
889
- $.fn.almSEO(alm);
890
- }
891
  });
892
  }
893
  }
@@ -902,18 +968,14 @@
902
  if ($.isFunction($.fn.almOnPagingComplete)){
903
  $.fn.almOnPagingComplete(alm);
904
  }
905
- if ($.isFunction($.fn.almSEO) && alm.seo) { // ALM SEO
906
- $.fn.almSEO(alm);
907
- }
908
  });
909
  } else {
910
- if ($.isFunction($.fn.almSEO) && alm.seo) { // ALM SEO
911
- $.fn.almSEO(alm);
912
- }
913
  }
914
  // End Paging -- /
915
 
916
- }
917
 
918
  // ALM Complete
919
  if ($.isFunction($.fn.almComplete)) {
@@ -981,6 +1043,7 @@
981
  * @since 2.11.3
982
  */
983
  alm.AjaxLoadMore.pagingPreloadedInit = function(data){
 
984
  alm.el = $('<div class="alm-reveal"/>');
985
  alm.el.append('<div class="alm-paging-content">'+data+'</div><div class="alm-paging-loading"></div>');
986
  alm.content.append(alm.el);
@@ -998,6 +1061,41 @@
998
 
999
 
1000
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1001
 
1002
  /* getPreviousPost()
1003
  *
@@ -1042,6 +1140,22 @@
1042
 
1043
 
1044
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1045
  /* triggerDone()
1046
  *
1047
  * Fires the almDone() function (if available).
@@ -1124,13 +1238,22 @@
1124
  * @since 2.1.2
1125
  */
1126
  if(alm.paging){
1127
- alm.window.resize(function() {
 
1128
  if ($.isFunction($.fn.almOnWindowResize)){
1129
- setTimeout(function(){
1130
- $.fn.almOnWindowResize(alm);
1131
- }, 250);
1132
  }
1133
- });
 
 
 
 
 
 
 
 
 
 
1134
  }
1135
 
1136
 
@@ -1204,6 +1327,18 @@
1204
  alm.AjaxLoadMore.getPreviousPost(); // Set next post on load
1205
  alm.loading = false;
1206
  }
 
 
 
 
 
 
 
 
 
 
 
 
1207
  }
1208
  alm.AjaxLoadMore.init();
1209
 
@@ -1225,21 +1360,43 @@
1225
  $.fn.almUpdateCurrentPage = function(current, obj, alm){
1226
  alm.page = current;
1227
 
1228
- // We will eventually use this function to combine Paging + Preloaded add-ons
1229
- //var alm_paging_init = false;
1230
- // If is paging init and preloaded, grab preloaded data, and append it .alm-reveal
1231
- if(alm.paging_init && alm.preloaded === 'true'){
1232
-
1233
- var data = $('.alm-preloaded .alm-reveal', alm.el).html(); // Content of preloaded page
 
 
 
 
 
 
 
 
 
 
1234
  $('.alm-preloaded', alm.el).remove();
1235
  alm.preloaded_amount = 0; // Reset
1236
  //alm.AjaxLoadMore.success(data, true); // Skip post loading and go right to success() for display
1237
  alm.AjaxLoadMore.pagingPreloadedInit(data);
1238
  alm.paging_init = false;
 
 
 
 
 
 
 
 
 
 
1239
  alm.init = false;
1240
 
1241
- }else{
1242
-
 
 
1243
  alm.AjaxLoadMore.loadPosts();
1244
 
1245
  }
@@ -1420,7 +1577,7 @@
1420
  v2.0.2
1421
  Based on https://github.com/alexanderdickson/almWaitForImages
1422
  */
1423
- // Include almWaitForImages() for paging add-on
1424
  ;(function (factory) {
1425
  if (typeof define === 'function' && define.amd) {
1426
  // AMD. Register as an anonymous module.
40
  alm.content = $('.alm-ajax', alm.container);
41
  alm.content_preloaded = $('.alm-listing.alm-preloaded', alm.container);
42
  alm.canonical_url = alm.el.attr('data-canonical-url');
43
+ alm.is_search = alm.el.attr('data-search');
44
  alm.slug = alm.el.attr('data-slug');
45
  alm.prefix = 'alm-';
46
+
47
+ alm.cache = alm.content.attr('data-cache'); // Cache add-on
48
  alm.cache_id = alm.content.attr('data-cache-id'); // cache value
49
  alm.cache_path = alm.content.attr('data-cache-path'); // cache path
50
  alm.cache_logged_in = alm.content.attr('data-cache-logged-in'); // cache logged in (settings)
51
+
52
+ alm.repeater = alm.content.attr('data-repeater'); // Repeaters
53
  alm.theme_repeater = alm.content.attr('data-theme-repeater');
54
 
55
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
66
  alm.posts_per_page = alm.content.attr('data-posts-per-page');
67
 
68
  alm.cta_array = '';
69
+ alm.cta = alm.content.attr('data-cta'); // CTA add-on
70
  alm.cta_position = alm.content.attr('data-cta-position');
71
  alm.cta_repeater = alm.content.attr('data-cta-repeater');
72
  alm.cta_theme_repeater = alm.content.attr('data-cta-theme-repeater');
73
 
74
+ alm.nextpage_array = '';
75
+ alm.nextpage = alm.content.attr('data-nextpage'); // Nextpage add-on
76
+ alm.nextpage_urls = alm.content.attr('data-nextpage-urls'); // Update url
77
+ alm.nextpage_scroll = alm.content.attr('data-nextpage-scroll'); // Scroll
78
+ alm.nextpage_pageviews = alm.content.attr('data-nextpage-pageviews'); // pageviews
79
+ alm.nextpage_post_id = alm.content.attr('data-nextpage-post-id'); // Get the nextpage id
80
+ alm.nextpage_startpage = alm.content.attr('data-nextpage-startpage'); // nextpage startpage
81
+
82
+ alm.previous_post = alm.content.attr('data-previous-post'); // Previous Post add-on
83
  alm.previous_post_id = alm.content.attr('data-previous-post-id'); // Get the post id
84
  alm.previous_post_taxonomy = alm.content.attr('data-previous-post-taxonomy'); // Get the post taxonomy
85
 
86
+ alm.comments = alm.content.attr('data-comments'); // true | false
87
+ if(alm.comments === 'true'){ // if comments, then set alm.content to comments wrap
 
88
  alm.content = $('.alm-comments', alm.container);
89
  }
90
  alm.comments_array = '';
145
  alm.paging = false;
146
  }
147
 
148
+
149
  if(alm.paging_controls === 'true'){
150
  alm.paging_controls = true;
151
  }else{
195
  }
196
  if (alm.seo === 'true'){
197
  alm.seo = true; // Convert string to boolean
198
+ }
199
+ if (alm.is_search === undefined){
200
+ alm.is_search = false;
201
+ }
202
+ alm.search_value = (alm.is_search === 'true') ? alm.slug : ''; // Convert to value of slug for appending to seo url
203
 
204
  alm.permalink = alm.content.attr('data-seo-permalink');
205
  alm.pageview = alm.content.attr('data-seo-pageview');
226
  alm.start_page = 1;
227
  }
228
  /* End SEO */
229
+
230
+
231
+ /* Nextpage */
232
+
233
+ if (alm.nextpage === 'true'){
234
+ alm.nextpage = true;
235
+ }else{
236
+ alm.nextpage = false;
237
+ }
238
+ if (alm.nextpage_urls === undefined){
239
+ alm.nextpage = 'true';
240
+ }
241
+ if (alm.nextpage_scroll === undefined){
242
+ alm.nextpage_scroll = '250:30';
243
+ }
244
+ if (alm.nextpage_pageviews === undefined){
245
+ alm.nextpage_pageviews = 'true';
246
+ }
247
+ if (alm.nextpage_post_id === undefined){
248
+ alm.nextpage = false;
249
+ alm.nextpage_post_id = null;
250
+ }
251
+ if (alm.nextpage_startpage === undefined){
252
+ alm.nextpage_startpage = 1;
253
+ }
254
+
255
+ /* End Nextpage */
256
 
257
 
258
  /* Previous Post */
471
 
472
  var action = 'alm_query_posts';
473
 
474
+
475
+ // Nextpage Params
476
+ if(alm.nextpage){
477
+ action = 'alm_nextpage_query';
478
+ alm.nextpage_array = {
479
+ 'nextpage' : 'true',
480
+ 'urls' : alm.nextpage_urls,
481
+ 'scroll' : alm.nextpage_scroll,
482
+ 'pageviews' : alm.nextpage_pageviews,
483
+ 'post_id' : alm.nextpage_post_id,
484
+ 'startpage' : alm.nextpage_startpage
485
+ };