WordPress Infinite Scroll – Ajax Load More - Version 2.12.0

Version Description

  • September 5, 2016 =
  • NEW - Completed integration of new Call to Actions add-on.
  • NEW - Added $.fn.almTriggerClick() public function that will easily allow users to trigger Ajax Load More from any object on the screen.
  • UPDATE - Allow for post_status="inherit" for use with attachments.
  • UPDATE - Adding Media (attachment) post type to the Shortcode Builder.
  • UPDATE - Allow for Author slug or ID within shortcode.
  • UPDATE - Updating Ajax Load More menu icon.
  • UPDATE - Updating license notifications on License page.
  • UPDATE - Removed blocking of SEO add-on when using multiple instances of the plugin on the same page. Users must ensure to only set seo="true" on one element if using multiple instances of Ajax load More.
  • UPDATE - Updated default repeater template display on admin screen if Local Template is in use. Users will now see the contents on the Local Template but will not be able to modify the template directly.
  • FIX - URL/paging issue with Polylang and SEO plugins.
  • FIX - Updated code used to split pages with Search Engine Optimization add-on.
Download this release

Release Info

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

Code changes from version 2.11.2 to 2.12.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, 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, woocommerce
5
  Requires at least: 3.6
6
  Tested up to: 4.6
7
- Stable tag: 2.11.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,7 +103,8 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
103
  ***
104
 
105
  = Demos =
106
- * **[Default](https://connekthq.com/plugins/ajax-load-more/)** - Out of the box functionality and styling
 
107
  * **[Destroy After](https://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages
108
  * **[Fade Transition](https://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded
109
  * **[Filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance
@@ -134,6 +135,10 @@ Ajax Load More accepts a number of parameters that are passed to the WordPress q
134
  > 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 />
135
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/cache/)
136
  >
 
 
 
 
137
  > #### Comments
138
  > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.<br />
139
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
@@ -318,6 +323,19 @@ How to install Ajax Load More.
318
 
319
  == Changelog ==
320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
321
  = 2.11.2 - August 4, 2016 =
322
  * SECURITY - Security fix for Custom Repeaters and Theme Repeaters include file path.
323
  * FIX - Removed duplicate #ajax-load-more id's being generated when using multiple instances. #ajax-load-more will now only be attached to the 1st instance of the shortcode - please update your CSS if you are targeting the #ajax-load-more ID.
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.6
7
+ Stable tag: 2.12.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
  ***
104
 
105
  = Demos =
106
+ * **[Default](https://connekthq.com/plugins/ajax-load-more/examples/default/)** - Out of the box functionality and styling
107
+ * **[Attachments](https://connekthq.com/plugins/ajax-load-more/examples/attachments/)** - Infinite scroll post attachments
108
  * **[Destroy After](https://connekthq.com/plugins/ajax-load-more/examples/destroy-after/)** - Remove Ajax Load More functionality after 'n' number of pages
109
  * **[Fade Transition](https://connekthq.com/plugins/ajax-load-more/examples/fade-transition/)** - Elements fade in as posts are loaded
110
  * **[Filtering](https://connekthq.com/plugins/ajax-load-more/examples/filtering/)** - Reset and filter an Ajax Load More instance
135
  > 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 />
136
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/cache/)
137
  >
138
+ > #### Call to Actions
139
+ > 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 />
140
+ > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/)
141
+ >
142
  > #### Comments
143
  > The **[Comments](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)** add-on will load and display blog comments using the core Ajax Load More infinite scroll functionality.<br />
144
  > [Get More Information](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/)
323
 
324
  == Changelog ==
325
 
326
+ = 2.12.0 - September 5, 2016 =
327
+ * NEW - Completed integration of new Call to Actions add-on.
328
+ * NEW - Added $.fn.almTriggerClick() public function that will easily allow users to trigger Ajax Load More from any object on the screen.
329
+ * UPDATE - Allow for post_status="inherit" for use with attachments.
330
+ * UPDATE - Adding Media (attachment) post type to the Shortcode Builder.
331
+ * UPDATE - Allow for Author slug or ID within shortcode.
332
+ * UPDATE - Updating Ajax Load More menu icon.
333
+ * UPDATE - Updating license notifications on License page.
334
+ * UPDATE - Removed blocking of SEO add-on when using multiple instances of the plugin on the same page. Users must ensure to only set seo="true" on one element if using multiple instances of Ajax load More.
335
+ * UPDATE - Updated default repeater template display on admin screen if Local Template is in use. Users will now see the contents on the Local Template but will not be able to modify the template directly.
336
+ * FIX - URL/paging issue with Polylang and SEO plugins.
337
+ * FIX - Updated code used to split pages with Search Engine Optimization add-on.
338
+
339
  = 2.11.2 - August 4, 2016 =
340
  * SECURITY - Security fix for Custom Repeaters and Theme Repeaters include file path.
341
  * FIX - Removed duplicate #ajax-load-more id's being generated when using multiple instances. #ajax-load-more will now only be attached to the 1st instance of the shortcode - please update your CSS if you are targeting the #ajax-load-more ID.
admin/admin-functions.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * alm_is_admin_screen
5
+ * Determine whether user is on an ALM admin screen
6
+ *
7
+ * @return boolean
8
+ * @since 2.12.0
9
+ */
10
+
11
+ function alm_is_admin_screen(){
12
+ $return = false;
13
+ $screen = get_current_screen();
14
+ if($screen->parent_base === 'ajax-load-more'){
15
+ $return = true;
16
+ }
17
+ return $return;
18
+ }
19
+
20
+
admin/admin.php CHANGED
@@ -9,6 +9,8 @@ add_action( 'wp_ajax_alm_layouts_dismiss', 'alm_layouts_dismiss' ); // Dismiss L
9
  add_action( 'wp_ajax_alm_license_activation', 'alm_license_activation' ); // Activate Add-on
10
  add_action( 'alm_get_layouts', 'alm_get_layouts' ); // Add layout selection
11
  add_action( 'wp_ajax_alm_layouts_get', 'alm_layouts_get' ); // Get layout
 
 
12
 
13
 
14
 
@@ -823,7 +825,25 @@ function alm_dismiss_sharing(){
823
  die();
824
  }
825
  }
826
- add_action( 'wp_ajax_alm_dismiss_sharing', 'alm_dismiss_sharing' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
827
 
828
 
829
  /*
9
  add_action( 'wp_ajax_alm_license_activation', 'alm_license_activation' ); // Activate Add-on
10
  add_action( 'alm_get_layouts', 'alm_get_layouts' ); // Add layout selection
11
  add_action( 'wp_ajax_alm_layouts_get', 'alm_layouts_get' ); // Get layout
12
+ add_action( 'wp_ajax_alm_dismiss_sharing', 'alm_dismiss_sharing' ); // Dismiss sharing
13
+ add_filter( 'admin_footer_text', 'alm_filter_admin_footer_text'); // Admin menu text
14
 
15
 
16
 
825
  die();
826
  }
827
  }
828
+
829
+
830
+
831
+ /*
832
+ * alm_filter_admin_footer_text
833
+ * Filter the WP Admin footer text only on ALM pages
834
+ *
835
+ * @since 2.12.0
836
+ */
837
+
838
+ function alm_filter_admin_footer_text( $text ) {
839
+ $screen = alm_is_admin_screen();
840
+ if(!$screen){
841
+ return;
842
+ }
843
+
844
+ echo 'Ajax Load More is made with <span style="color: #e25555;">♥</span> by <a href="https://connekthq.com" target="_blank" style="font-weight: 500;">Connekt</a> | <a href="https://connekthq.com/plugins/ajax-load-more/support/" target="_blank" style="font-weight: 500;">Get Support</a>';
845
+ }
846
+
847
 
848
 
849
  /*
admin/css/admin.css CHANGED
@@ -520,15 +520,16 @@ a.layout-hover{
520
 
521
  .ajax-load-more p.warning-callout{
522
  background-color: #cbecf7;
 
523
  color: #333;
524
  font-size: 13px;
525
  margin: 0;
526
  display: block;
527
- padding: 10px;
528
  border-radius: 3px;
529
  margin: 10px;
530
  width: auto;
531
- line-height: 1.75;
532
  }
533
  .ajax-load-more p.warning-callout strong{
534
  display: inline-block;
@@ -541,6 +542,7 @@ a.layout-hover{
541
  }
542
  .ajax-load-more p.warning-callout.notify{
543
  background-color: #ad4141;
 
544
  color: #fff;
545
  }
546
 
@@ -1229,6 +1231,7 @@ a.layout-hover{
1229
  }
1230
  .ajax-load-more h2.addon-title{
1231
  font-size: 19px !important;
 
1232
  font-weight: 600 !important;
1233
  color: #444 !important;
1234
  padding: 0;
@@ -1482,7 +1485,9 @@ table.highlight{
1482
  .ajax-load-more .cnkt-main .group.installed{
1483
  opacity: 0.7;
1484
  }
1485
-
 
 
1486
  #alm-add-ons .group img{
1487
  padding: 12px 18px 12px;
1488
  }
@@ -1677,6 +1682,23 @@ table.highlight{
1677
  border-color: transparent !important;
1678
  }
1679
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1680
 
1681
 
1682
  .license .loading{
@@ -1939,6 +1961,13 @@ table.highlight{
1939
  color: #999;
1940
  line-height: 1.3;
1941
  }
 
 
 
 
 
 
 
1942
  .ajax-load-more .CodeMirror.loading {
1943
  background: #f7f7f7 url("../img/loader-unlimited.gif") no-repeat center center;
1944
  opacity: 0.6;
520
 
521
  .ajax-load-more p.warning-callout{
522
  background-color: #cbecf7;
523
+ border-left: 5px solid #5e99ac;
524
  color: #333;
525
  font-size: 13px;
526
  margin: 0;
527
  display: block;
528
+ padding: 12px 12px 12px 17px;
529
  border-radius: 3px;
530
  margin: 10px;
531
  width: auto;
532
+ line-height: 1.55;
533
  }
534
  .ajax-load-more p.warning-callout strong{
535
  display: inline-block;
542
  }
543
  .ajax-load-more p.warning-callout.notify{
544
  background-color: #ad4141;
545
+ border-color: #903030;
546
  color: #fff;
547
  }
548
 
1231
  }
1232
  .ajax-load-more h2.addon-title{
1233
  font-size: 19px !important;
1234
+ line-height: 24px;
1235
  font-weight: 600 !important;
1236
  color: #444 !important;
1237
  padding: 0;
1485
  .ajax-load-more .cnkt-main .group.installed{
1486
  opacity: 0.7;
1487
  }
1488
+ .ajax-load-more .cnkt-main .group.installed p:before{
1489
+ display: none !important;
1490
+ }
1491
  #alm-add-ons .group img{
1492
  padding: 12px 18px 12px;
1493
  }
1682
  border-color: transparent !important;
1683
  }
1684
 
1685
+ .license .no-license{
1686
+ display: block;
1687
+ padding: 12px 10px 12px 20px;
1688
+ margin: 0 0 15px 0;
1689
+ border: 1px solid #e7e7c6;
1690
+ border-left: 5px solid #e7e7c6;
1691
+ background-color: #ffffe5;
1692
+ border-radius: 3px;
1693
+ }
1694
+ .license .no-license h4{
1695
+ margin: 0 0 3px;
1696
+ }
1697
+ .license .no-license p{
1698
+ margin: 5px 0 0;
1699
+ padding: 0;
1700
+ }
1701
+
1702
 
1703
 
1704
  .license .loading{
1961
  color: #999;
1962
  line-height: 1.3;
1963
  }
1964
+ .ajax-load-more .cm-readonly .CodeMirror{
1965
+ margin: 0 0 20px;
1966
+ opacity: 0.7;
1967
+ }
1968
+ .ajax-load-more .cm-readonly p.warning-callout{
1969
+ margin: 0 0 10px;
1970
+ }
1971
  .ajax-load-more .CodeMirror.loading {
1972
  background: #f7f7f7 url("../img/loader-unlimited.gif") no-repeat center center;
1973
  opacity: 0.6;
admin/img/add.png CHANGED
Binary file
admin/img/alm-logo-16x16.png CHANGED
Binary file
admin/includes/cta/add-ons.php CHANGED
@@ -3,7 +3,7 @@
3
  <p>Ajax Load More offers a variety of unique add-ons that will extend and enhance the core functionality of the plugin.</p>
4
  <ul>
5
  <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>
6
- <!-- <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Call to Actions">Call to Actions</a></li> -->
7
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Comments">Comments</a></li>
8
  <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>
9
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Layouts">Layouts</a></li>
3
  <p>Ajax Load More offers a variety of unique add-ons that will extend and enhance the core functionality of the plugin.</p>
4
  <ul>
5
  <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>
6
+ <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Call to Actions">Call to Actions</a></li>
7
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Comments">Comments</a></li>
8
  <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>
9
  <li><a target="blank" href="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/?utm_source=WP%20Admin&utm_medium=ALM%20Settings&utm_campaign=Layouts">Layouts</a></li>
admin/js/admin.js CHANGED
@@ -242,12 +242,14 @@ jQuery(document).ready(function($) {
242
  $('.license-title .status', parent).addClass('valid').removeClass('invalid');
243
  $('.activate.license-btn', parent).addClass('hide');
244
  $('.deactivate.license-btn', parent).removeClass('hide');
 
245
 
246
  }else{
247
  $('.license-key-field .status', parent).removeClass('active').addClass('inactive').text(alm_admin_localize.inactive);
248
  $('.license-title .status', parent).removeClass('valid').addClass('invalid');
249
  $('.activate.license-btn', parent).removeClass('hide');
250
- $('.deactivate.license-btn', parent).addClass('hide');
 
251
  }
252
 
253
  $('.loading', parent).delay(250).fadeOut(300);
242
  $('.license-title .status', parent).addClass('valid').removeClass('invalid');
243
  $('.activate.license-btn', parent).addClass('hide');
244
  $('.deactivate.license-btn', parent).removeClass('hide');
245
+ $('.no-license', parent).slideUp(200);
246
 
247
  }else{
248
  $('.license-key-field .status', parent).removeClass('active').addClass('inactive').text(alm_admin_localize.inactive);
249
  $('.license-title .status', parent).removeClass('valid').addClass('invalid');
250
  $('.activate.license-btn', parent).removeClass('hide');
251
+ $('.deactivate.license-btn', parent).addClass('hide');
252
+ $('.no-license', parent).slideDown(200);
253
  }
254
 
255
  $('.loading', parent).delay(250).fadeOut(300);
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -182,7 +182,6 @@ jQuery(document).ready(function($) {
182
  var cta = $('input[name=cta]:checked', cta_container).val();
183
  var cta_position = $('input[name=cta-position]', cta_container).val();
184
  var cta_before_after = $('select[name=cta-before-after]', cta_container).val();
185
- var cta_repeat = $('input[name=cta-repeat]', cta_container).val();
186
  var cta_repeater = $('select[name=cta-repeater-select]', cta_container).val();
187
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
188
 
@@ -191,21 +190,17 @@ jQuery(document).ready(function($) {
191
  // Standard repeater
192
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
193
  output += ' cta="'+cta+'"';
194
- output += ' cta_position="'+cta_before_after+':'+cta_position+':'+cta_repeat+'"';
195
  output += ' cta_repeater="'+cta_repeater+'"';
196
  }
197
  // Theme repeater
198
  if(cta_theme_repeater != '' && cta_theme_repeater != undefined && cta_position != '' && cta_position != null){
199
  output += ' cta="'+cta+'"';
200
- output += ' cta_position="'+cta_before_after+':'+cta_position+':'+cta_repeat+'"';
201
  output += ' cta_theme_repeater="'+cta_theme_repeater+'"';
202
  }
203
  $('#sequence-update').text(cta_position);
204
- $('#sequence-update-before-after').text(cta_before_after);
205
- if(cta_repeat == 0){
206
- cta_repeat = 'unlimited';
207
- }
208
- $('#sequence-repeat, #cta-repeat-label').text(cta_repeat);
209
  }else{
210
  $('.cta_template_wrap').slideUp(100, 'alm_easeInOutQuad');
211
  }
182
  var cta = $('input[name=cta]:checked', cta_container).val();
183
  var cta_position = $('input[name=cta-position]', cta_container).val();
184
  var cta_before_after = $('select[name=cta-before-after]', cta_container).val();
 
185
  var cta_repeater = $('select[name=cta-repeater-select]', cta_container).val();
186
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
187
 
190
  // Standard repeater
191
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
192
  output += ' cta="'+cta+'"';
193
+ output += ' cta_position="'+cta_before_after+':'+cta_position;
194
  output += ' cta_repeater="'+cta_repeater+'"';
195
  }
196
  // Theme repeater
197
  if(cta_theme_repeater != '' && cta_theme_repeater != undefined && cta_position != '' && cta_position != null){
198
  output += ' cta="'+cta+'"';
199
+ output += ' cta_position="'+cta_before_after+':'+cta_position;
200
  output += ' cta_theme_repeater="'+cta_theme_repeater+'"';
201
  }
202
  $('#sequence-update').text(cta_position);
203
+ $('#sequence-update-before-after').text(cta_before_after);
 
 
 
 
204
  }else{
205
  $('.cta_template_wrap').slideUp(100, 'alm_easeInOutQuad');
206
  }
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -84,7 +84,7 @@
84
 
85
  <div class="section-title">
86
  <h4><?php _e('CTA Positioning', 'ajax-load-more'); ?></h4>
87
- <p><?php _e('Insert call to action <strong><em id="sequence-update-before-after">before</em></strong> post #<strong><em id="sequence-update">1</em></strong> for <strong><em id="sequence-repeat">unlimited</em></strong> page(s)', 'ajax-load-more'); ?>.</p>
88
  </div>
89
  <div class="wrap">
90
  <div class="inner">
@@ -98,10 +98,6 @@
98
  <div class="spacer" style="height: 30px;"></div>
99
  <label class="full" for="cta-position"><?php _e('Post #', 'ajax-load-more'); ?>:</label>
100
  <input type="number" min="1" step="1" value="1" placeholder="1" id="cta-position" class="alm_element numbers-only" name="cta-position">
101
- <div class="clear"></div>
102
- <div class="spacer" style="height: 30px;"></div>
103
- <label class="full" for="cta-repeat"><?php _e('Repeat for', 'ajax-load-more'); ?> <strong id="cta-repeat-label">unlimited</strong> <?php _e('page(s)', 'ajax-load-more'); ?>:</label>
104
- <input type="number" min="0" step="1" value="0" placeholder="0" value="0" id="cta-repeat" class="alm_element numbers-only" name="cta-repeat">
105
 
106
  </div>
107
  </div>
@@ -721,7 +717,7 @@
721
  foreach( $types as $type ){
722
  $typeobj = get_post_type_object( $type );
723
  $name = $typeobj->name;
724
- if( $name != 'revision' && $name != 'attachment' && $name != 'nav_menu_item' && $name != 'acf'){
725
  echo '<li><input class="alm_element" type="checkbox" name="chk-'.$typeobj->name.'" id="chk-'.$typeobj->name.'" data-type="'.$typeobj->name.'"><label for="chk-'.$typeobj->name.'">'.$typeobj->labels->singular_name.'</label></li>';
726
  }
727
  }
@@ -1050,7 +1046,7 @@
1050
  <div class="clear"></div>
1051
  <hr/>
1052
  <div class="section-title">
1053
- <h4><?php _e('Post Status', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Post Status parameters are only available for logged in (admin) users. Non logged in users will only have access to view content in a \'publish\' state. ','ajax-load-more'); ?>"></a></h4>
1054
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1055
  </div>
1056
  <div class="wrap">
@@ -1063,6 +1059,7 @@
1063
  <option value="pending">Pending</option>
1064
  <option value="private">Private</option>
1065
  <option value="trash">Trash</option>
 
1066
  </select>
1067
  </div>
1068
  </div>
84
 
85
  <div class="section-title">
86
  <h4><?php _e('CTA Positioning', 'ajax-load-more'); ?></h4>
87
+ <p><?php _e('Insert call to action <strong><em id="sequence-update-before-after">before</em></strong> post #<strong><em id="sequence-update">1</em></strong>', 'ajax-load-more'); ?>.</p>
88
  </div>
89
  <div class="wrap">
90
  <div class="inner">
98
  <div class="spacer" style="height: 30px;"></div>
99
  <label class="full" for="cta-position"><?php _e('Post #', 'ajax-load-more'); ?>:</label>
100
  <input type="number" min="1" step="1" value="1" placeholder="1" id="cta-position" class="alm_element numbers-only" name="cta-position">
 
 
 
 
101
 
102
  </div>
103
  </div>
717
  foreach( $types as $type ){
718
  $typeobj = get_post_type_object( $type );
719
  $name = $typeobj->name;
720
+ if( $name != 'revision' && $name != 'nav_menu_item' && $name != 'acf'){
721
  echo '<li><input class="alm_element" type="checkbox" name="chk-'.$typeobj->name.'" id="chk-'.$typeobj->name.'" data-type="'.$typeobj->name.'"><label for="chk-'.$typeobj->name.'">'.$typeobj->labels->singular_name.'</label></li>';
722
  }
723
  }
1046
  <div class="clear"></div>
1047
  <hr/>
1048
  <div class="section-title">
1049
+ <h4><?php _e('Post Status', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Post Status parameters are only available for logged in (admin) users. Non logged in users will only have access to view content in a \'publish\' or \'inherit\' state. ','ajax-load-more'); ?>"></a></h4>
1050
  <p><?php _e('Select status of the post.', 'ajax-load-more'); ?></p>
1051
  </div>
1052
  <div class="wrap">
1059
  <option value="pending">Pending</option>
1060
  <option value="private">Private</option>
1061
  <option value="trash">Trash</option>
1062
+ <option value="inherit">Inherit</option>
1063
  </select>
1064
  </div>
1065
  </div>
admin/views/add-ons.php CHANGED
@@ -5,22 +5,21 @@
5
  <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More', 'ajax-load-more'); ?>.</p>
6
  </div>
7
  <div class="cnkt-main full">
8
-
9
-
10
- <!-- Call to Actions -->
11
- <div style="display:none !important;" class="group<?php if (has_action('alm_cta_installed')){echo ' installed'; } ?>">
12
  <div class="row no-brd">
13
  <?php
14
- $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'; ?>
15
 
16
- <a href="<?php echo $cta_url; ?>">
17
  <div class="expand-wrap">
18
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
19
- <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
20
- <p class="addon-intro"><?php _e('Ajax Load More extension for displaying advertisements and call to actions.', 'ajax-load-more'); ?></p>
21
- <p><?php _e('The Call to Actions add-on will provide the ability to inject a custom CTA template within each Ajax Load More loop.', 'ajax-load-more'); ?></p>
22
  <?php
23
- if (has_action('alm_cta_installed')){
24
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
25
  }else{
26
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
@@ -31,23 +30,23 @@
31
  </div>
32
 
33
  </div>
34
- <!-- End Call to Actions -->
35
-
36
-
37
- <!-- Cache -->
38
- <div class="group<?php if (has_action('alm_cache_installed')){echo ' installed'; } ?>">
39
  <div class="row no-brd">
40
  <?php
41
- $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
42
 
43
- <a href="<?php echo $cache_url; ?>">
44
  <div class="expand-wrap">
45
- <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cache-add-on.jpg" alt="">
46
- <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
47
- <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', 'ajax-load-more'); ?></p>
48
- <p><?php _e('The Cache add-on creates static HTML files of Ajax Load More requests then delivers those static files to your visitors.', 'ajax-load-more'); ?></p>
49
  <?php
50
- if (has_action('alm_cache_installed')){
51
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
52
  }else{
53
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
@@ -58,7 +57,8 @@
58
  </div>
59
 
60
  </div>
61
- <!-- End Cache -->
 
62
 
63
  <!-- Comments -->
64
  <div class="group<?php if (has_action('alm_comments_installed')){echo ' installed'; } ?>">
5
  <p><?php _e('Add-ons are available to extend and enhance the core functionality of Ajax Load More', 'ajax-load-more'); ?>.</p>
6
  </div>
7
  <div class="cnkt-main full">
8
+
9
+ <!-- Cache -->
10
+ <div class="group<?php if (has_action('alm_cache_installed')){echo ' installed'; } ?>">
 
11
  <div class="row no-brd">
12
  <?php
13
+ $cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/?utm_source=WP%20Admin&utm_medium=ALM%20Add-ons&utm_campaign=Cache'; ?>
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" alt="">
18
+ <h2 class="addon-title"><?php _e('Cache', 'ajax-load-more'); ?></h2>
19
+ <p class="addon-intro"><?php _e('Improve performance with the Ajax Load More caching engine.', 'ajax-load-more'); ?></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.', 'ajax-load-more'); ?></p>
21
  <?php
22
+ if (has_action('alm_cache_installed')){
23
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
24
  }else{
25
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
30
  </div>
31
 
32
  </div>
33
+ <!-- End Cache -->
34
+
35
+
36
+ <!-- Call to Actions -->
37
+ <div class="group<?php if (has_action('alm_cta_installed')){echo ' installed'; } ?>">
38
  <div class="row no-brd">
39
  <?php
40
+ $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'; ?>
41
 
42
+ <a href="<?php echo $cta_url; ?>">
43
  <div class="expand-wrap">
44
+ <img src="<?php echo ALM_ADMIN_URL; ?>img/add-ons/cta-add-on.jpg" alt="">
45
+ <h2 class="addon-title"><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
46
+ <p class="addon-intro"><?php _e('Ajax Load More extension for displaying advertisements and call to actions.', 'ajax-load-more'); ?></p>
47
+ <p><?php _e('The Call to Actions add-on will provide the ability to inject a custom CTA template within each Ajax Load More loop.', 'ajax-load-more'); ?></p>
48
  <?php
49
+ if (has_action('alm_cta_installed')){
50
  echo '<span class="cnkt-button installed"><i class="fa fa-check-square"></i> Installed</span> ';
51
  }else{
52
  echo '<span class="cnkt-button"><i class="fa fa-download"></i> Purchase &amp; Install</span>';
57
  </div>
58
 
59
  </div>
60
+ <!-- End Call to Actions -->
61
+
62
 
63
  <!-- Comments -->
64
  <div class="group<?php if (has_action('alm_comments_installed')){echo ' installed'; } ?>">
admin/views/licenses.php CHANGED
@@ -34,6 +34,7 @@
34
  // CACHE
35
  $alm_cache_license = get_option( 'alm_cache_license_key' );
36
  $alm_cache_status = get_option( 'alm_cache_license_status' );
 
37
  ?>
38
  <div class="license" id="license-cache">
39
  <div class="license-title">
@@ -43,7 +44,17 @@
43
  <div class="license-wrap">
44
  <form method="post" action="options.php">
45
 
46
- <?php settings_fields('alm_cache_license'); ?>
 
 
 
 
 
 
 
 
 
 
47
  <label class="description offscreen" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
48
  <div class="license-key-field">
49
  <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -64,7 +75,7 @@
64
  data-url="<?php echo ALM_STORE_URL; ?>"
65
  data-option-status="alm_cache_license_status"
66
  data-option-key="alm_cache_license_key"
67
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/cache/">
68
  <button type="button" class="activate license-btn <?php if($alm_cache_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
69
  <?php _e('Activate License', 'ajax-load-more'); ?>
70
  </button>
@@ -88,6 +99,7 @@
88
  // Call to Actions
89
  $alm_cta_license = get_option( 'alm_cta_license_key' );
90
  $alm_cta_status = get_option( 'alm_cta_license_status' );
 
91
  ?>
92
  <div class="license" id="license-cta">
93
  <div class="license-title">
@@ -95,9 +107,19 @@
95
  <h2><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
96
  </div>
97
  <div class="license-wrap">
98
- <form method="post" action="options.php">
 
 
 
 
 
 
 
 
 
99
 
100
- <?php settings_fields('alm_cta_license'); ?>
 
101
  <label class="description offscreen" for="alm_cta_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
102
  <div class="license-key-field">
103
  <input id="alm_cta_license_key" name="alm_cta_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cta_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -118,7 +140,7 @@
118
  data-url="<?php echo ALM_STORE_URL; ?>"
119
  data-option-status="alm_cta_license_status"
120
  data-option-key="alm_cta_license_key"
121
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/">
122
  <button type="button" class="activate license-btn <?php if($alm_cta_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
123
  <?php _e('Activate License', 'ajax-load-more'); ?>
124
  </button>
@@ -142,6 +164,7 @@
142
  // Comments
143
  $alm_comments_license = get_option( 'alm_comments_license_key' );
144
  $alm_comments_status = get_option( 'alm_comments_license_status' );
 
145
  ?>
146
  <div class="license" id="license-comments">
147
  <div class="license-title">
@@ -149,9 +172,19 @@
149
  <h2><?php _e('Comments', 'ajax-load-more'); ?></h2>
150
  </div>
151
  <div class="license-wrap">
152
- <form method="post" action="options.php">
 
 
 
 
 
 
 
 
 
153
 
154
- <?php settings_fields('alm_comments_license'); ?>
 
155
  <label class="description offscreen" for="alm_comments_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
156
  <div class="license-key-field">
157
  <input id="alm_comments_license_key" name="alm_comments_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_comments_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -172,7 +205,7 @@
172
  data-url="<?php echo ALM_STORE_URL; ?>"
173
  data-option-status="alm_comments_license_status"
174
  data-option-key="alm_comments_license_key"
175
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/">
176
  <button type="button" class="activate license-btn <?php if($alm_comments_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
177
  <?php _e('Activate License', 'ajax-load-more'); ?>
178
  </button>
@@ -197,6 +230,7 @@
197
  // Custom Repeaters
198
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
199
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
 
200
  ?>
201
  <div class="license" id="license-repeaters">
202
  <div class="license-title">
@@ -206,7 +240,17 @@
206
  <div class="license-wrap">
207
  <form method="post" action="options.php">
208
 
 
 
 
 
 
 
 
 
 
209
  <?php settings_fields('alm_unlimited_license'); ?>
 
210
  <label class="description offscreen" for="alm_unlimited_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
211
  <div class="license-key-field">
212
  <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -227,7 +271,7 @@
227
  data-url="<?php echo ALM_STORE_URL; ?>"
228
  data-option-status="alm_unlimited_license_status"
229
  data-option-key="alm_unlimited_license_key"
230
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/">
231
  <button type="button" class="activate license-btn <?php if($alm_unlimited_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
232
  <?php _e('Activate License', 'ajax-load-more'); ?>
233
  </button>
@@ -253,6 +297,7 @@
253
  // LAYOUTS
254
  $alm_layouts_license = get_option( 'alm_layouts_license_key' );
255
  $alm_layouts_status = get_option( 'alm_layouts_license_status' );
 
256
  ?>
257
  <div class="license" id="license-layouts">
258
  <div class="license-title">
@@ -260,9 +305,19 @@
260
  <h2><?php _e('Layouts', 'ajax-load-more'); ?></h2>
261
  </div>
262
  <div class="license-wrap">
263
- <form method="post" action="options.php">
264
-
 
 
 
 
 
 
 
 
 
265
  <?php settings_fields('alm_layouts_license'); ?>
 
266
  <label class="description offscreen" for="alm_layouts_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
267
  <div class="license-key-field">
268
  <input id="alm_layouts_license_key" name="alm_layouts_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_layouts_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -283,7 +338,7 @@
283
  data-url="<?php echo ALM_STORE_URL; ?>"
284
  data-option-status="alm_layouts_license_status"
285
  data-option-key="alm_layouts_license_key"
286
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/">
287
  <button type="button" class="activate license-btn <?php if($alm_layouts_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
288
  <?php _e('Activate License', 'ajax-load-more'); ?>
289
  </button>
@@ -309,6 +364,7 @@
309
  // PAGING
310
  $alm_paging_license = get_option( 'alm_paging_license_key' );
311
  $alm_paging_status = get_option( 'alm_paging_license_status' );
 
312
  ?>
313
  <div class="license" id="license-paging">
314
  <div class="license-title">
@@ -317,8 +373,18 @@
317
  </div>
318
  <div class="license-wrap">
319
  <form method="post" action="options.php">
 
 
 
 
 
 
 
 
 
320
 
321
- <?php settings_fields('alm_paging_license'); ?>
 
322
  <label class="description offscreen" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
323
  <div class="license-key-field">
324
  <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -339,7 +405,7 @@
339
  data-url="<?php echo ALM_STORE_URL; ?>"
340
  data-option-status="alm_paging_license_status"
341
  data-option-key="alm_paging_license_key"
342
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/paging/">
343
  <button type="button" class="activate license-btn <?php if($alm_paging_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
344
  <?php _e('Activate License', 'ajax-load-more'); ?>
345
  </button>
@@ -363,6 +429,7 @@
363
  // PRELOADED
364
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
365
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
 
366
  ?>
367
  <div class="license" id="license-preloaded">
368
  <div class="license-title">
@@ -372,7 +439,17 @@
372
  <div class="license-wrap">
373
  <form method="post" action="options.php">
374
 
 
 
 
 
 
 
 
 
 
375
  <?php settings_fields('alm_preloaded_license'); ?>
 
376
  <label class="description offscreen" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
377
  <div class="license-key-field">
378
  <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -392,7 +469,7 @@
392
  data-url="<?php echo ALM_STORE_URL; ?>"
393
  data-option-status="alm_preloaded_license_status"
394
  data-option-key="alm_preloaded_license_key"
395
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/">
396
  <button type="button" class="activate license-btn <?php if($alm_preloaded_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
397
  <?php _e('Activate License', 'ajax-load-more'); ?>
398
  </button>
@@ -416,6 +493,7 @@
416
  // PREVIOUS POST
417
  $alm_prev_post_license = get_option( 'alm_prev_post_license_key' );
418
  $alm_prev_post_status = get_option( 'alm_prev_post_license_status' );
 
419
  ?>
420
  <div class="license" id="license-previous-post">
421
  <div class="license-title">
@@ -423,9 +501,19 @@
423
  <h2><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
424
  </div>
425
  <div class="license-wrap">
426
- <form method="post" action="options.php">
427
-
428
- <?php settings_fields('alm_prev_post_license'); ?>
 
 
 
 
 
 
 
 
 
 
429
  <label class="description offscreen" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
430
  <div class="license-key-field">
431
  <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', 'ajax-load-more'); ?>" />
@@ -446,7 +534,7 @@
446
  data-url="<?php echo ALM_STORE_URL; ?>"
447
  data-option-status="alm_prev_post_license_status"
448
  data-option-key="alm_prev_post_license_key"
449
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/">
450
  <button type="button" class="activate license-btn <?php if($alm_prev_post_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
451
  <?php _e('Activate License', 'ajax-load-more'); ?>
452
  </button>
@@ -471,6 +559,7 @@
471
  // REST API
472
  $alm_restapi_license = get_option( 'alm_rest_api_license_key' );
473
  $alm_restapi_status = get_option( 'alm_rest_api_license_status' );
 
474
  ?>
475
  <div class="license" id="license-rest">
476
  <div class="license-title">
@@ -479,8 +568,18 @@
479
  </div>
480
  <div class="license-wrap">
481
  <form method="post" action="options.php">
482
-
 
 
 
 
 
 
 
 
 
483
  <?php settings_fields('alm_rest_api_license'); ?>
 
484
  <label class="description offscreen" for="alm_rest_api_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
485
  <div class="license-key-field">
486
  <input id="alm_rest_api_license_key" name="alm_rest_api_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_restapi_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -501,7 +600,7 @@
501
  data-url="<?php echo ALM_STORE_URL; ?>"
502
  data-option-status="alm_rest_api_license_status"
503
  data-option-key="alm_rest_api_license_key"
504
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/">
505
  <button type="button" class="activate license-btn <?php if($alm_restapi_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
506
  <?php _e('Activate License', 'ajax-load-more'); ?>
507
  </button>
@@ -526,6 +625,7 @@
526
  // SEO
527
  $alm_seo_license = get_option( 'alm_seo_license_key' );
528
  $alm_seo_status = get_option( 'alm_seo_license_status' );
 
529
  ?>
530
  <div class="license" id="license-seo">
531
  <div class="license-title">
@@ -533,9 +633,19 @@
533
  <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
534
  </div>
535
  <div class="license-wrap">
536
- <form method="post" action="options.php">
537
-
 
 
 
 
 
 
 
 
 
538
  <?php settings_fields('alm_seo_license'); ?>
 
539
  <label class="description offscreen" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
540
  <div class="license-key-field">
541
  <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -556,7 +666,7 @@
556
  data-url="<?php echo ALM_STORE_URL; ?>"
557
  data-option-status="alm_seo_license_status"
558
  data-option-key="alm_seo_license_key"
559
- data-upgrade-url="https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/">
560
  <button type="button" class="activate license-btn <?php if($alm_seo_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
561
  <?php _e('Activate License', 'ajax-load-more'); ?>
562
  </button>
@@ -583,6 +693,7 @@
583
 
584
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
585
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
 
586
  ?>
587
  <div class="license" id="license-theme_repeaters">
588
  <div class="license-title">
@@ -591,8 +702,18 @@
591
  </div>
592
  <div class="license-wrap">
593
  <form method="post" action="options.php">
594
-
595
- <?php settings_fields('alm_theme_repeaters_license'); ?>
 
 
 
 
 
 
 
 
 
 
596
  <label class="description offscreen" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
597
  <div class="license-key-field">
598
  <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_theme_repeaters_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
@@ -611,7 +732,7 @@
611
  <div class="license-btn-wrap"
612
  data-name="<?php echo ALM_THEME_REPEATERS_ITEM_NAME; ?>"
613
  data-url="<?php echo ALM_STORE_URL; ?>"
614
- data-upgrade-url="http://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/"
615
  data-option-status="alm_theme_repeaters_license_status"
616
  data-option-key="alm_theme_repeaters_license_key"
617
  >
34
  // CACHE
35
  $alm_cache_license = get_option( 'alm_cache_license_key' );
36
  $alm_cache_status = get_option( 'alm_cache_license_status' );
37
+ $alm_cache_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/cache/';
38
  ?>
39
  <div class="license" id="license-cache">
40
  <div class="license-title">
44
  <div class="license-wrap">
45
  <form method="post" action="options.php">
46
 
47
+ <?php if( $alm_cache_status !== false && $alm_cache_status == 'valid' ) { ?>
48
+ <!-- nothing -->
49
+ <?php } else { ?>
50
+ <div class="no-license">
51
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
52
+ <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_cache_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Cache" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
53
+ </div>
54
+ <?php } ?>
55
+
56
+ <?php settings_fields('alm_cache_license'); ?>
57
+
58
  <label class="description offscreen" for="alm_cache_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
59
  <div class="license-key-field">
60
  <input id="alm_cache_license_key" name="alm_cache_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cache_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
75
  data-url="<?php echo ALM_STORE_URL; ?>"
76
  data-option-status="alm_cache_license_status"
77
  data-option-key="alm_cache_license_key"
78
+ data-upgrade-url="<?php echo $alm_cache_url; ?>">
79
  <button type="button" class="activate license-btn <?php if($alm_cache_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
80
  <?php _e('Activate License', 'ajax-load-more'); ?>
81
  </button>
99
  // Call to Actions
100
  $alm_cta_license = get_option( 'alm_cta_license_key' );
101
  $alm_cta_status = get_option( 'alm_cta_license_status' );
102
+ $alm_cta_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/call-to-actions/';
103
  ?>
104
  <div class="license" id="license-cta">
105
  <div class="license-title">
107
  <h2><?php _e('Call to Actions', 'ajax-load-more'); ?></h2>
108
  </div>
109
  <div class="license-wrap">
110
+ <form method="post" action="options.php">
111
+
112
+ <?php if( $alm_cta_status !== false && $alm_cta_status == 'valid' ) { ?>
113
+ <!-- nothing -->
114
+ <?php } else { ?>
115
+ <div class="no-license">
116
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
117
+ <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_cta_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=CTA" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
118
+ </div>
119
+ <?php } ?>
120
 
121
+ <?php settings_fields('alm_cta_license'); ?>
122
+
123
  <label class="description offscreen" for="alm_cta_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
124
  <div class="license-key-field">
125
  <input id="alm_cta_license_key" name="alm_cta_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_cta_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
140
  data-url="<?php echo ALM_STORE_URL; ?>"
141
  data-option-status="alm_cta_license_status"
142
  data-option-key="alm_cta_license_key"
143
+ data-upgrade-url="<?php echo $alm_cta_url; ?>">
144
  <button type="button" class="activate license-btn <?php if($alm_cta_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
145
  <?php _e('Activate License', 'ajax-load-more'); ?>
146
  </button>
164
  // Comments
165
  $alm_comments_license = get_option( 'alm_comments_license_key' );
166
  $alm_comments_status = get_option( 'alm_comments_license_status' );
167
+ $alm_comments_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/comments/';
168
  ?>
169
  <div class="license" id="license-comments">
170
  <div class="license-title">
172
  <h2><?php _e('Comments', 'ajax-load-more'); ?></h2>
173
  </div>
174
  <div class="license-wrap">
175
+ <form method="post" action="options.php">
176
+
177
+ <?php if( $alm_comments_status !== false && $alm_comments_status == 'valid' ) { ?>
178
+ <!-- nothing -->
179
+ <?php } else { ?>
180
+ <div class="no-license">
181
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
182
+ <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_comments_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Comments" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
183
+ </div>
184
+ <?php } ?>
185
 
186
+ <?php settings_fields('alm_comments_license'); ?>
187
+
188
  <label class="description offscreen" for="alm_comments_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
189
  <div class="license-key-field">
190
  <input id="alm_comments_license_key" name="alm_comments_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_comments_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
205
  data-url="<?php echo ALM_STORE_URL; ?>"
206
  data-option-status="alm_comments_license_status"
207
  data-option-key="alm_comments_license_key"
208
+ data-upgrade-url="<?php echo $alm_comments_url; ?>">
209
  <button type="button" class="activate license-btn <?php if($alm_comments_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
210
  <?php _e('Activate License', 'ajax-load-more'); ?>
211
  </button>
230
  // Custom Repeaters
231
  $alm_unlimited_license = get_option( 'alm_unlimited_license_key' );
232
  $alm_unlimited_status = get_option( 'alm_unlimited_license_status' );
233
+ $alm_unlimited_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/custom-repeaters/';
234
  ?>
235
  <div class="license" id="license-repeaters">
236
  <div class="license-title">
240
  <div class="license-wrap">
241
  <form method="post" action="options.php">
242
 
243
+ <?php if( $alm_unlimited_status !== false && $alm_unlimited_status == 'valid' ) { ?>
244
+ <!-- nothing -->
245
+ <?php } else { ?>
246
+ <div class="no-license">
247
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
248
+ <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_unlimited_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Custom Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
249
+ </div>
250
+ <?php } ?>
251
+
252
  <?php settings_fields('alm_unlimited_license'); ?>
253
+
254
  <label class="description offscreen" for="alm_unlimited_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
255
  <div class="license-key-field">
256
  <input id="alm_unlimited_license_key" name="alm_unlimited_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_unlimited_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
271
  data-url="<?php echo ALM_STORE_URL; ?>"
272
  data-option-status="alm_unlimited_license_status"
273
  data-option-key="alm_unlimited_license_key"
274
+ data-upgrade-url="<?php echo $alm_unlimited_url; ?>">
275
  <button type="button" class="activate license-btn <?php if($alm_unlimited_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
276
  <?php _e('Activate License', 'ajax-load-more'); ?>
277
  </button>
297
  // LAYOUTS
298
  $alm_layouts_license = get_option( 'alm_layouts_license_key' );
299
  $alm_layouts_status = get_option( 'alm_layouts_license_status' );
300
+ $alm_layouts_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/layouts/';
301
  ?>
302
  <div class="license" id="license-layouts">
303
  <div class="license-title">
305
  <h2><?php _e('Layouts', 'ajax-load-more'); ?></h2>
306
  </div>
307
  <div class="license-wrap">
308
+ <form method="post" action="options.php">
309
+
310
+ <?php if( $alm_layouts_status !== false && $alm_layouts_status == 'valid' ) { ?>
311
+ <!-- nothing -->
312
+ <?php } else { ?>
313
+ <div class="no-license">
314
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
315
+ <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_layouts_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Layouts" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
316
+ </div>
317
+ <?php } ?>
318
+
319
  <?php settings_fields('alm_layouts_license'); ?>
320
+
321
  <label class="description offscreen" for="alm_layouts_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
322
  <div class="license-key-field">
323
  <input id="alm_layouts_license_key" name="alm_layouts_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_layouts_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
338
  data-url="<?php echo ALM_STORE_URL; ?>"
339
  data-option-status="alm_layouts_license_status"
340
  data-option-key="alm_layouts_license_key"
341
+ data-upgrade-url="<?php echo $alm_layouts_url; ?>">
342
  <button type="button" class="activate license-btn <?php if($alm_layouts_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
343
  <?php _e('Activate License', 'ajax-load-more'); ?>
344
  </button>
364
  // PAGING
365
  $alm_paging_license = get_option( 'alm_paging_license_key' );
366
  $alm_paging_status = get_option( 'alm_paging_license_status' );
367
+ $alm_paging_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/paging/';
368
  ?>
369
  <div class="license" id="license-paging">
370
  <div class="license-title">
373
  </div>
374
  <div class="license-wrap">
375
  <form method="post" action="options.php">
376
+
377
+ <?php if( $alm_paging_status !== false && $alm_paging_status == 'valid' ) { ?>
378
+ <!-- nothing -->
379
+ <?php } else { ?>
380
+ <div class="no-license">
381
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
382
+ <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_paging_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Paging" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
383
+ </div>
384
+ <?php } ?>
385
 
386
+ <?php settings_fields('alm_paging_license'); ?>
387
+
388
  <label class="description offscreen" for="alm_paging_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
389
  <div class="license-key-field">
390
  <input id="alm_paging_license_key" name="alm_paging_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_paging_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
405
  data-url="<?php echo ALM_STORE_URL; ?>"
406
  data-option-status="alm_paging_license_status"
407
  data-option-key="alm_paging_license_key"
408
+ data-upgrade-url="<?php echo $alm_paging_url; ?>">
409
  <button type="button" class="activate license-btn <?php if($alm_paging_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
410
  <?php _e('Activate License', 'ajax-load-more'); ?>
411
  </button>
429
  // PRELOADED
430
  $alm_preloaded_license = get_option( 'alm_preloaded_license_key' );
431
  $alm_preloaded_status = get_option( 'alm_preloaded_license_status' );
432
+ $alm_preloaded_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/';
433
  ?>
434
  <div class="license" id="license-preloaded">
435
  <div class="license-title">
439
  <div class="license-wrap">
440
  <form method="post" action="options.php">
441
 
442
+ <?php if( $alm_preloaded_status !== false && $alm_preloaded_status == 'valid' ) { ?>
443
+ <!-- nothing -->
444
+ <?php } else { ?>
445
+ <div class="no-license">
446
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
447
+ <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_preloaded_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Preloaded" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
448
+ </div>
449
+ <?php } ?>
450
+
451
  <?php settings_fields('alm_preloaded_license'); ?>
452
+
453
  <label class="description offscreen" for="alm_preloaded_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
454
  <div class="license-key-field">
455
  <input id="alm_preloaded_license_key" name="alm_preloaded_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_preloaded_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
469
  data-url="<?php echo ALM_STORE_URL; ?>"
470
  data-option-status="alm_preloaded_license_status"
471
  data-option-key="alm_preloaded_license_key"
472
+ data-upgrade-url="<?php echo $alm_preloaded_url; ?>">
473
  <button type="button" class="activate license-btn <?php if($alm_preloaded_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
474
  <?php _e('Activate License', 'ajax-load-more'); ?>
475
  </button>
493
  // PREVIOUS POST
494
  $alm_prev_post_license = get_option( 'alm_prev_post_license_key' );
495
  $alm_prev_post_status = get_option( 'alm_prev_post_license_status' );
496
+ $alm_prev_post_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/';
497
  ?>
498
  <div class="license" id="license-previous-post">
499
  <div class="license-title">
501
  <h2><?php _e('Previous Post', 'ajax-load-more'); ?></h2>
502
  </div>
503
  <div class="license-wrap">
504
+ <form method="post" action="options.php">
505
+
506
+ <?php if( $alm_prev_post_status !== false && $alm_prev_post_status == 'valid' ) { ?>
507
+ <!-- nothing -->
508
+ <?php } else { ?>
509
+ <div class="no-license">
510
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
511
+ <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_prev_post_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Previous Post" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
512
+ </div>
513
+ <?php } ?>
514
+
515
+ <?php settings_fields('alm_prev_post_license'); ?>
516
+
517
  <label class="description offscreen" for="alm_prev_post_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
518
  <div class="license-key-field">
519
  <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', 'ajax-load-more'); ?>" />
534
  data-url="<?php echo ALM_STORE_URL; ?>"
535
  data-option-status="alm_prev_post_license_status"
536
  data-option-key="alm_prev_post_license_key"
537
+ data-upgrade-url="<?php echo $alm_prev_post_url; ?>">
538
  <button type="button" class="activate license-btn <?php if($alm_prev_post_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
539
  <?php _e('Activate License', 'ajax-load-more'); ?>
540
  </button>
559
  // REST API
560
  $alm_restapi_license = get_option( 'alm_rest_api_license_key' );
561
  $alm_restapi_status = get_option( 'alm_rest_api_license_status' );
562
+ $alm_restapi_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/rest-api/';
563
  ?>
564
  <div class="license" id="license-rest">
565
  <div class="license-title">
568
  </div>
569
  <div class="license-wrap">
570
  <form method="post" action="options.php">
571
+
572
+ <?php if( $alm_restapi_status !== false && $alm_restapi_status == 'valid' ) { ?>
573
+ <!-- nothing -->
574
+ <?php } else { ?>
575
+ <div class="no-license">
576
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
577
+ <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_restapi_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=RESTAPI" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
578
+ </div>
579
+ <?php } ?>
580
+
581
  <?php settings_fields('alm_rest_api_license'); ?>
582
+
583
  <label class="description offscreen" for="alm_rest_api_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
584
  <div class="license-key-field">
585
  <input id="alm_rest_api_license_key" name="alm_rest_api_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_restapi_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
600
  data-url="<?php echo ALM_STORE_URL; ?>"
601
  data-option-status="alm_rest_api_license_status"
602
  data-option-key="alm_rest_api_license_key"
603
+ data-upgrade-url="<?php echo $alm_restapi_url; ?>">
604
  <button type="button" class="activate license-btn <?php if($alm_restapi_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
605
  <?php _e('Activate License', 'ajax-load-more'); ?>
606
  </button>
625
  // SEO
626
  $alm_seo_license = get_option( 'alm_seo_license_key' );
627
  $alm_seo_status = get_option( 'alm_seo_license_status' );
628
+ $alm_seo_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/';
629
  ?>
630
  <div class="license" id="license-seo">
631
  <div class="license-title">
633
  <h2><?php _e('Search Engine Optimization', 'ajax-load-more'); ?></h2>
634
  </div>
635
  <div class="license-wrap">
636
+ <form method="post" action="options.php">
637
+
638
+ <?php if( $alm_seo_status !== false && $alm_seo_status == 'valid' ) { ?>
639
+ <!-- nothing -->
640
+ <?php } else { ?>
641
+ <div class="no-license">
642
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
643
+ <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_seo_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=SEO" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
644
+ </div>
645
+ <?php } ?>
646
+
647
  <?php settings_fields('alm_seo_license'); ?>
648
+
649
  <label class="description offscreen" for="alm_seo_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
650
  <div class="license-key-field">
651
  <input id="alm_seo_license_key" name="alm_seo_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_seo_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
666
  data-url="<?php echo ALM_STORE_URL; ?>"
667
  data-option-status="alm_seo_license_status"
668
  data-option-key="alm_seo_license_key"
669
+ data-upgrade-url="<?php echo $alm_seo_url; ?>">
670
  <button type="button" class="activate license-btn <?php if($alm_seo_status === 'valid'){ echo 'hide'; } ?> button-primary" data-type="activate">
671
  <?php _e('Activate License', 'ajax-load-more'); ?>
672
  </button>
693
 
694
  $alm_theme_repeaters_license = get_option( 'alm_theme_repeaters_license_key' );
695
  $alm_theme_repeaters_status = get_option( 'alm_theme_repeaters_license_status' );
696
+ $alm_theme_repeaters_url = 'https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/';
697
  ?>
698
  <div class="license" id="license-theme_repeaters">
699
  <div class="license-title">
702
  </div>
703
  <div class="license-wrap">
704
  <form method="post" action="options.php">
705
+
706
+ <?php if( $alm_theme_repeaters_status !== false && $alm_theme_repeaters_status == 'valid' ) { ?>
707
+ <!-- nothing -->
708
+ <?php } else { ?>
709
+ <div class="no-license">
710
+ <h4><?php _e('Don\'t have a license?', 'ajax-load-more'); ?></h4>
711
+ <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_theme_repeaters_url; ?>?utm_source=WP%20Admin&utm_medium=Licenses&utm_campaign=Theme Repeaters" target="blank"><strong><?php _e('Purchase Now', 'ajax-load-more'); ?>!</strong></a></p>
712
+ </div>
713
+ <?php } ?>
714
+
715
+ <?php settings_fields('alm_theme_repeaters_license'); ?>
716
+
717
  <label class="description offscreen" for="alm_theme_repeaters_license_key"><?php _e('Enter License Key', 'ajax-load-more'); ?></label>
718
  <div class="license-key-field">
719
  <input id="alm_theme_repeaters_license_key" name="alm_theme_repeaters_license_key" type="text" class="regular-text" value="<?php esc_attr_e( $alm_theme_repeaters_license ); ?>" placeholder="<?php _e('Enter License Key', 'ajax-load-more'); ?>" />
732
  <div class="license-btn-wrap"
733
  data-name="<?php echo ALM_THEME_REPEATERS_ITEM_NAME; ?>"
734
  data-url="<?php echo ALM_STORE_URL; ?>"
735
+ data-upgrade-url="<?php echo $alm_theme_repeaters_url; ?>"
736
  data-option-status="alm_theme_repeaters_license_status"
737
  data-option-key="alm_theme_repeaters_license_key"
738
  >
admin/views/repeater-templates.php CHANGED
@@ -7,28 +7,44 @@
7
  <div class="cnkt-main form-table repeaters">
8
  <!-- Repeaters -->
9
  <div class="group">
10
- <?php
11
- if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
 
12
  <span class="toggle-all">
13
  <span class="inner-wrap">
14
  <em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em>
15
  <em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em>
16
  </span>
17
  </span>
18
- <?php } ?>
 
19
  <!-- Default Template -->
20
  <div class="row template default-repeater">
21
- <?php
22
- global $wpdb;
23
- $table_name = $wpdb->prefix . "alm";
24
- $blog_id = $wpdb->blogid;
25
- if($blog_id > 1){
26
- $filename = ALM_PATH. 'core/repeater/'. $blog_id .'/default.php';
27
- }else{
28
- $filename = ALM_PATH. 'core/repeater/default.php';
29
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
- $handle = fopen ($filename, "r");
32
  $contents = '';
33
  if(filesize ($filename) != 0){
34
  $contents = fread ($handle, filesize ($filename));
@@ -37,7 +53,7 @@
37
  ?>
38
  <h3 class="heading"><?php _e('Default Template', 'ajax-load-more'); ?></h3>
39
  <div class="expand-wrap">
40
- <div class="wrap repeater-wrap" data-name="default" data-type="default">
41
  <label class="template-title" for="template-default">
42
  <?php _e('Enter the HTML and PHP code for the default template', 'ajax-load-more'); ?>:
43
  </label>
@@ -53,16 +69,22 @@
53
  lineWrapping: true,
54
  indentUnit: 0,
55
  matchBrackets: true,
 
56
  viewportMargin: Infinity,
57
  extraKeys: {"Ctrl-Space": "autocomplete"},
58
  });
59
- </script>
 
60
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
61
  <div class="saved-response">&nbsp;</div>
62
- <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
 
 
 
63
  </div>
64
  </div>
65
  </div>
 
66
  <!-- End Default Template -->
67
 
68
  <?php
@@ -73,11 +95,12 @@
73
  echo '</div>';
74
  }
75
 
76
- if (has_action('alm_custom_repeaters')) // List custom repeaters v1
77
  do_action('alm_custom_repeaters');
78
-
79
- if (has_action('alm_unlimited_repeaters')) // List custom repeaters v2
80
  do_action('alm_unlimited_repeaters');
 
81
  ?>
82
 
83
  <script>
7
  <div class="cnkt-main form-table repeaters">
8
  <!-- Repeaters -->
9
  <div class="group">
10
+
11
+ <?php
12
+ if (has_action('alm_custom_repeaters') || has_action('alm_unlimited_repeaters')){ ?>
13
  <span class="toggle-all">
14
  <span class="inner-wrap">
15
  <em class="collapse"><?php _e('Collapse All', 'ajax-load-more'); ?></em>
16
  <em class="expand"><?php _e('Expand All', 'ajax-load-more'); ?></em>
17
  </span>
18
  </span>
19
+ <?php } ?>
20
+
21
  <!-- Default Template -->
22
  <div class="row template default-repeater">
23
+
24
+ <?php
25
+
26
+ // Check for local repeater template
27
+ $local_template = false;
28
+ $readOnly = 'false';
29
+ $template_dir = 'alm_templates';
30
+ if(is_child_theme()){
31
+ $template_theme_file = get_stylesheet_directory().'/'. $template_dir .'/default.php';
32
+ if(!file_exists($template_theme_file)){
33
+ $template_theme_file = get_template_directory().'/'. $template_dir .'/default.php';
34
+ }
35
+ }
36
+ else{
37
+ $template_theme_file = get_template_directory().'/'. $template_dir .'/default.php';
38
+ }
39
+ // if theme or child theme contains the template, use that file
40
+ if(file_exists($template_theme_file)){
41
+ $local_template = true;
42
+ $readOnly = true;
43
+ }
44
+
45
+ $filename = alm_get_default_repeater(); // Get default repeater template
46
 
47
+ $handle = fopen ($filename, "r"); // Open file
48
  $contents = '';
49
  if(filesize ($filename) != 0){
50
  $contents = fread ($handle, filesize ($filename));
53
  ?>
54
  <h3 class="heading"><?php _e('Default Template', 'ajax-load-more'); ?></h3>
55
  <div class="expand-wrap">
56
+ <div class="wrap repeater-wrap<?php if($local_template){ echo ' cm-readonly'; } ?>" data-name="default" data-type="default">
57
  <label class="template-title" for="template-default">
58
  <?php _e('Enter the HTML and PHP code for the default template', 'ajax-load-more'); ?>:
59
  </label>
69
  lineWrapping: true,
70
  indentUnit: 0,
71
  matchBrackets: true,
72
+ readOnly: <?php echo $readOnly; ?>,
73
  viewportMargin: Infinity,
74
  extraKeys: {"Ctrl-Space": "autocomplete"},
75
  });
76
+ </script>
77
+ <?php if(!$local_template){ ?>
78
  <input type="submit" value="<?php _e('Save Template', 'ajax-load-more'); ?>" class="button button-primary save-repeater" data-editor-id="template-default">
79
  <div class="saved-response">&nbsp;</div>
80
+ <?php include( ALM_PATH . 'admin/includes/components/repeater-options.php'); ?>
81
+ <?php } else { ?>
82
+ <p class="warning-callout"><?php _e('It appears you are loading the <a href="https://connekthq.com/plugins/ajax-load-more/docs/repeater-templates/#default-template" target="_blank"><b>default template</b></a> (<em>default.php</em>) from your current theme directory. To modify this template, you must edit the file directly on your server.', 'ajax-load-more'); ?></p>
83
+ <?php } ?>
84
  </div>
85
  </div>
86
  </div>
87
+
88
  <!-- End Default Template -->
89
 
90
  <?php
95
  echo '</div>';
96
  }
97
 
98
+ if (has_action('alm_custom_repeaters')){ // List custom repeaters v1
99
  do_action('alm_custom_repeaters');
100
+ }
101
+ if (has_action('alm_unlimited_repeaters')){ // List custom repeaters v2
102
  do_action('alm_unlimited_repeaters');
103
+ }
104
  ?>
105
 
106
  <script>
ajax-load-more.php CHANGED
@@ -7,14 +7,14 @@ Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
- Version: 2.11.2
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
- define('ALM_VERSION', '2.11.2');
17
- define('ALM_RELEASE', 'August 4, 2016');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
@@ -178,6 +178,7 @@ if( !class_exists('AjaxLoadMore') ):
178
  if( is_admin() ){
179
  include_once('admin/editor/editor.php');
180
  include_once('admin/admin.php');
 
181
  }
182
 
183
  }
@@ -319,7 +320,7 @@ if( !class_exists('AjaxLoadMore') ):
319
 
320
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
321
 
322
- $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
323
 
324
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
325
  $type = alm_get_repeater_type($repeater);
@@ -360,7 +361,19 @@ if( !class_exists('AjaxLoadMore') ):
360
 
361
  $s = (isset($_GET['search'])) ? $_GET['search'] : '';
362
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
363
- $author_id = (isset($_GET['author'])) ? $_GET['author'] : '';
 
 
 
 
 
 
 
 
 
 
 
 
364
 
365
  // Ordering
366
  $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
@@ -373,8 +386,8 @@ if( !class_exists('AjaxLoadMore') ):
373
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
374
  $post_status = $_GET['post_status'];
375
  if($post_status == '') $post_status = 'publish';
376
- if($post_status != 'publish'){
377
- // If not 'publish', confirm user has rights to view these old posts.
378
  if (current_user_can( 'edit_theme_options' )){
379
  $post_status = $post_status;
380
  } else {
@@ -401,17 +414,10 @@ if( !class_exists('AjaxLoadMore') ):
401
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
402
  if($ctaData){
403
  $cta = true;
404
- $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1:0';
405
  $cta_position_array = explode(":", $cta_position);
406
  $cta_pos = (string)$cta_position_array[0];
407
  $cta_val = (string)$cta_position_array[1];
408
- $cta_repeat = (string)$cta_position_array[2];
409
- if($cta_repeat == 0){
410
- $cta_repeat = 9999;
411
- }
412
- if($preloaded == 'true'){
413
- $cta_repeat = $cta_repeat - 1;
414
- }
415
  if($cta_pos != 'after'){
416
  $cta_pos = 'before';
417
  }
@@ -640,17 +646,40 @@ if( !class_exists('AjaxLoadMore') ):
640
  }
641
 
642
 
643
- // Previous Post Add-on
644
- // Hijack $args and and return previous post only
 
 
 
 
 
645
  if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
646
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
647
- }
648
-
 
 
 
 
 
 
 
 
 
649
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
650
 
 
 
 
 
 
 
 
 
651
  $alm_query = new WP_Query( $args ); // WP_Query()
652
 
653
- // If preload, set our loop count and total posts to
 
654
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
655
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
656
  if($old_offset > 0)
@@ -662,7 +691,8 @@ if( !class_exists('AjaxLoadMore') ):
662
  $alm_loop_count = 0;
663
  }
664
 
665
- // Create cache directory
 
666
  if(!empty($cache_id) && has_action('alm_cache_create_dir')){
667
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
668
  $page_cache = ''; // set our page cache variable
@@ -672,9 +702,10 @@ if( !class_exists('AjaxLoadMore') ):
672
  if($queryType === 'standard'){
673
 
674
  // Run the loop
675
- if ($alm_query->have_posts()) :
 
676
 
677
- $alm_found_posts = $alm_total_posts;
678
  $alm_post_count = $alm_query->post_count;
679
  $alm_current = 0;
680
  $alm_has_cta = false;
@@ -682,23 +713,26 @@ if( !class_exists('AjaxLoadMore') ):
682
  $cta_array = Array();
683
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
684
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $cta_repeat);
685
- }
686
 
687
  ob_start();
688
 
689
- // ALM Loop
 
690
  while ($alm_query->have_posts()): $alm_query->the_post();
691
 
692
  $alm_loop_count++;
693
  $alm_current++;
694
  $alm_page = $alm_page_count; // Get page number
695
  $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
696
-
 
697
  // Call to Action [Before]
698
- if($cta && has_action('alm_cta_inc') && $cta_pos == 'before' && in_array($alm_current, $cta_array)){
699
- do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $type, $alm_found_posts, $alm_page, $alm_item, $alm_current);
700
  $alm_has_cta = true;
701
- }
 
702
 
703
  // Repeater Template
704
  if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater
@@ -710,13 +744,14 @@ if( !class_exists('AjaxLoadMore') ):
710
 
711
 
712
  // Call to Action [After]
713
- if($cta && has_action('alm_cta_inc') && $cta_pos == 'after' && in_array($alm_current, $cta_array)){
714
- do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $type, $alm_found_posts, $alm_page, $alm_item, $alm_current);
715
  $alm_has_cta = true;
716
  }
717
 
718
 
719
  endwhile; wp_reset_query();
 
720
  // End ALM Loop
721
 
722
  $data = ob_get_clean();
@@ -733,20 +768,21 @@ if( !class_exists('AjaxLoadMore') ):
733
  'postcount' => $alm_post_count,
734
  'totalposts' => $alm_found_posts
735
  )
736
- );
737
-
738
  wp_send_json($return);
739
 
740
- else :
741
 
742
  $return = array(
743
  'html' => null,
744
- 'meta' => null
745
- );
746
-
 
 
747
  wp_send_json($return);
748
 
749
- endif;
750
 
751
  }elseif($queryType === 'totalposts'){
752
 
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
  Author URI: http://connekthq.com
10
+ Version: 2.12.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
+ define('ALM_VERSION', '2.12.0');
17
+ define('ALM_RELEASE', 'September 5, 2016');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
178
  if( is_admin() ){
179
  include_once('admin/editor/editor.php');
180
  include_once('admin/admin.php');
181
+ include_once('admin/admin-functions.php');
182
  }
183
 
184
  }
320
 
321
  $queryType = (isset($_GET['query_type'])) ? $_GET['query_type'] : 'standard'; // 'standard' or 'totalposts'; totalposts returns $alm_found_posts
322
 
323
+ $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
324
 
325
  $repeater = (isset($_GET['repeater'])) ? $_GET['repeater'] : 'default';
326
  $type = alm_get_repeater_type($repeater);
361
 
362
  $s = (isset($_GET['search'])) ? $_GET['search'] : '';
363
  $custom_args = (isset($_GET['custom_args'])) ? $_GET['custom_args'] : '';
364
+
365
+ // Author
366
+ $author = (isset($_GET['author'])) ? $_GET['author'] : '';
367
+ if(!is_numeric($author) && $author !== '') {
368
+ $author = get_user_by('slug', $author); // Allow access to authors via slug
369
+ if($author){
370
+ $author_id = (isset($author)) ? $author->ID : '';
371
+ }else{
372
+ $author_id = '';
373
+ }
374
+ } else {
375
+ $author_id = $author;
376
+ }
377
 
378
  // Ordering
379
  $order = (isset($_GET['order'])) ? $_GET['order'] : 'DESC';
386
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
387
  $post_status = $_GET['post_status'];
388
  if($post_status == '') $post_status = 'publish';
389
+ if($post_status != 'publish' || $post_status != 'inherit'){
390
+ // If not 'publish', OR 'inherit' confirm user has rights to view these old posts.
391
  if (current_user_can( 'edit_theme_options' )){
392
  $post_status = $post_status;
393
  } else {
414
  $ctaData = (isset($_GET['cta'])) ? $_GET['cta'] : '';
415
  if($ctaData){
416
  $cta = true;
417
+ $cta_position = (isset($ctaData['cta_position'])) ? $ctaData['cta_position'] : 'before:1';
418
  $cta_position_array = explode(":", $cta_position);
419
  $cta_pos = (string)$cta_position_array[0];
420
  $cta_val = (string)$cta_position_array[1];
 
 
 
 
 
 
 
421
  if($cta_pos != 'after'){
422
  $cta_pos = 'before';
423
  }
646
  }
647
 
648
 
649
+ /*
650
+ * alm_prev_post_args
651
+ *
652
+ * Hijack $args and and return previous post only $args
653
+ *
654
+ * @return $args;
655
+ */
656
  if($is_previous_post == 'true' && has_action('alm_prev_post_installed')){
657
  $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
658
+ }
659
+
660
+
661
+
662
+ /*
663
+ * alm_modify_query_args
664
+ *
665
+ * ALM Core Filter Hook
666
+ *
667
+ * @return $args;
668
+ */
669
  $args = apply_filters('alm_modify_query_args', $args, $slug); // ALM Core Filter Hook
670
 
671
+
672
+ /*
673
+ * WP_Query
674
+ *
675
+ * ALM Query
676
+ *
677
+ * @return $alm_query;
678
+ */
679
  $alm_query = new WP_Query( $args ); // WP_Query()
680
 
681
+
682
+ // If preload, update our loop count and total posts
683
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
684
  $alm_total_posts = $alm_query->found_posts - $offset + $preloaded_amount;
685
  if($old_offset > 0)
691
  $alm_loop_count = 0;
692
  }
693
 
694
+
695
+ // Create cache directory + meta .txt file
696
  if(!empty($cache_id) && has_action('alm_cache_create_dir')){
697
  apply_filters('alm_cache_create_dir', $cache_id, $canonical_url);
698
  $page_cache = ''; // set our page cache variable
702
  if($queryType === 'standard'){
703
 
704
  // Run the loop
705
+
706
+ if ($alm_query->have_posts()) {
707
 
708
+ $alm_found_posts = $alm_total_posts;
709
  $alm_post_count = $alm_query->post_count;
710
  $alm_current = 0;
711
  $alm_has_cta = false;
713
  $cta_array = Array();
714
  if($cta && has_action('alm_cta_pos_array')){ // Build CTA Position Array
715
  $cta_array = apply_filters('alm_cta_pos_array', $seo_start_page, $page, $posts_per_page, $alm_post_count, $cta_val, $cta_repeat);
716
+ }
717
 
718
  ob_start();
719
 
720
+ // ALM Loop
721
+
722
  while ($alm_query->have_posts()): $alm_query->the_post();
723
 
724
  $alm_loop_count++;
725
  $alm_current++;
726
  $alm_page = $alm_page_count; // Get page number
727
  $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
728
+
729
+
730
  // Call to Action [Before]
731
+ if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
732
+ do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
733
  $alm_has_cta = true;
734
+ }
735
+
736
 
737
  // Repeater Template
738
  if($theme_repeater != 'null' && has_action('alm_get_theme_repeater')){ // Theme Repeater
744
 
745
 
746
  // Call to Action [After]
747
+ if($cta && has_action('alm_cta_inc') && $cta_pos === 'after' && in_array($alm_current, $cta_array)){
748
+ do_action('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, false);
749
  $alm_has_cta = true;
750
  }
751
 
752
 
753
  endwhile; wp_reset_query();
754
+
755
  // End ALM Loop
756
 
757
  $data = ob_get_clean();
768
  'postcount' => $alm_post_count,
769
  'totalposts' => $alm_found_posts
770
  )
771
+ );
 
772
  wp_send_json($return);
773
 
774
+ } else {
775
 
776
  $return = array(
777
  'html' => null,
778
+ 'meta' => array(
779
+ 'postcount' => null,
780
+ 'totalposts' => null
781
+ )
782
+ );
783
  wp_send_json($return);
784
 
785
+ }
786
 
787
  }elseif($queryType === 'totalposts'){
788
 
core/classes/class.alm-shortcode.php CHANGED
@@ -79,7 +79,7 @@ if( !class_exists('ALM_SHORTCODE') ):
79
  'repeater' => 'default',
80
  'theme_repeater' => 'null',
81
  'cta' => false,
82
- 'cta_position' => 'before:1:0',
83
  'cta_repeater' => 'null',
84
  'cta_theme_repeater' => 'null',
85
  'post_type' => 'post',
@@ -124,7 +124,8 @@ if( !class_exists('ALM_SHORTCODE') ):
124
  'button_label' => apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')),
125
  'button_loading_label' => '',
126
  'container_type' => '',
127
- 'css_classes' => '',
 
128
  ), $atts));
129
 
130
 
@@ -145,11 +146,13 @@ if( !class_exists('ALM_SHORTCODE') ):
145
  //wp_enqueue_script( 'ajax-load-more-layouts' ); // Not yet :)
146
  }
147
 
148
- if($previous_post === 'true')
149
  $previous_post === true;
 
150
 
151
- if($seo === "true" || $previous_post)
152
  $transition_container = "true";
 
153
 
154
  if($restapi === 'true'){
155
  $restapi = true;
@@ -159,15 +162,16 @@ if( !class_exists('ALM_SHORTCODE') ):
159
  // Get container elements (ul | div)
160
 
161
  $container_element = 'ul';
162
- if($options['_alm_container_type'] == '2' || $previous_post)
163
  $container_element = 'div';
 
164
 
165
  // override shortcode param
166
  if($container_type){
167
  $container_element = $container_type;
168
  }
169
 
170
- // Previous post override
171
  if($previous_post){
172
  $posts_per_page = 1;
173
  $container_element = 'div';
@@ -180,29 +184,33 @@ if( !class_exists('ALM_SHORTCODE') ):
180
 
181
  // Get extra classnames
182
  $classname = '';
183
- if(isset($options['_alm_classname']))
184
  $classname = ' '.$options['_alm_classname'];
 
185
 
186
  // Get button color
187
  $btn_color = '';
188
- if(isset($options['_alm_btn_color']))
189
  $btn_color = ' '.$options['_alm_btn_color'];
 
190
 
191
  // Get paging color
192
  $paging_color = '';
193
- if(isset($options['_alm_paging_color']) && has_action('alm_paging_installed'))
194
  $paging_color = ' paging-'.$options['_alm_paging_color'];
 
195
 
196
  // Get Layouts activated
197
  $alm_layouts = '';
198
- if(has_action('alm_layouts_installed'))
199
  $alm_layouts = ' alm-layouts';
 
200
 
201
  // Get btn classnames
202
  $button_classname = '';
203
- if(isset($options['_alm_btn_classname']))
204
  $button_classname = $options['_alm_btn_classname'];
205
-
206
 
207
  // Language support
208
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
@@ -218,12 +226,20 @@ if( !class_exists('ALM_SHORTCODE') ):
218
  $posts_per_page = $wp_posts_per_page;
219
 
220
 
 
221
  $paging_container_class = '';
222
  if($paging === 'true'){
223
- $paging_container_class = ' alm-paging-wrap';
224
- $preloaded = "false";
225
- }
226
-
 
 
 
 
 
 
 
227
 
228
  // Start ALM object
229
  $ajaxloadmore = '';
@@ -235,12 +251,12 @@ if( !class_exists('ALM_SHORTCODE') ):
235
  // ALM Wrapper
236
  $id = 'ajax-load-more';
237
  if(self::$counter > 1){
238
- $id = '';
239
  }
240
  $ajaxloadmore .= '<div id="'. $id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" data-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'">';
241
 
242
 
243
- // Previous Post
244
  // - Set other add-on params to false
245
  if($previous_post){
246
  $preloaded = false;
@@ -250,21 +266,20 @@ if( !class_exists('ALM_SHORTCODE') ):
250
  $comments = false;
251
  }
252
 
253
- // Comments
 
254
  // - Set other add-on params to false
255
  if($comments){
256
  $previous_post = false;
257
- //$preloaded = false; // Fixed in Comments v1.1
258
  $seo = false;
259
  $paging = false;
260
  $cache = false;
261
- }
262
-
263
 
264
 
265
- // ********************************
266
  // Preloaded Add-on
267
- // Retreive preloaded posts and append to ajax load more object
268
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
269
 
270
  $preloaded_output = '';
@@ -275,16 +290,18 @@ if( !class_exists('ALM_SHORTCODE') ):
275
  $preloaded_amount = $posts_per_page;
276
  }
277
 
278
- // If Paging, set $preloaded_amount to $posts_per_page
 
279
  if($paging === 'true'){
280
  $preloaded_amount = $posts_per_page;
281
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
282
  if($paged > 1){
283
- $preload_offset = $preloaded_amount * ($paged-2);
284
  }
285
  }
286
 
287
- // If CTA, parse $cta_position
 
288
  if($cta){
289
  $cta_pos_array = explode(":", $cta_position);
290
  $cta_pos = (string)$cta_pos_array[0];
@@ -360,7 +377,7 @@ if( !class_exists('ALM_SHORTCODE') ):
360
  // Call to Action [Before]
361
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'before'){
362
  if($alm_current == $cta_val){
363
- $output .= apply_filters('alm_cta_preloaded_inc', $cta_repeater, $cta_theme_repeater, $type, $alm_found_posts, $alm_page, $alm_item, $alm_current);
364
  }
365
  }
366
 
@@ -369,7 +386,7 @@ if( !class_exists('ALM_SHORTCODE') ):
369
  // Call to Action [After]
370
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'after'){
371
  if($alm_current == $cta_val){
372
- $output .= apply_filters('alm_cta_preloaded_inc', $cta_repeater, $cta_theme_repeater, $type, $alm_found_posts, $alm_page, $alm_item, $alm_current);
373
  }
374
  }
375
 
@@ -384,13 +401,19 @@ if( !class_exists('ALM_SHORTCODE') ):
384
 
385
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
386
 
387
- if($seo === "true"){
388
  $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
389
  }
 
 
 
390
 
391
  $preloaded_output .= $output;
392
 
393
- if($seo === "true"){
 
 
 
394
  $preloaded_output .= '</div>';
395
  }
396
 
@@ -420,7 +443,8 @@ if( !class_exists('ALM_SHORTCODE') ):
420
  $ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
421
  }
422
  // End Preload Posts
423
- // ********************************
 
424
 
425
  $listing_class = 'alm-listing';
426
 
@@ -433,7 +457,7 @@ if( !class_exists('ALM_SHORTCODE') ):
433
 
434
 
435
  // Cache Add-on
436
- if(has_action('alm_cache_installed') && $cache === 'true'){
437
  $cache_return = apply_filters(
438
  'alm_cache_shortcode',
439
  $cache,
@@ -581,6 +605,9 @@ if( !class_exists('ALM_SHORTCODE') ):
581
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
582
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
583
 
 
 
 
584
  $ajaxloadmore .= '>';
585
 
586
 
79
  'repeater' => 'default',
80
  'theme_repeater' => 'null',
81
  'cta' => false,
82
+ 'cta_position' => 'before:1',
83
  'cta_repeater' => 'null',
84
  'cta_theme_repeater' => 'null',
85
  'post_type' => 'post',
124
  'button_label' => apply_filters('alm_button_label', __('Older Posts', 'ajax-load-more')),
125
  'button_loading_label' => '',
126
  'container_type' => '',
127
+ 'css_classes' => '',
128
+ 'primary' => false
129
  ), $atts));
130
 
131
 
146
  //wp_enqueue_script( 'ajax-load-more-layouts' ); // Not yet :)
147
  }
148
 
149
+ if($previous_post === 'true'){
150
  $previous_post === true;
151
+ }
152
 
153
+ if($seo === "true" || $previous_post){
154
  $transition_container = "true";
155
+ }
156
 
157
  if($restapi === 'true'){
158
  $restapi = true;
162
  // Get container elements (ul | div)
163
 
164
  $container_element = 'ul';
165
+ if($options['_alm_container_type'] == '2' || $previous_post){
166
  $container_element = 'div';
167
+ }
168
 
169
  // override shortcode param
170
  if($container_type){
171
  $container_element = $container_type;
172
  }
173
 
174
+ // Previous Post
175
  if($previous_post){
176
  $posts_per_page = 1;
177
  $container_element = 'div';
184
 
185
  // Get extra classnames
186
  $classname = '';
187
+ if(isset($options['_alm_classname'])){
188
  $classname = ' '.$options['_alm_classname'];
189
+ }
190
 
191
  // Get button color
192
  $btn_color = '';
193
+ if(isset($options['_alm_btn_color'])){
194
  $btn_color = ' '.$options['_alm_btn_color'];
195
+ }
196
 
197
  // Get paging color
198
  $paging_color = '';
199
+ if(isset($options['_alm_paging_color']) && has_action('alm_paging_installed')){
200
  $paging_color = ' paging-'.$options['_alm_paging_color'];
201
+ }
202
 
203
  // Get Layouts activated
204
  $alm_layouts = '';
205
+ if(has_action('alm_layouts_installed')){
206
  $alm_layouts = ' alm-layouts';
207
+ }
208
 
209
  // Get btn classnames
210
  $button_classname = '';
211
+ if(isset($options['_alm_btn_classname'])){
212
  $button_classname = $options['_alm_btn_classname'];
213
+ }
214
 
215
  // Language support
216
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
226
  $posts_per_page = $wp_posts_per_page;
227
 
228
 
229
+ // Paging
230
  $paging_container_class = '';
231
  if($paging === 'true'){
232
+ $paging_container_class = ' alm-paging-wrap';
233
+
234
+ $preloaded = false;
235
+ // If Preloaded & Paging, pause loading by default.
236
+ // Still work to do here with SEO add-on
237
+ if($preloaded === 'true'){
238
+ $pause = 'true';
239
+ $pause_override = 'false';
240
+ }
241
+
242
+ }
243
 
244
  // Start ALM object
245
  $ajaxloadmore = '';
251
  // ALM Wrapper
252
  $id = 'ajax-load-more';
253
  if(self::$counter > 1){
254
+ $id = 'ajax-load-more-'.self::$counter; // Update ID to include counter value
255
  }
256
  $ajaxloadmore .= '<div id="'. $id .'" class="ajax-load-more-wrap'. $btn_color .''. $paging_color .''. $alm_layouts .'" data-id="" data-canonical-url="'. $canonicalURL .'" data-slug="'. $slug .'">';
257
 
258
 
259
+ // Previous Post Add-on
260
  // - Set other add-on params to false
261
  if($previous_post){
262
  $preloaded = false;
266
  $comments = false;
267
  }
268
 
269
+
270
+ // Comments Add-on
271
  // - Set other add-on params to false
272
  if($comments){
273
  $previous_post = false;
 
274
  $seo = false;
275
  $paging = false;
276
  $cache = false;
277
+ }
 
278
 
279
 
280
+ // ********************************
281
  // Preloaded Add-on
282
+ // - Get preloaded posts and append to ajax load more object
283
  if(has_action('alm_preload_installed') && $preloaded === 'true'){
284
 
285
  $preloaded_output = '';
290
  $preloaded_amount = $posts_per_page;
291
  }
292
 
293
+ // Paging Add-on
294
+ // - Set $preloaded_amount to $posts_per_page
295
  if($paging === 'true'){
296
  $preloaded_amount = $posts_per_page;
297
  $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
298
  if($paged > 1){
299
+ $preload_offset = $preloaded_amount * ($paged - 1);
300
  }
301
  }
302
 
303
+ // CTA Add-on
304
+ // - Parse $cta_position
305
  if($cta){
306
  $cta_pos_array = explode(":", $cta_position);
307
  $cta_pos = (string)$cta_pos_array[0];
377
  // Call to Action [Before]
378
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'before'){
379
  if($alm_current == $cta_val){
380
+ $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
381
  }
382
  }
383
 
386
  // Call to Action [After]
387
  if($cta && has_action('alm_cta_inc') && $cta_pos == 'after'){
388
  if($alm_current == $cta_val){
389
+ $output .= apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true);
390
  }
391
  }
392
 
401
 
402
  $preloaded_output .= '<'.$container_element.' class="alm-listing alm-preloaded'. $classname .' '. $css_classes .'" data-total-posts="'. $alm_total_posts .'">';
403
 
404
+ if($seo === "true" && $paging === 'false'){
405
  $preloaded_output .= '<div class="alm-reveal alm-seo" data-page="1" data-url="'.$canonicalURL.'">';
406
  }
407
+ if($seo === "false" && $paging === 'true' || $seo === "true" && $paging === 'true'){
408
+ $preloaded_output .= '<div class="alm-reveal">';
409
+ }
410
 
411
  $preloaded_output .= $output;
412
 
413
+ if($seo === "false" && $paging === 'true'){
414
+ $preloaded_output .= '</div>';
415
+ }
416
+ if($seo === "true" && $paging === 'false' || $seo === "true" && $paging === 'true'){
417
  $preloaded_output .= '</div>';
418
  }
419
 
443
  $ajaxloadmore .= $preloaded_output; // Add $preloaded_output data to $ajaxloadmore
444
  }
445
  // End Preload Posts
446
+ // ********************************
447
+
448
 
449
  $listing_class = 'alm-listing';
450
 
457
 
458
 
459
  // Cache Add-on
460
+ if(has_action('alm_cache_installed') && $cache === 'true'){
461
  $cache_return = apply_filters(
462
  'alm_cache_shortcode',
463
  $cache,
605
  $ajaxloadmore .= ' data-transition-container="'.$transition_container.'"';
606
  $ajaxloadmore .= ' data-images-loaded="'.$images_loaded.'"';
607
 
608
+ if($primary !== false)
609
+ $ajaxloadmore .= ' data-primary="true"';
610
+
611
  $ajaxloadmore .= '>';
612
 
613
 
core/functions.php CHANGED
@@ -18,8 +18,9 @@ function alm_get_current_repeater($repeater, $type) {
18
  if( $type == 'repeater' && has_action('alm_repeater_installed' )){
19
  $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
20
 
21
- if(!file_exists($include)) //confirm file exists
22
- alm_get_default_repeater();
 
23
 
24
  }
25
  // If is Unlimited Repeaters (Custom Repeaters v2)
@@ -33,9 +34,9 @@ function alm_get_current_repeater($repeater, $type) {
33
  $include = ALM_UNLIMITED_PATH. 'repeaters/'.$template .'.php';
34
  }
35
 
36
- if(!file_exists($include)) //confirm file exists
37
  $include = alm_get_default_repeater();
38
-
39
  }
40
  // Default repeater
41
  else{
@@ -45,7 +46,7 @@ function alm_get_current_repeater($repeater, $type) {
45
  // Security check
46
  // check if $template contains relative path. So, set include to default
47
  if ( false !== strpos( $template, './' ) ) {
48
- $include = alm_get_default_repeater();
49
  }
50
 
51
  return $include;
@@ -63,6 +64,7 @@ function alm_get_current_repeater($repeater, $type) {
63
  */
64
 
65
  function alm_get_default_repeater() {
 
66
  global $wpdb;
67
  $file = null;
68
  $template_dir = 'alm_templates';
@@ -390,11 +392,15 @@ function alm_get_canonical_url(){
390
  }
391
  }
392
  // Frontpage
393
- elseif(is_front_page()){
394
- $canonicalURL = get_home_url().'/';
 
 
 
 
395
  }
396
  // Home (Blog Default)
397
- elseif(is_home()){
398
  $canonicalURL = get_permalink(get_option('page_for_posts'));
399
  }
400
  // Category
18
  if( $type == 'repeater' && has_action('alm_repeater_installed' )){
19
  $include = ALM_REPEATER_PATH . 'repeaters/'. $template .'.php';
20
 
21
+ if(!file_exists($include)){ //confirm file exists
22
+ alm_get_default_repeater();
23
+ }
24
 
25
  }
26
  // If is Unlimited Repeaters (Custom Repeaters v2)
34
  $include = ALM_UNLIMITED_PATH. 'repeaters/'.$template .'.php';
35
  }
36
 
37
+ if(!file_exists($include)){ //confirm file exists
38
  $include = alm_get_default_repeater();
39
+ }
40
  }
41
  // Default repeater
42
  else{
46
  // Security check
47
  // check if $template contains relative path. So, set include to default
48
  if ( false !== strpos( $template, './' ) ) {
49
+ $include = alm_get_default_repeater();
50
  }
51
 
52
  return $include;
64
  */
65
 
66
  function alm_get_default_repeater() {
67
+
68
  global $wpdb;
69
  $file = null;
70
  $template_dir = 'alm_templates';
392
  }
393
  }
394
  // Frontpage
395
+ elseif(is_front_page()){
396
+ if(function_exists('pll_home_url')){ // Polylang support
397
+ $canonicalURL = pll_home_url();
398
+ }else{
399
+ $canonicalURL = get_home_url().'/';
400
+ }
401
  }
402
  // Home (Blog Default)
403
+ elseif(is_home()){
404
  $canonicalURL = get_permalink(get_option('page_for_posts'));
405
  }
406
  // Category
core/js/ajax-load-more.js CHANGED
@@ -24,6 +24,8 @@
24
  var alm = this;
25
  alm.AjaxLoadMore = {};
26
  alm.page = 0;
 
 
27
  alm.proceed = false;
28
  alm.disable_ajax = false;
29
  alm.init = true;
@@ -44,8 +46,7 @@
44
  alm.cache_id = alm.content.attr('data-cache-id'); // cache value
45
  alm.cache_path = alm.content.attr('data-cache-path'); // cache path
46
  alm.cache_logged_in = alm.content.attr('data-cache-logged-in'); // cache logged in (settings)
47
- alm.repeater = alm.content.attr('data-repeater');
48
-
49
  alm.theme_repeater = alm.content.attr('data-theme-repeater');
50
 
51
  alm.scroll_distance = parseInt(alm.content.attr('data-scroll-distance'));
@@ -91,15 +92,17 @@
91
  alm.restapi_template_id = alm.content.attr('data-restapi-template-id');
92
  alm.restapi_debug = alm.content.attr('data-restapi-debug');
93
 
94
- alm.seo = alm.content.attr('data-seo'); // true | false
95
 
96
  alm.preloaded = alm.content.attr('data-preloaded'); // true | false
97
- alm.preloaded_amount = alm.content.attr('data-preloaded-amount'); // 0 - ?
98
 
99
  alm.paging = alm.content.attr('data-paging'); // is paging enabled
100
  alm.paging_controls = alm.content.attr('data-paging-controls');
101
  alm.paging_show_at_most = alm.content.attr('data-paging-show-at-most');
102
- alm.paging_classes = alm.content.attr('data-paging-classes');
 
 
103
 
104
  /* REST API */
105
  if(alm.restapi === 'true'){
@@ -115,7 +118,8 @@
115
  }else{
116
  alm.restapi = false;
117
  }
118
- /* /end REST API */
 
119
 
120
  /* Paging */
121
  if(alm.paging === 'true'){
@@ -136,7 +140,7 @@
136
  }else{
137
  alm.paging_controls = false;
138
  }
139
- /* /end Paging */
140
 
141
 
142
  /* Cache */
@@ -147,29 +151,31 @@
147
  if (alm.cache_logged_in === undefined){
148
  alm.cache_logged_in = false;
149
  }
150
- /* /end Cache */
 
151
 
152
  /* Comments */
153
  if (alm.comments_per_page === undefined){
154
  alm.comments_per_page = '5';
155
  }
156
- /* /end Comments
 
157
 
158
  /* Preloaded */
159
- /* Check preloaded posts to ensure posts_per_page > alm.total_posts - if posts_per_page <= total_posts disable ajax load more */
160
  if (alm.preloaded === 'true'){
161
  alm.preload_wrap = alm.content.prev('.alm-preloaded');
162
- alm.total_posts = parseInt(alm.preload_wrap.attr('data-total-posts'));
163
  if (alm.preloaded_amount === undefined){
164
  alm.preloaded_amount = false;
165
  }
166
- if (alm.total_posts <= alm.preloaded_amount){
167
  alm.disable_ajax = true;
168
  }
169
  }else{
170
  alm.preloaded = 'false';
171
  }
172
- /* /end Preloaded */
173
 
174
 
175
  /* SEO */
@@ -178,10 +184,7 @@
178
  }
179
  if (alm.seo === 'true'){
180
  alm.seo = true; // Convert string to boolean
181
- }
182
- if($(".ajax-load-more-wrap").length > 1){
183
- alm.seo = false;
184
- }
185
 
186
  alm.permalink = alm.content.attr('data-seo-permalink');
187
  alm.pageview = alm.content.attr('data-seo-pageview');
@@ -207,7 +210,7 @@
207
  }else{
208
  alm.start_page = 1;
209
  }
210
- /* /end SEO */
211
 
212
 
213
  /* Previous Post */
@@ -231,7 +234,7 @@
231
  alm.previous_post_scroll = alm.content.attr('data-previous-post-scroll');
232
  alm.previous_post_scroll_speed = alm.content.attr('data-previous-post-scroll-speed');
233
  alm.previous_post_scroll_top = alm.content.attr('data-previous-post-scrolltop');
234
- /* /end Previous Post */
235
 
236
 
237
  /* Define offset */
@@ -249,6 +252,9 @@
249
  }
250
  if (alm.preloaded === 'true' && alm.seo && alm.start_page > 0){ // SEO + Preloaded
251
  alm.pause = false;
 
 
 
252
  }
253
 
254
 
@@ -264,8 +270,7 @@
264
  /* Max number of pages to load while scrolling */
265
  if (alm.max_pages === undefined){
266
  alm.max_pages = 5;
267
- }
268
-
269
  if (alm.max_pages === 0){
270
  alm.max_pages = 10000;
271
  }
@@ -331,6 +336,7 @@
331
  }else{
332
  alm.button_class = ' ' + alm.content.attr('data-button-class');
333
  }
 
334
 
335
  /* Define scroll event */
336
  if (alm.content.attr('data-scroll') === undefined){
@@ -340,6 +346,7 @@
340
  }else{
341
  alm.scroll = true;
342
  }
 
343
 
344
  /* Parse multiple Post Types */
345
  alm.post_type = alm.content.attr('data-post-type');
@@ -363,7 +370,7 @@
363
 
364
 
365
 
366
- /* alm.AjaxLoadMore.loadPosts()
367
  *
368
  * The function to get posts via Ajax
369
  * @since 2.0.0
@@ -409,7 +416,7 @@
409
 
410
 
411
 
412
- /* alm.AjaxLoadMore.ajax()
413
  *
414
  * Ajax Load Moe Ajax function
415
  * @since 2.6.0
@@ -502,23 +509,37 @@
502
  alm.button.addClass('loading');
503
  }
504
  },
505
- success: function (results) {
506
- var data;
 
 
 
 
 
507
  // loop results to get data from each
508
- $.each(results, function(e){
509
- var result = results[e];
510
  if(alm.restapi_debug === 'true'){ // If debug
511
  console.log(result);
512
  }
513
  data += alm_template(result);
514
- });
515
- alm.AjaxLoadMore.success(data, true); // Send data to alm object
 
 
 
 
 
 
 
 
 
516
  }
517
  });
518
  }
519
 
520
  // Standard ALM
521
- else{
522
  $.ajax({
523
  type: "GET",
524
  url: alm_localize.ajaxurl,
@@ -592,12 +613,16 @@
592
  }
593
 
594
  },
 
595
  error: function (jqXHR, textStatus, errorThrown) {
596
  alm.AjaxLoadMore.error(jqXHR, textStatus, errorThrown);
597
  }
 
598
  });
599
  }
600
- };
 
 
601
 
602
  // If pagination enabled, run totalposts query
603
  if(alm.paging){
@@ -606,43 +631,47 @@
606
 
607
 
608
 
609
- /* alm.AjaxLoadMore.success()
610
  *
611
  * Success function after loading data
612
  * @since 2.6.0
613
  */
614
 
615
  alm.AjaxLoadMore.success = function (data, is_cache) {
616
-
617
  if(alm.previous_post){ // Get previous page data
618
  alm.AjaxLoadMore.getPreviousPost();
619
- }
 
620
  var html, meta, total;
621
 
622
- if(!is_cache){
 
 
 
 
623
  html = data.html;
624
  meta = data.meta;
625
- }else{
626
- html = data; // If is cache, don't look for json data