WordPress Infinite Scroll – Ajax Load More - Version 4.2.0.1

Version Description

  • January 16, 2019 =
  • FIX - Removed duplicate transition_container_classes when using Paging add-on.
  • FIX - Fixed issue with alm-listing container causing an error with the Comments addon.
Download this release

Release Info

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

Code changes from version 4.1.0 to 4.2.0.1

README.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
5
  Requires at least: 3.6
6
- Tested up to: 5.0
7
- Stable tag: 4.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -22,7 +22,6 @@ Ajax Load More is compatible for endless scrolling with popular eCommerce plugin
22
 
23
 
24
 
25
-
26
  ### Features
27
  * **Shortcode Builder** - Create your own custom Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
28
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!
@@ -62,7 +61,7 @@ Check out the examples below:
62
  * [Comments](http://examples.connekthq.com/alm-comments/example-post/) *
63
  * [Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)
64
 
65
- * _Add-on required_
66
 
67
 
68
 
@@ -179,8 +178,8 @@ The [Custom Repeater Add-On](https://connekthq.com/plugins/ajax-load-more/custom
179
  * **[Next Page](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)**: Infinite scroll multipage WordPress content with Ajax Load More and the Next Page add-on.
180
  * **[Paging](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)**: Replace the default lazy load/infinite scroll functionality of Ajax Load More with a numbered navigation system.
181
  * **[Preloaded](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)**: Load an initial set of posts before sending any Ajax requests to your server.
182
- * **[Previous Post](https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/)**: Enable infinite scrolling of older(previous) posts on your WordPress single post templates.
183
  * **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)**: Generate unique paging URLs with each Ajax Load More query.
 
184
  * **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)**: Manage Ajax Load More repeater templates from within your current theme directory.
185
  * **[Users](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)**: Lazy loading WordPress Users with Ajax Load More.
186
 
@@ -235,7 +234,7 @@ The following [functions](https://connekthq.com/plugins/ajax-load-more/docs/call
235
  };
236
 
237
 
238
- **URL Update** - The almUrlUpdate() function is triggered after a successful URL update (pushState) from the Previous Post or the Search Engine Optimization add-on
239
 
240
  $.fn.almUrlUpdate = function(permalink, type){
241
  console.log("URL updated to " + permalink + '- dispatched from the '+ type + ' add-on.');
@@ -372,6 +371,18 @@ How to install Ajax Load More.
372
 
373
  == Changelog ==
374
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  = 4.1.0 - December 6, 2018 =
376
  * NEW - Added initial support for nesting Ajax Load More instances. Users can now run Ajax Load More inside of another instance of Ajax Load More. For example, using Next Page add-on functionality inside of Previous Post content(Single posts). `[ajax_load_more nested="true"]`. Note: This is new functionality as should be used with caution as it has not fully been tested through every possible situation. Nested ALM Filters are not currently supported.
377
  * NEW - Added new plugin uninstall script and settings for removing all Ajax Load More data on plugin removal/deletion.
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
5
  Requires at least: 3.6
6
+ Tested up to: 5.1.0
7
+ Stable tag: 4.2.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
22
 
23
 
24
 
 
25
  ### Features
26
  * **Shortcode Builder** - Create your own custom Ajax Load More shortcode by adjusting the various WordPress query parameters in our easy-to-use shortcode builder (see Shortcode Parameters).
27
  * **Query Parameters** - Ajax Load More allows you to query WordPress by many different content types. Query by Post Type, Post Format, Date, Category, Tags, Custom Taxonomies, Search Term, Authors and more!
61
  * [Comments](http://examples.connekthq.com/alm-comments/example-post/) *
62
  * [Advanced Custom Fields](https://connekthq.com/plugins/ajax-load-more/examples/advanced-custom-fields/)
63
 
64
+ _*Add-on required_
65
 
66
 
67
 
178
  * **[Next Page](https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/)**: Infinite scroll multipage WordPress content with Ajax Load More and the Next Page add-on.
179
  * **[Paging](https://connekthq.com/plugins/ajax-load-more/add-ons/paging/)**: Replace the default lazy load/infinite scroll functionality of Ajax Load More with a numbered navigation system.
180
  * **[Preloaded](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/)**: Load an initial set of posts before sending any Ajax requests to your server.
 
181
  * **[SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/)**: Generate unique paging URLs with each Ajax Load More query.
182
+ * **[Single Post](https://connekthq.com/plugins/ajax-load-more/add-ons/single-post/)**: Enable infinite scrolling of single posts on your WordPress post templates.
183
  * **[Theme Repeaters](https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/)**: Manage Ajax Load More repeater templates from within your current theme directory.
184
  * **[Users](https://connekthq.com/plugins/ajax-load-more/add-ons/users/)**: Lazy loading WordPress Users with Ajax Load More.
185
 
234
  };
235
 
236
 
237
+ **URL Update** - The almUrlUpdate() function is triggered after a successful URL update (pushState) from the Single Post or the Search Engine Optimization add-on
238
 
239
  $.fn.almUrlUpdate = function(permalink, type){
240
  console.log("URL updated to " + permalink + '- dispatched from the '+ type + ' add-on.');
371
 
372
  == Changelog ==
373
 
374
+ = 4.2.0.1 - January 16, 2019 =
375
+ * FIX - Removed duplicate `transition_container_classes` when using Paging add-on.
376
+ * FIX - Fixed issue with `alm-listing` container causing an error with the Comments addon.
377
+
378
+ = 4.2.0 - January 15, 2019 =
379
+ * UPGRADE NOTICE - If you also are using the Previous Post add-on you must also update that plugin.
380
+ * NEW - Added new render function `alm_render` for displaying ALM without a shortcode.
381
+ * UPDATE - Started updating core JS to remove jQuery functions. Hopefully sooner than later jQuery will no longer be a dependancy.
382
+ * UPDATE - Updated default `scroll_distance` to 100 from 150.
383
+ * UPDATE - Various admin UI/UX updates.
384
+ * UPDATE - Various bug fixes.
385
+
386
  = 4.1.0 - December 6, 2018 =
387
  * NEW - Added initial support for nesting Ajax Load More instances. Users can now run Ajax Load More inside of another instance of Ajax Load More. For example, using Next Page add-on functionality inside of Previous Post content(Single posts). `[ajax_load_more nested="true"]`. Note: This is new functionality as should be used with caution as it has not fully been tested through every possible situation. Nested ALM Filters are not currently supported.
388
  * NEW - Added new plugin uninstall script and settings for removing all Ajax Load More data on plugin removal/deletion.
admin/admin-functions.php CHANGED
@@ -37,10 +37,11 @@ function alm_has_addon_shortcodes(){
37
  'alm_comments_installed',
38
  'alm_nextpage_installed',
39
  'alm_preload_installed',
40
- 'alm_paging_installed',
41
  'alm_prev_post_installed',
42
  'alm_rest_api_installed',
43
- 'alm_seo_installed',
 
44
  'alm_users_installed'
45
  );
46
 
@@ -70,7 +71,7 @@ function alm_has_addon_shortcodes(){
70
  */
71
 
72
  function alm_has_addon(){
73
- if(has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed') || has_action('alm_users_installed')) {
74
  return true;
75
  } else {
76
  return false;
37
  'alm_comments_installed',
38
  'alm_nextpage_installed',
39
  'alm_preload_installed',
40
+ 'alm_paging_installed',
41
  'alm_prev_post_installed',
42
  'alm_rest_api_installed',
43
+ 'alm_seo_installed',
44
+ 'alm_single_post_installed',
45
  'alm_users_installed'
46
  );
47
 
71
  */
72
 
73
  function alm_has_addon(){
74
+ if(has_action('alm_cta_installed') || has_action('alm_comments_installed') || has_action('alm_unlimited_installed') || has_action('alm_layouts_installed') || has_action('alm_nextpage_installed') || has_action('alm_preload_installed') || has_action('alm_paging_installed') || has_action('alm_prev_post_installed') || has_action('alm_single_post_installed') || has_action('alm_rest_api_installed') || has_action('alm_seo_installed') || has_action('alm_theme_repeaters_installed') || has_action('alm_users_installed')) {
75
  return true;
76
  } else {
77
  return false;
admin/admin.php CHANGED
@@ -1305,12 +1305,6 @@ function alm_admin_init(){
1305
  }
1306
 
1307
 
1308
- // PREVIOUS POST
1309
- if(has_action('alm_prev_post_settings')){
1310
- do_action('alm_prev_post_settings');
1311
- }
1312
-
1313
-
1314
  // PRELOADED
1315
  if(has_action('alm_preloaded_settings')){
1316
  do_action('alm_preloaded_settings');
@@ -1329,6 +1323,12 @@ function alm_admin_init(){
1329
  }
1330
 
1331
 
 
 
 
 
 
 
1332
  // THEME REPEATERS
1333
  if(has_action('alm_theme_repeaters_settings')){
1334
  do_action('alm_theme_repeaters_settings');
1305
  }
1306
 
1307
 
 
 
 
 
 
 
1308
  // PRELOADED
1309
  if(has_action('alm_preloaded_settings')){
1310
  do_action('alm_preloaded_settings');
1323
  }
1324
 
1325
 
1326
+ // SINGLE POST
1327
+ if(has_action('alm_prev_post_settings')){
1328
+ do_action('alm_prev_post_settings');
1329
+ }
1330
+
1331
+
1332
  // THEME REPEATERS
1333
  if(has_action('alm_theme_repeaters_settings')){
1334
  do_action('alm_theme_repeaters_settings');
admin/dist/css/admin.css CHANGED
@@ -243,6 +243,8 @@
243
  background: #fff;
244
  background: #f7f7f7;
245
  border-radius: 2px;
 
 
246
  background-clip: padding-box;
247
  -webkit-touch-callout: none;
248
  -webkit-user-select: none;
@@ -1189,10 +1191,23 @@ a.layout-hover:hover img {
1189
  margin-top: -10px;
1190
  opacity: 0.7; }
1191
 
 
 
 
1192
  .ajax-load-more p.small.reset-shortcode-builder {
 
 
 
 
 
 
1193
  text-align: right;
1194
- margin: 10px 0 0;
1195
- display: none; }
 
 
 
 
1196
 
1197
  .ajax-load-more p.small.reset-shortcode-builder a {
1198
  text-decoration: none; }
@@ -1305,6 +1320,19 @@ a.layout-hover:hover img {
1305
  #alm-builder {
1306
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; }
1307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1308
  .ajax-load-more ul {
1309
  padding: 0;
1310
  margin: 0;
@@ -1318,7 +1346,8 @@ a.layout-hover:hover img {
1318
  clear: both;
1319
  display: inline-block;
1320
  vertical-align: top;
1321
- overflow: visible; }
 
1322
 
1323
  .ajax-load-more label.full {
1324
  display: block;
@@ -1483,24 +1512,36 @@ a.layout-hover:hover img {
1483
  padding-bottom: 0; }
1484
 
1485
  .ajax-load-more p.warning-callout {
1486
- background-color: #cbecf7;
1487
- border-left: 5px solid #5e99ac;
1488
  color: #333;
1489
- font-size: 13px;
1490
  margin: 0;
1491
  display: block;
1492
- padding: 12px 12px 12px 17px;
1493
  border-radius: 3px;
1494
  margin: 10px;
1495
  width: auto;
1496
- line-height: 1.55; }
 
 
 
 
 
 
 
 
 
 
 
 
 
1497
 
1498
  .ajax-load-more p.warning-callout strong {
1499
  display: inline-block;
1500
  font-weight: normal;
1501
- font-family: Consolas,monaco,monospace;
1502
- background-color: #edfbff;
1503
- color: #525c5f;
1504
  padding: 0 6px;
1505
  border-radius: 2px; }
1506
 
@@ -1783,29 +1824,27 @@ hr.indented {
1783
 
1784
  .ajax-load-more .section-title {
1785
  float: left;
1786
- padding: 20px 0 20px 20px;
1787
  width: 35%; }
 
 
 
 
1788
  .ajax-load-more .section-title p:last-of-type {
1789
  margin-bottom: 0; }
1790
  .ajax-load-more .section-title small {
1791
  font-size: 11px;
1792
  padding-top: 8px;
1793
  display: block; }
1794
-
1795
- .ajax-load-more .section-title.full {
1796
- width: 100%;
1797
- float: none; }
1798
-
1799
- .ajax-load-more .section-title h4 {
1800
- font-size: 14px;
1801
- font-weight: 600;
1802
- margin-bottom: 15px; }
1803
-
1804
- .ajax-load-more .section-title p,
1805
- .ajax-load-more .wrap p.descriptor {
1806
- font-size: 13px;
1807
- line-height: 20px;
1808
- color: #999; }
1809
 
1810
  .ajax-load-more .wrap p.descriptor {
1811
  margin: 0;
@@ -1982,11 +2021,6 @@ hr.indented {
1982
  border: none;
1983
  padding: 12px 12px 24px; }
1984
 
1985
- #shortcode_output::-moz-selection {
1986
- background: #fff;
1987
- color: #ca5252;
1988
- text-shadow: none; }
1989
-
1990
  #shortcode_output::selection {
1991
  background: #fff;
1992
  color: #ca5252;
@@ -2411,7 +2445,10 @@ table.highlight {
2411
  flex-wrap: wrap;
2412
  margin-bottom: 20px;
2413
  border-top: 1px solid #e1e1e1;
2414
- border-left: 1px solid #e1e1e1; }
 
 
 
2415
 
2416
  #alm-add-ons .group {
2417
  overflow: hidden;
@@ -3485,7 +3522,10 @@ p.theme-title {
3485
  .shortcode-builder input[type=radio],
3486
  .ajax-load-more .form-table input[type=checkbox],
3487
  .ajax-load-more .form-table input[type=radio] {
3488
- display: none; }
 
 
 
3489
 
3490
  .shortcode-builder input[type=checkbox] + label,
3491
  .ajax-load-more .form-table input[type=checkbox] + label,
243
  background: #fff;
244
  background: #f7f7f7;
245
  border-radius: 2px;
246
+ -webkit-background-clip: padding-box;
247
+ -moz-background-clip: padding;
248
  background-clip: padding-box;
249
  -webkit-touch-callout: none;
250
  -webkit-user-select: none;
1191
  margin-top: -10px;
1192
  opacity: 0.7; }
1193
 
1194
+ .ajax-load-more.shortcode-builder .major-publishing-actions {
1195
+ position: relative; }
1196
+
1197
  .ajax-load-more p.small.reset-shortcode-builder {
1198
+ position: absolute;
1199
+ right: 15px;
1200
+ top: 50%;
1201
+ -webkit-transform: translateY(-45%);
1202
+ -ms-transform: translateY(-45%);
1203
+ transform: translateY(-45%);
1204
  text-align: right;
1205
+ margin: 0;
1206
+ padding: 0;
1207
+ display: none;
1208
+ width: auto;
1209
+ opacity: 1;
1210
+ font-size: 12px; }
1211
 
1212
  .ajax-load-more p.small.reset-shortcode-builder a {
1213
  text-decoration: none; }
1320
  #alm-builder {
1321
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; }
1322
 
1323
+ a.button-small {
1324
+ text-decoration: none;
1325
+ font-size: 11px;
1326
+ padding: 7px;
1327
+ display: inline-block;
1328
+ background-color: #eaf6fb;
1329
+ color: #333;
1330
+ line-height: 1.1;
1331
+ border-radius: 2px; }
1332
+ a.button-small:hover, a.button-small:focus {
1333
+ color: #222;
1334
+ background-color: #d9edf5; }
1335
+
1336
  .ajax-load-more ul {
1337
  padding: 0;
1338
  margin: 0;
1346
  clear: both;
1347
  display: inline-block;
1348
  vertical-align: top;
1349
+ overflow: visible;
1350
+ position: relative; }
1351
 
1352
  .ajax-load-more label.full {
1353
  display: block;
1512
  padding-bottom: 0; }
1513
 
1514
  .ajax-load-more p.warning-callout {
1515
+ background-color: #eaf6fb;
1516
+ border-left: 6px solid #4e99bf;
1517
  color: #333;
1518
+ font-size: 12px;
1519
  margin: 0;
1520
  display: block;
1521
+ padding: 18px 100px 18px 18px;
1522
  border-radius: 3px;
1523
  margin: 10px;
1524
  width: auto;
1525
+ line-height: 1.55;
1526
+ position: relative; }
1527
+ .ajax-load-more p.warning-callout a {
1528
+ color: #0071ac; }
1529
+ .ajax-load-more p.warning-callout a.button-small {
1530
+ position: absolute;
1531
+ right: 14px;
1532
+ top: 14px;
1533
+ font-size: 12px;
1534
+ display: inline-block;
1535
+ background-color: rgba(255, 255, 255, 0.65);
1536
+ margin: 0 0 0 10px; }
1537
+ .ajax-load-more p.warning-callout a.button-small:hover, .ajax-load-more p.warning-callout a.button-small:focus {
1538
+ background-color: #fff; }
1539
 
1540
  .ajax-load-more p.warning-callout strong {
1541
  display: inline-block;
1542
  font-weight: normal;
1543
+ font-family: Consolas, monaco, monospace;
1544
+ background-color: #fff;
 
1545
  padding: 0 6px;
1546
  border-radius: 2px; }
1547
 
1824
 
1825
  .ajax-load-more .section-title {
1826
  float: left;
1827
+ padding: 20px 0 25px 20px;
1828
  width: 35%; }
1829
+ .ajax-load-more .section-title.full {
1830
+ width: 100%;
1831
+ float: none;
1832
+ padding-right: 25px; }
1833
  .ajax-load-more .section-title p:last-of-type {
1834
  margin-bottom: 0; }
1835
  .ajax-load-more .section-title small {
1836
  font-size: 11px;
1837
  padding-top: 8px;
1838
  display: block; }
1839
+ .ajax-load-more .section-title h4 {
1840
+ font-size: 14px;
1841
+ font-weight: 600;
1842
+ margin-bottom: 15px; }
1843
+ .ajax-load-more .section-title p,
1844
+ .ajax-load-more .section-title .wrap p.descriptor {
1845
+ font-size: 13px;
1846
+ line-height: 20px;
1847
+ color: #999; }
 
 
 
 
 
 
1848
 
1849
  .ajax-load-more .wrap p.descriptor {
1850
  margin: 0;
2021
  border: none;
2022
  padding: 12px 12px 24px; }
2023
 
 
 
 
 
 
2024
  #shortcode_output::selection {
2025
  background: #fff;
2026
  color: #ca5252;
2445
  flex-wrap: wrap;
2446
  margin-bottom: 20px;
2447
  border-top: 1px solid #e1e1e1;
2448
+ border-left: 1px solid #e1e1e1;
2449
+ background-color: #f7f7f7;
2450
+ -webkit-box-shadow: inset 0 0 0 1px #e1e1e1;
2451
+ box-shadow: inset 0 0 0 1px #e1e1e1; }
2452
 
2453
  #alm-add-ons .group {
2454
  overflow: hidden;
3522
  .shortcode-builder input[type=radio],
3523
  .ajax-load-more .form-table input[type=checkbox],
3524
  .ajax-load-more .form-table input[type=radio] {
3525
+ width: 0;
3526
+ height: 0;
3527
+ opacity: 0;
3528
+ position: absolute; }
3529
 
3530
  .shortcode-builder input[type=checkbox] + label,
3531
  .ajax-load-more .form-table input[type=checkbox] + label,
admin/includes/cta/dyk.php CHANGED
@@ -36,7 +36,7 @@
36
  </div>
37
  <div class="text">
38
  <p class="addon-intro">You can lazy load single posts with Ajax Load More!</p>
39
- <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost">Previous Post</a> add-on will load single posts as you scroll and update the browser URL to the current post.</p>
40
  </div>
41
  </div>
42
  <div class="major-publishing-actions">
36
  </div>
37
  <div class="text">
38
  <p class="addon-intro">You can lazy load single posts with Ajax Load More!</p>
39
+ <p>The <a target="blank" style="font-weight: 600;" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/?utm_source=WP%20Admin&utm_medium=ALM%20DYK&utm_campaign=PreviousPost">Single Post</a> add-on will load single posts as you scroll and update the browser URL to the current post.</p>
40
  </div>
41
  </div>
42
  <div class="major-publishing-actions">
admin/shortcode-builder/components/acf.php CHANGED
@@ -37,7 +37,6 @@
37
 
38
  <div class="clear"></div>
39
  <hr/>
40
- <div class="spacer"></div>
41
 
42
  <div class="section-title">
43
  <h4><?php _e('Field Type', 'ajax-load-more'); ?></h4>
@@ -58,7 +57,6 @@
58
 
59
  <div class="clear"></div>
60
  <hr/>
61
- <div class="spacer"></div>
62
 
63
  <div class="section-title">
64
  <h4><?php _e('Field Name', 'ajax-load-more'); ?></h4>
37
 
38
  <div class="clear"></div>
39
  <hr/>
 
40
 
41
  <div class="section-title">
42
  <h4><?php _e('Field Type', 'ajax-load-more'); ?></h4>
57
 
58
  <div class="clear"></div>
59
  <hr/>
 
60
 
61
  <div class="section-title">
62
  <h4><?php _e('Field Name', 'ajax-load-more'); ?></h4>
admin/shortcode-builder/components/comments.php CHANGED
@@ -137,9 +137,11 @@
137
  <p><?php _e('<strong>Note</strong>: The majority of premium themes have a custom callback function for displaying comments. Please see comments.php or functions.php within your theme directory to locate the callback function for your theme.', 'ajax-load-more'); ?></p>
138
  </div>
139
  </div>
140
-
 
 
141
  <p class="warning-callout">
142
- <?php _e('You must add the comments shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
143
  </p>
144
 
145
  </div>
137
  <p><?php _e('<strong>Note</strong>: The majority of premium themes have a custom callback function for displaying comments. Please see comments.php or functions.php within your theme directory to locate the callback function for your theme.', 'ajax-load-more'); ?></p>
138
  </div>
139
  </div>
140
+
141
+ <div class="clear"></div>
142
+ <hr>
143
  <p class="warning-callout">
144
+ <?php _e('You must add the comments shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method.', 'ajax-load-more'); ?> <a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/add-ons/comments/" target="_blank"><?php _e('View Docs', 'ajax-load-more'); ?></a>
145
  </p>
146
 
147
  </div>
admin/shortcode-builder/components/cta.php CHANGED
@@ -79,10 +79,12 @@
79
  do_action('alm_theme_repeaters_selection');
80
  }
81
  ?>
82
-
 
 
83
  <p class="warning-callout">
84
- <?php _e('Call to actions do NOT count as a post within an Ajax Load More loop.<br/>
85
- For example, if you set <strong>posts_per_page="5"</strong> in your shortcode, 6 items will be displayed.', 'ajax-load-more'); ?>
86
  </p>
87
 
88
  </div>
79
  do_action('alm_theme_repeaters_selection');
80
  }
81
  ?>
82
+
83
+ <div class="clear"></div>
84
+ <hr>
85
  <p class="warning-callout">
86
+ <?php _e('Call to actions do NOT count as a post within an Ajax Load More loop.', 'ajax-load-more'); ?><br/>
87
+ <?php _e('For example, if you set <strong>posts_per_page="5"</strong> in your shortcode, 6 items will be displayed.', 'ajax-load-more'); ?>
88
  </p>
89
 
90
  </div>
admin/shortcode-builder/components/nextpage.php CHANGED
@@ -103,7 +103,10 @@
103
  </label>
104
  <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
105
  </div>
106
- </div>
 
 
 
107
 
108
  <p class="warning-callout">
109
  <?php _e('You must add the Next Page shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
103
  </label>
104
  <input id="next-page-scroll-top" name="next-page-scroll-top" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
105
  </div>
106
+ </div>
107
+
108
+ <div class="clear"></div>
109
+ <hr>
110
 
111
  <p class="warning-callout">
112
  <?php _e('You must add the Next Page shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
admin/shortcode-builder/components/previous-post.php DELETED
@@ -1,86 +0,0 @@
1
- <?php if(has_action('alm_prev_post_installed')){ ?>
2
- <div class="row input previous-post add-on" id="alm-previous-post">
3
- <h3 class="heading" tabindex="0"><?php _e('Previous Post', 'ajax-load-more'); ?></h3>
4
- <div class="expand-wrap">
5
- <div class="section-title">
6
- <p><?php _e('Enable the infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
7
- </div>
8
- <div class="wrap">
9
- <div class="inner">
10
- <ul>
11
- <li>
12
- <input class="alm_element" type="radio" name="prev-post" value="true" id="prev-post-true" >
13
- <label for="prev-post-true"><?php _e('True', 'ajax-load-more'); ?></label>
14
- </li>
15
- <li>
16
- <input class="alm_element" type="radio" name="prev-post" value="false" id="prev-post-false" checked="checked">
17
- <label for="prev-post-false"><?php _e('False', 'ajax-load-more'); ?></label>
18
- </li>
19
- </ul>
20
- </div>
21
- </div>
22
- <div class="clear"></div>
23
- <div class="prev_post_id" style="display: none;">
24
- <div class="clear"></div>
25
- <hr>
26
- <div class="section-title">
27
- <h4><?php _e('Post ID', 'ajax-load-more'); ?></h4>
28
- <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
29
- </div>
30
- <div class="wrap">
31
- <div class="inner">
32
- <input type="text" value="get_the_ID()" id="prev_post_id" class="alm_element disabled-input" disabled="disabled">
33
- </div>
34
- </div>
35
- <div class="clear"></div>
36
- <hr>
37
- <div class="section-title">
38
- <h4><?php _e('Taxonomy', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Selecting a taxonomy means only previous posts from the same taxonomy term will be returned. If a post has multiple terms attached, each term will be considered using an OR relationship query','ajax-load-more'); ?>."></a></h4>
39
- <p><?php _e('Query previous posts from the same taxonomy term(s).', 'ajax-load-more'); ?></p>
40
- </div>
41
- <div class="wrap">
42
- <div class="inner">
43
- <?php
44
- // Taxonomies
45
- $pp_tax_args = array(
46
- 'public' => true,
47
- '_builtin' => false
48
- );
49
- $pp_tax_output = 'objects';
50
- $pp_taxonomies = get_taxonomies( $pp_tax_args, $pp_tax_output );
51
- echo '<select class="alm_element" name="pp-taxonomy-select" id="pp-taxonomy-select">';
52
- echo '<option value="" selected="selected">-- ' . __('Select Taxonomy', 'ajax-load-more') . ' --</option>';
53
- echo '<option value="category">' . __('Category', 'ajax-load-more') . '</option>';
54
- echo '<option value="post_tag">' . __('Tag', 'ajax-load-more') . '</option>';
55
- if ( $pp_taxonomies ) {
56
-
57
- foreach( $pp_taxonomies as $pp_taxonomy ){
58
- echo '<option name="pp-'.$pp_taxonomy->query_var.'" id="pp-'.$pp_taxonomy->query_var.'" value="'.$pp_taxonomy->query_var.'">'.$pp_taxonomy->label.'</option>';
59
- }
60
-
61
- }
62
- echo '</select>';
63
- ?>
64
- </div>
65
- </div>
66
-
67
-
68
- <div class="clear"></div>
69
- <hr>
70
- <div class="section-title">
71
- <h4><?php _e('Excluded Terms ', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A comma-separated list of excluded terms by ID','ajax-load-more'); ?>."></a></h4>
72
- <p><?php _e('Exclude posts by term ID from the previous post query.', 'ajax-load-more'); ?></p>
73
- </div>
74
- <div class="wrap">
75
- <div class="inner">
76
- <input type="text" id="pp-term-exclude" class="alm_element numbers-only" value="" placeholder="5, 8, 35">
77
- </div>
78
- </div>
79
-
80
- <p class="warning-callout">
81
- <?php _e('You must add the Previous Post shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method. &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/" target="_blank">View documentation</a>', 'ajax-load-more'); ?>
82
- </p>
83
- </div>
84
- </div>
85
- </div>
86
- <?php } ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/shortcode-builder/components/rest-api.php CHANGED
@@ -114,7 +114,9 @@
114
  </ul>
115
  </div>
116
  </div>
117
-
 
 
118
  <p class="warning-callout">
119
  <?php _e('Visit <a href="http://v2.wp-api.org/" target="_blank">http://v2.wp-api.org</a> for documentation on creating custom <a href="http://v2.wp-api.org/extending/adding/" target="_blank">Endpoints</a> for use with Ajax Load More.', 'ajax-load-more'); ?>
120
  </p>
114
  </ul>
115
  </div>
116
  </div>
117
+
118
+ <div class="clear"></div>
119
+ <hr>
120
  <p class="warning-callout">
121
  <?php _e('Visit <a href="http://v2.wp-api.org/" target="_blank">http://v2.wp-api.org</a> for documentation on creating custom <a href="http://v2.wp-api.org/extending/adding/" target="_blank">Endpoints</a> for use with Ajax Load More.', 'ajax-load-more'); ?>
122
  </p>
admin/shortcode-builder/components/single-post.php ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if(has_action('alm_single_post_installed')){ ?>
2
+ <div class="row input previous-post add-on" id="alm-previous-post">
3
+ <h3 class="heading" tabindex="0"><?php _e('Single Posts', 'ajax-load-more'); ?></h3>
4
+ <div class="expand-wrap">
5
+ <div class="section-title">
6
+ <p><?php _e('Enable the infinite scrolling of single posts.', 'ajax-load-more'); ?></p>
7
+ </div>
8
+ <div class="wrap">
9
+ <div class="inner">
10
+ <ul>
11
+ <li>
12
+ <input class="alm_element" type="radio" name="prev-post" value="true" id="prev-post-true" >
13
+ <label for="prev-post-true"><?php _e('True', 'ajax-load-more'); ?></label>
14
+ </li>
15
+ <li>
16
+ <input class="alm_element" type="radio" name="prev-post" value="false" id="prev-post-false" checked="checked">
17
+ <label for="prev-post-false"><?php _e('False', 'ajax-load-more'); ?></label>
18
+ </li>
19
+ </ul>
20
+ </div>
21
+ </div>
22
+ <div class="clear"></div>
23
+
24
+ <div class="prev_post_options" style="display: none;">
25
+ <div class="clear"></div>
26
+ <hr>
27
+ <div class="section-title">
28
+ <h4><?php _e('Post ID', 'ajax-load-more'); ?></h4>
29
+ <p><?php _e('The ID of the current single post.', 'ajax-load-more'); ?></p>
30
+ </div>
31
+ <div class="wrap">
32
+ <div class="inner">
33
+ <input type="text" value="get_the_ID()" id="pp_id" class="alm_element disabled-input" disabled="disabled">
34
+ </div>
35
+ </div>
36
+
37
+ <div class="clear"></div>
38
+ <hr>
39
+ <div class="section-title">
40
+ <h4><?php _e('Post Ordering', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('By default, the Single Posts add-on will use the core WordPress `get_previous_post` function, but you can over ride that here.', 'ajax-load-more'); ?>."></a></h4>
41
+ <p><?php _e('Select the load order of posts while infinite scrolling.', 'ajax-load-more'); ?></p>
42
+ <p><a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/#ordering" target="_blank"><?php _e('View Docs', 'ajax-load-more'); ?></a></p>
43
+ </div>
44
+ <div class="wrap">
45
+ <div class="inner">
46
+ <select class="alm_element" name="pp-order" id="pp-order">
47
+ <option value="previous" selected="selected"><?php _e('Previous Post (by date DESC)', 'ajax-load-more'); ?></option>
48
+ <option value="latest"><?php _e('Latest (Start at most recent post)', 'ajax-load-more'); ?></option>
49
+ <option value="next"><?php _e('Next Post (by date ASC)', 'ajax-load-more'); ?></option>
50
+ <option value="post__in"><?php _e('Post ID Array', 'ajax-load-more'); ?></option>
51
+ </select>
52
+ </div>
53
+ </div>
54
+
55
+ <div class="clear"></div>
56
+ <div id="pp_post__in" style="display: none;">
57
+ <div class="clear"></div>
58
+ <hr>
59
+ <div class="section-title">
60
+ <h4><?php _e('Post ID Array', 'ajax-load-more'); ?></h4>
61
+ <p><?php _e('A comma separated list of post ID\'s to query by order.', 'ajax-load-more'); ?></p>
62
+ </div>
63
+ <div class="wrap">
64
+ <div class="inner">
65
+ <input id="pp_post__in_input" class="alm_element numbers-only" type="text" placeholder="23, 66, 99">
66
+ </div>
67
+ </div>
68
+ </div>
69
+
70
+ <div id="pp_extras">
71
+ <div class="clear"></div>
72
+ <hr>
73
+ <div class="section-title">
74
+ <h4><?php _e('Taxonomy', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Selecting a taxonomy means only previous posts from the same taxonomy term will be returned. If a post has multiple terms attached, each term will be considered using an OR relationship query','ajax-load-more'); ?>."></a></h4>
75
+ <p><?php _e('Query previous posts from the same taxonomy term(s).', 'ajax-load-more'); ?></p>
76
+ </div>
77
+ <div class="wrap">
78
+ <div class="inner">
79
+ <?php
80
+ // Taxonomies
81
+ $pp_tax_args = array(
82
+ 'public' => true,
83
+ '_builtin' => false
84
+ );
85
+ $pp_tax_output = 'objects';
86
+ $pp_taxonomies = get_taxonomies( $pp_tax_args, $pp_tax_output );
87
+ echo '<select class="alm_element" name="pp-taxonomy-select" id="pp-taxonomy-select">';
88
+ echo '<option value="" selected="selected">-- ' . __('Select Taxonomy', 'ajax-load-more') . ' --</option>';
89
+ echo '<option value="category">' . __('Category', 'ajax-load-more') . '</option>';
90
+ echo '<option value="post_tag">' . __('Tag', 'ajax-load-more') . '</option>';
91
+ if ( $pp_taxonomies ) {
92
+
93
+ foreach( $pp_taxonomies as $pp_taxonomy ){
94
+ echo '<option name="pp-'.$pp_taxonomy->query_var.'" id="pp-'.$pp_taxonomy->query_var.'" value="'.$pp_taxonomy->query_var.'">'.$pp_taxonomy->label.'</option>';
95
+ }
96
+
97
+ }
98
+ echo '</select>';
99
+ ?>
100
+ </div>
101
+ </div>
102
+
103
+ <div class="clear"></div>
104
+ <hr>
105
+ <div class="section-title">
106
+ <h4><?php _e('Excluded Terms ', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A comma-separated list of excluded terms by ID','ajax-load-more'); ?>."></a></h4>
107
+ <p><?php _e('Exclude posts by term ID from the previous post query.', 'ajax-load-more'); ?></p>
108
+ </div>
109
+ <div class="wrap">
110
+ <div class="inner">
111
+ <input type="text" id="pp-term-exclude" class="alm_element numbers-only" value="" placeholder="5, 8, 35">
112
+ </div>
113
+ </div>
114
+ </div>
115
+
116
+ <div class="clear"></div>
117
+ <hr>
118
+ <p class="warning-callout">
119
+ <?php _e('You must add the Previous Post shortcode directly to your single template file using the <a href="https://developer.wordpress.org/reference/functions/do_shortcode/" target="_blank">do_shortcode</a> method.', 'ajax-load-more'); ?> <a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/" target="_blank"><?php _e('View Docs', 'ajax-load-more'); ?></a>
120
+ </p>
121
+ </div>
122
+ </div>
123
+ </div>
124
+ <?php } ?>
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -195,7 +195,7 @@ jQuery(document).ready(function($) {
195
  acf_field_type = $('#acf_field_type').val(),
196
  acf_field_name = $('#acf_field_name').val();
197
 
198
- $('.acf-options').slideDown(150, 'alm_easeInOutQuad');
199
 
200
  if(acf_field_type !== '' && acf_field_name !== ''){
201
  output += ' acf="'+acf+'"';
@@ -207,7 +207,7 @@ jQuery(document).ready(function($) {
207
  }
208
 
209
  }else{
210
- $('.acf-options').slideUp(150, 'alm_easeInOutQuad')
211
  }
212
 
213
 
@@ -220,13 +220,13 @@ jQuery(document).ready(function($) {
220
  if($('input#cache-id').val() === '')
221
  _alm.generateUniqueID(10); // Generate unique ID on first load
222
 
223
- $('.cache_id').slideDown(150, 'alm_easeInOutQuad');
224
  output += ' cache="'+cache+'"';
225
  var cache_id = $('input#cache-id').val();
226
  if(cache_id)
227
  output += ' cache_id="'+cache_id+'"';
228
  }else{
229
- $('.cache_id').slideUp(150, 'alm_easeInOutQuad')
230
  }
231
 
232
 
@@ -242,7 +242,7 @@ jQuery(document).ready(function($) {
242
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
243
 
244
  if(cta !== 'false' && cta != undefined){
245
- $('.cta_template_wrap').slideDown(150, 'alm_easeInOutQuad');
246
  // Standard repeater
247
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
248
  output += ' cta="'+cta+'"';
@@ -258,7 +258,7 @@ jQuery(document).ready(function($) {
258
  $('#sequence-update').text(cta_position);
259
  $('#sequence-update-before-after').text(cta_before_after);
260
  }else{
261
- $('.cta_template_wrap').slideUp(150, 'alm_easeInOutQuad');
262
  }
263
 
264
 
@@ -301,9 +301,9 @@ jQuery(document).ready(function($) {
301
  if(comments_callback !== '')
302
  output += ' comments_callback="'+comments_callback+'"';
303
 
304
- $('.comments_extras').slideDown(150, 'alm_easeInOutQuad');
305
  }else{
306
- $('.comments_extras').slideUp(150, 'alm_easeInOutQuad');
307
  }
308
 
309
 
@@ -315,7 +315,7 @@ jQuery(document).ready(function($) {
315
  var filters = $('.filters input[name=filters]:checked').val();
316
  if(filters !== 'false' && filters != undefined){
317
 
318
- $('.filters_options').slideDown(150, 'alm_easeInOutQuad');
319
 
320
 
321
  var filters_id = $('#alm-filters select');
@@ -337,7 +337,7 @@ jQuery(document).ready(function($) {
337
 
338
  }else{
339
 
340
- $('.filters_options').slideUp(150, 'alm_easeInOutQuad');
341
 
342
  }
343
 
@@ -356,7 +356,7 @@ jQuery(document).ready(function($) {
356
  nextpage_scrollspeed = $('input#next-page-scroll-speed').val(),
357
  nextpage_scrolltop = $('input#next-page-scroll-top').val();
358
 
359
- $('.next-page-content').slideDown(150, 'alm_easeInOutQuad');
360
 
361
  output += ' nextpage="'+nextpage+'"';
362
  output += ' nextpage_post_id="\'.'+nextpage_post_id+'.\'"';
@@ -375,7 +375,7 @@ jQuery(document).ready(function($) {
375
 
376
 
377
  }else{
378
- $('.next-page-content').slideUp(150, 'alm_easeInOutQuad');
379
  }
380
 
381
 
@@ -397,9 +397,9 @@ jQuery(document).ready(function($) {
397
  if(paging_classes !== ''){
398
  output += ' paging_classes="'+paging_classes+'"';
399
  }
400
- $('#nav-controls').slideDown(150, 'alm_easeInOutQuad');
401
  }else{
402
- $('#nav-controls').slideUp(150, 'alm_easeInOutQuad');
403
  }
404
 
405
 
@@ -413,41 +413,14 @@ jQuery(document).ready(function($) {
413
  if(preload !== 'false' && preload != undefined){
414
 
415
  if(seo !== 'true')
416
- $('.preload_amount').slideDown(150, 'alm_easeInOutQuad');
417
 
418
  output += ' preloaded="'+preload+'"';
419
  var preload_amount = $('.preload input#preload-amount').val();
420
  if(preload_amount > 0 && preload_amount != 5)
421
  output += ' preloaded_amount="'+preload_amount+'"';
422
  }else{
423
- $('.preload_amount').slideUp(150, 'alm_easeInOutQuad');
424
- }
425
-
426
-
427
-
428
- // ---------------------------
429
- // - Previous Post
430
- // ---------------------------
431
-
432
- var previous = $('.previous-post input[name=prev-post]:checked').val();
433
- if(previous !== 'false' && previous != undefined){
434
-
435
- var prev_post_id = $('#prev_post_id').val(),
436
- previous_post_taxonomy = $('#pp-taxonomy-select').val(),
437
- previous_post_excluded_terms = $('#pp-term-exclude').val();
438
- $('.prev_post_id').slideDown(150, 'alm_easeInOutQuad');
439
-
440
- output += ' previous_post="'+previous+'"';
441
- output += ' previous_post_id="\'.'+prev_post_id+'.\'"';
442
-
443
- if(previous_post_taxonomy !== '' )
444
- output += ' previous_post_taxonomy="'+previous_post_taxonomy+'"';
445
-
446
- if(previous_post_excluded_terms !== '' )
447
- output += ' previous_post_excluded_terms="'+previous_post_excluded_terms+'"';
448
-
449
- }else{
450
- $('.prev_post_id').slideUp(150, 'alm_easeInOutQuad');
451
  }
452
 
453
 
@@ -458,7 +431,7 @@ jQuery(document).ready(function($) {
458
 
459
  var rest = $('#alm-rest input[name=rest]:checked').val();
460
  if(rest !== 'false' && rest != undefined){
461
- $('.restapi_options').slideDown(150, 'alm_easeInOutQuad');
462
  output += ' restapi="'+rest+'"';
463
 
464
  var restapi_base = $('#alm-rest input#rest-base').val().trim(),
@@ -485,7 +458,7 @@ jQuery(document).ready(function($) {
485
  output += ' restapi_debug="'+restapi_debug+'"';
486
 
487
  }else{
488
- $('.restapi_options').slideUp(150, 'alm_easeInOutQuad')
489
  }
490
 
491
 
@@ -495,12 +468,62 @@ jQuery(document).ready(function($) {
495
 
496
  if(seo !== 'false' && seo != undefined){
497
  if(preload === 'true')
498
- $('.preload_amount').slideUp(150, 'alm_easeInOutQuad');
499
 
500
  output += ' seo="'+seo+'"';
501
  }
502
 
503
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
504
  // ---------------------------
505
  // - Users
506
  // ---------------------------
@@ -535,7 +558,7 @@ jQuery(document).ready(function($) {
535
  users_role = $('#alm-users select#users-role').val(); // Get new users_role value
536
 
537
 
538
- $('#users-extended').slideDown(150, 'alm_easeInOutQuad');
539
 
540
  output += ' users="'+users+'"';
541
 
@@ -560,7 +583,7 @@ jQuery(document).ready(function($) {
560
 
561
 
562
  }else{
563
- $('#users-extended').slideUp(150, 'alm_easeInOutQuad');
564
  }
565
 
566
 
@@ -612,10 +635,10 @@ jQuery(document).ready(function($) {
612
  // ---------------------------
613
 
614
  if(selected_post_type !== 'post'){
615
- $('.sticky-wrap').slideUp(150, 'alm_easeInOutQuad');
616
  $('input[name=alm_sticky_posts]').prop('checked', false);
617
  }else{
618
- $('.sticky-wrap').slideDown(150, 'alm_easeInOutQuad');
619
  }
620
 
621
  var sticky_posts = $('input[name=alm_sticky_posts]:checked').val();
@@ -1051,16 +1074,16 @@ jQuery(document).ready(function($) {
1051
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
1052
  if(scroll_load === 'f'){
1053
 
1054
- $('.max_pages, .scroll_distance, .pause_override, .scroll_container').slideUp(150, 'alm_easeInOutQuad');
1055
  if($('.scroll_load input').hasClass('changed'))
1056
  output += ' scroll="false"';
1057
 
1058
  }else{
1059
 
1060
- $('.max_pages, .scroll_distance, .pause_override, .scroll_container').slideDown(150, 'alm_easeInOutQuad');
1061
 
1062
  var scroll_distance = $('.scroll_distance input').val();
1063
- if(scroll_distance != 150)
1064
  output += ' scroll_distance="'+$('.scroll_distance input').val()+'"';
1065
 
1066
  var scroll_container = $('.scroll_container input').val();
@@ -1088,8 +1111,8 @@ jQuery(document).ready(function($) {
1088
 
1089
  if(transition === 'masonry'){
1090
 
1091
- $('.masonry-options').slideDown(150, 'alm_easeInOutQuad');
1092
- $('.masonry-options-hide').slideUp(150, 'alm_easeInOutQuad');
1093
  var masonry_selector = $('.transition input#masonry-item').val();
1094
  var masonry_columnwidth = $('.transition input#masonry-columnwidth').val();
1095
  var masonry_animation = $('input[name=masonry-animation]:checked').val();
@@ -1109,17 +1132,17 @@ jQuery(document).ready(function($) {
1109
 
1110
  }else{
1111
 
1112
- $('.masonry-options').slideUp(150, 'alm_easeInOutQuad');
1113
- $('.masonry-options-hide').slideDown(150, 'alm_easeInOutQuad');
1114
 
1115
  // Hide transition_container if masonry is selected
1116
  var transition_container = $('.transition input[name=remove_container]:checked').val();
1117
  var transition_container_classes = $('.transition input#transition-container-classes').val();
1118
  if(transition_container === 'f' && seo !== 'true' && previous !== 'true'){
1119
  output += ' transition_container="false"';
1120
- $('.transition-container-classes-wrap').slideUp(150, 'alm_easeInOutQuad');
1121
  }else{
1122
- $('.transition-container-classes-wrap').slideDown(150, 'alm_easeInOutQuad');
1123
  }
1124
 
1125
  // Hide transition_container_classes if Previous Post or Next Page is true.
@@ -1137,7 +1160,7 @@ jQuery(document).ready(function($) {
1137
  var progress_bar = $('.alm-progress-bar input[name=progress_bar]:checked').val();
1138
  if(progress_bar === 't'){
1139
  var progress_bar_color = $('.alm-progress-bar input[name=progress_bar_color]').val();
1140
- $('.progress-bar-options').slideDown(150, 'alm_easeInOutQuad');
1141
  output += ' progress_bar="true"';
1142
  $('.progress_bar_color_indicator').removeAttr('style');
1143
  if(progress_bar_color){
@@ -1147,7 +1170,7 @@ jQuery(document).ready(function($) {
1147
  output += ' progress_bar_color="'+ progress_bar_color +'"';
1148
  }
1149
  }else{
1150
- $('.progress-bar-options').slideUp(150, 'alm_easeInOutQuad');
1151
  }
1152
 
1153
 
195
  acf_field_type = $('#acf_field_type').val(),
196
  acf_field_name = $('#acf_field_name').val();
197
 
198
+ $('.acf-options').slideDown(250, 'alm_easeInOutQuad');
199
 
200
  if(acf_field_type !== '' && acf_field_name !== ''){
201
  output += ' acf="'+acf+'"';
207
  }
208
 
209
  }else{
210
+ $('.acf-options').slideUp(250, 'alm_easeInOutQuad')
211
  }
212
 
213
 
220
  if($('input#cache-id').val() === '')
221
  _alm.generateUniqueID(10); // Generate unique ID on first load
222
 
223
+ $('.cache_id').slideDown(250, 'alm_easeInOutQuad');
224
  output += ' cache="'+cache+'"';
225
  var cache_id = $('input#cache-id').val();
226
  if(cache_id)
227
  output += ' cache_id="'+cache_id+'"';
228
  }else{
229
+ $('.cache_id').slideUp(250, 'alm_easeInOutQuad')
230
  }
231
 
232
 
242
  var cta_theme_repeater = $('select[name=theme-repeater-select]', cta_container).val();
243
 
244
  if(cta !== 'false' && cta != undefined){
245
+ $('.cta_template_wrap').slideDown(250, 'alm_easeInOutQuad');
246
  // Standard repeater
247
  if(cta_repeater != '' && cta_repeater != undefined && cta_position != '' && cta_position != null){
248
  output += ' cta="'+cta+'"';
258
  $('#sequence-update').text(cta_position);
259
  $('#sequence-update-before-after').text(cta_before_after);
260
  }else{
261
+ $('.cta_template_wrap').slideUp(250, 'alm_easeInOutQuad');
262
  }
263
 
264
 
301
  if(comments_callback !== '')
302
  output += ' comments_callback="'+comments_callback+'"';
303
 
304
+ $('.comments_extras').slideDown(250, 'alm_easeInOutQuad');
305
  }else{
306
+ $('.comments_extras').slideUp(250, 'alm_easeInOutQuad');
307
  }
308
 
309
 
315
  var filters = $('.filters input[name=filters]:checked').val();
316
  if(filters !== 'false' && filters != undefined){
317
 
318
+ $('.filters_options').slideDown(250, 'alm_easeInOutQuad');
319
 
320
 
321
  var filters_id = $('#alm-filters select');
337
 
338
  }else{
339
 
340
+ $('.filters_options').slideUp(250, 'alm_easeInOutQuad');
341
 
342
  }
343
 
356
  nextpage_scrollspeed = $('input#next-page-scroll-speed').val(),
357
  nextpage_scrolltop = $('input#next-page-scroll-top').val();
358
 
359
+ $('.next-page-content').slideDown(250, 'alm_easeInOutQuad');
360
 
361
  output += ' nextpage="'+nextpage+'"';
362
  output += ' nextpage_post_id="\'.'+nextpage_post_id+'.\'"';
375
 
376
 
377
  }else{
378
+ $('.next-page-content').slideUp(250, 'alm_easeInOutQuad');
379
  }
380
 
381
 
397
  if(paging_classes !== ''){
398
  output += ' paging_classes="'+paging_classes+'"';
399
  }
400
+ $('#nav-controls').slideDown(250, 'alm_easeInOutQuad');
401
  }else{
402
+ $('#nav-controls').slideUp(250, 'alm_easeInOutQuad');
403
  }
404
 
405
 
413
  if(preload !== 'false' && preload != undefined){
414
 
415
  if(seo !== 'true')
416
+ $('.preload_amount').slideDown(250, 'alm_easeInOutQuad');
417
 
418
  output += ' preloaded="'+preload+'"';
419
  var preload_amount = $('.preload input#preload-amount').val();
420
  if(preload_amount > 0 && preload_amount != 5)
421
  output += ' preloaded_amount="'+preload_amount+'"';
422
  }else{
423
+ $('.preload_amount').slideUp(250, 'alm_easeInOutQuad');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  }
425
 
426
 
431
 
432
  var rest = $('#alm-rest input[name=rest]:checked').val();
433
  if(rest !== 'false' && rest != undefined){
434
+ $('.restapi_options').slideDown(250, 'alm_easeInOutQuad');
435
  output += ' restapi="'+rest+'"';
436
 
437
  var restapi_base = $('#alm-rest input#rest-base').val().trim(),
458
  output += ' restapi_debug="'+restapi_debug+'"';
459
 
460
  }else{
461
+ $('.restapi_options').slideUp(250, 'alm_easeInOutQuad')
462
  }
463
 
464
 
468
 
469
  if(seo !== 'false' && seo != undefined){
470
  if(preload === 'true')
471
+ $('.preload_amount').slideUp(250, 'alm_easeInOutQuad');
472
 
473
  output += ' seo="'+seo+'"';
474
  }
475
 
476
 
477
+
478
+ // ---------------------------
479
+ // - Single Post
480
+ // ---------------------------
481
+
482
+ var previous = $('.previous-post input[name=prev-post]:checked').val();
483
+ if(previous !== 'false' && previous != undefined){
484
+
485
+ var pp_id = $('#pp_id').val(),
486
+ pp_order = $('#pp-order').val(),
487
+ pp_post__in_order = $('#pp_post__in_input').val(),
488
+ pp_taxonomy = $('#pp-taxonomy-select').val(),
489
+ pp_excluded_terms = $('#pp-term-exclude').val();
490
+
491
+ $('.prev_post_options').slideDown(250, 'alm_easeInOutQuad');
492
+
493
+ $('#pp-taxonomy-select').attr('disabled', false);
494
+ $('#pp-term-exclude').attr('disabled', false);
495
+
496
+ output += ' single_post="'+previous+'"';
497
+ output += ' single_post_id="\'.'+pp_id+'.\'"';
498
+
499
+ if(pp_order === ''){
500
+ output += ' single_post_order="previous"';
501
+ $('#pp_post__in').slideUp(250, 'alm_easeInOutQuad');
502
+ $('#pp_extras').slideDown(250, 'alm_easeInOutQuad');
503
+ } else {
504
+ if(pp_order === 'post__in'){
505
+ pp_taxonomy = '';
506
+ pp_excluded_terms = '';
507
+ output += ' single_post_order="'+pp_post__in_order+'"';
508
+ $('#pp-taxonomy-select').attr('disabled', true);
509
+ $('#pp-term-exclude').attr('disabled', true);
510
+ $('#pp_post__in').slideDown(250, 'alm_easeInOutQuad');
511
+ $('#pp_extras').slideUp(250, 'alm_easeInOutQuad');
512
+ } else {
513
+ output += ' single_post_order="'+pp_order+'"';
514
+ $('#pp_post__in').slideUp(250, 'alm_easeInOutQuad');
515
+ $('#pp_extras').slideDown(250, 'alm_easeInOutQuad');
516
+ }
517
+ }
518
+
519
+ output += (pp_taxonomy !== '' ) ? ' single_post_taxonomy="'+pp_taxonomy+'"' : '';
520
+ output += (pp_excluded_terms !== '' ) ? ' single_post_excluded_terms="'+pp_excluded_terms+'"' : '';
521
+
522
+ }else{
523
+ $('.prev_post_options').slideUp(250, 'alm_easeInOutQuad');
524
+ }
525
+
526
+
527
  // ---------------------------
528
  // - Users
529
  // ---------------------------
558
  users_role = $('#alm-users select#users-role').val(); // Get new users_role value
559
 
560
 
561
+ $('#users-extended').slideDown(250, 'alm_easeInOutQuad');
562
 
563
  output += ' users="'+users+'"';
564
 
583
 
584
 
585
  }else{
586
+ $('#users-extended').slideUp(250, 'alm_easeInOutQuad');
587
  }
588
 
589
 
635
  // ---------------------------
636
 
637
  if(selected_post_type !== 'post'){
638
+ $('.sticky-wrap').slideUp(250, 'alm_easeInOutQuad');
639
  $('input[name=alm_sticky_posts]').prop('checked', false);
640
  }else{
641
+ $('.sticky-wrap').slideDown(250, 'alm_easeInOutQuad');
642
  }
643
 
644
  var sticky_posts = $('input[name=alm_sticky_posts]:checked').val();
1074
  var scroll_load = $('.scroll_load input[name=scroll]:checked').val();
1075
  if(scroll_load === 'f'){
1076
 
1077
+ $('.max_pages, .scroll_distance, .pause_override, .scroll_container').slideUp(250, 'alm_easeInOutQuad');
1078
  if($('.scroll_load input').hasClass('changed'))
1079
  output += ' scroll="false"';
1080
 
1081
  }else{
1082
 
1083
+ $('.max_pages, .scroll_distance, .pause_override, .scroll_container').slideDown(250, 'alm_easeInOutQuad');
1084
 
1085
  var scroll_distance = $('.scroll_distance input').val();
1086
+ if(scroll_distance !== '100')
1087
  output += ' scroll_distance="'+$('.scroll_distance input').val()+'"';
1088
 
1089
  var scroll_container = $('.scroll_container input').val();
1111
 
1112
  if(transition === 'masonry'){
1113
 
1114
+ $('.masonry-options').slideDown(250, 'alm_easeInOutQuad');
1115
+ $('.masonry-options-hide').slideUp(250, 'alm_easeInOutQuad');
1116
  var masonry_selector = $('.transition input#masonry-item').val();
1117
  var masonry_columnwidth = $('.transition input#masonry-columnwidth').val();
1118
  var masonry_animation = $('input[name=masonry-animation]:checked').val();
1132
 
1133
  }else{
1134
 
1135
+ $('.masonry-options').slideUp(250, 'alm_easeInOutQuad');
1136
+ $('.masonry-options-hide').slideDown(250, 'alm_easeInOutQuad');
1137
 
1138
  // Hide transition_container if masonry is selected
1139
  var transition_container = $('.transition input[name=remove_container]:checked').val();
1140
  var transition_container_classes = $('.transition input#transition-container-classes').val();
1141
  if(transition_container === 'f' && seo !== 'true' && previous !== 'true'){
1142
  output += ' transition_container="false"';
1143
+ $('.transition-container-classes-wrap').slideUp(250, 'alm_easeInOutQuad');
1144
  }else{
1145
+ $('.transition-container-classes-wrap').slideDown(250, 'alm_easeInOutQuad');
1146
  }
1147
 
1148
  // Hide transition_container_classes if Previous Post or Next Page is true.
1160
  var progress_bar = $('.alm-progress-bar input[name=progress_bar]:checked').val();
1161
  if(progress_bar === 't'){
1162
  var progress_bar_color = $('.alm-progress-bar input[name=progress_bar_color]').val();
1163
+ $('.progress-bar-options').slideDown(250, 'alm_easeInOutQuad');
1164
  output += ' progress_bar="true"';
1165
  $('.progress_bar_color_indicator').removeAttr('style');
1166
  if(progress_bar_color){
1170
  output += ' progress_bar_color="'+ progress_bar_color +'"';
1171
  }
1172
  }else{
1173
+ $('.progress-bar-options').slideUp(250, 'alm_easeInOutQuad');
1174
  }
1175
 
1176
 
admin/shortcode-builder/shortcode-builder.php CHANGED
@@ -31,9 +31,9 @@
31
  require_once('components/nextpage.php');
32
  require_once('components/paging.php');
33
  require_once('components/preloaded.php');
34
- require_once('components/previous-post.php');
35
  require_once('components/rest-api.php');
36
  require_once('components/seo.php');
 
37
  require_once('components/users.php');
38
  ?>
39
  </div>
@@ -54,8 +54,8 @@
54
  <!-- ID -->
55
  <div class="section-title">
56
  <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter','ajax-load-more'); ?>."></a></h4>
57
- <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?><br/>
58
- &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args" target="_blank">Learn More</a></p>
59
  </div>
60
  <div class="wrap">
61
  <div class="inner">
@@ -245,11 +245,11 @@
245
  <hr>
246
  <div class="section-title">
247
  <h4><?php _e('Scroll Distance', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Distance is based on the position of the loading button from the bottom of the screen','ajax-load-more'); ?>."></a></h4>
248
- <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 150)', 'ajax-load-more'); ?></p>
249
  </div>
250
  <div class="wrap">
251
  <div class="inner">
252
- <input type="number" class="alm_element numbers-only" name="scroll-distance" id="scroll-distance" step="10" min="0" value="150">
253
  </div>
254
  </div>
255
  </div>
@@ -441,7 +441,7 @@
441
  <hr>
442
 
443
  <div class="section-title">
444
- <h4><?php _e('Transition Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('This setting is not available with the Previous Post or Next Page add-ons','ajax-load-more'); ?>."></a></h4>
445
  <p><?php _e('Add custom classes to the <span>.alm-reveal</span> loading container', 'ajax-load-more'); ?>.</p>
446
  </div>
447
  <div class="wrap">
@@ -506,10 +506,8 @@
506
  <h3 class="heading" tabindex="0"><?php _e('Progress Bar', 'ajax-load-more'); ?></h3>
507
  <div class="expand-wrap">
508
  <div class="section-title">
509
- <p><?php _e('Display progress bar indicator at the top of the window while loading Ajax content', 'ajax-load-more'); ?>.<br/>
510
- &raquo; <a href="https://connekthq.com/plugins/ajax-load-more/examples/progress-bar/" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a>
511
-
512
- </p>
513
  </div>
514
  <div class="wrap">
515
  <div class="inner">
@@ -726,9 +724,8 @@
726
  <div class="section-title">
727
  <h4><?php _e('Include', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Get posts by category using a category_name or category__and query','ajax-load-more'); ?>."></a></h4>
728
  <p><?php _e('Comma separated list of categories to include by', 'ajax-load-more'); ?> <strong class="alm-populate"><?php _e('slug', 'ajax-load-more'); ?></strong>.
729
- <small class="alm-populate-eg">e.g. design, research etc...</small>
730
- <br/>
731
- &raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-category" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
732
  </div>
733
  <div class="wrap">
734
  <div class="inner">
@@ -816,8 +813,8 @@
816
  <div class="section-title">
817
  <h4><?php _e('Include', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Get posts by tags using a tag or tag__and query','ajax-load-more'); ?>."></a></h4>
818
  <p><?php _e('Comma separated list of tags to include by', 'ajax-load-more'); ?> <strong class="alm-populate"><?php _e('slug', 'ajax-load-more'); ?></strong>.
819
- <small class="alm-populate-eg">e.g. toronto, canada etc...</small>
820
- <br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-tag" target="_blank">
821
  <?php _e('View Example', 'ajax-load-more'); ?>
822
  </a></p>
823
  </div>
@@ -960,7 +957,8 @@
960
  <h3 class="heading" tabindex="0"><?php _e('Date', 'ajax-load-more'); ?></h3>
961
  <div class="expand-wrap">
962
  <div class="section-title">
963
- <p><?php _e('Enter a year, month(number) and day to query by date archive.<br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-date" target="_blank">View Example</a>', 'ajax-load-more'); ?></p>
 
964
  </div>
965
  <div class="wrap">
966
  <div class="inner">
@@ -994,7 +992,10 @@
994
  echo '<h3 class="heading" tabindex="0">' . __('Author', 'ajax-load-more') . '</h3>';
995
  echo '<div class="expand-wrap">';
996
  echo '<div class="section-title">';
997
- echo '<p>' . __('Select an Author to query(by ID).', 'ajax-load-more') . '<br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-author" target="_blank">View Example</a></p>';
 
 
 
998
  echo '</div>';
999
  echo '<div class="wrap"><div class="inner">';
1000
  if(!$disable_dynamic_content){
@@ -1046,7 +1047,8 @@
1046
  <hr/>
1047
  <div class="section-title">
1048
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1049
- <p><?php _e('A comma separated list of post ID\'s to exclude from query.', 'ajax-load-more'); ?><br/>&raquo; <a href="admin.php?page=ajax-load-more-help&section=examples#example-exclude" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
 
1050
  </div>
1051
  <div class="wrap">
1052
  <div class="inner">
31
  require_once('components/nextpage.php');
32
  require_once('components/paging.php');
33
  require_once('components/preloaded.php');
 
34
  require_once('components/rest-api.php');
35
  require_once('components/seo.php');
36
+ require_once('components/single-post.php');
37
  require_once('components/users.php');
38
  ?>
39
  </div>
54
  <!-- ID -->
55
  <div class="section-title">
56
  <h4><?php _e('ID', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding a unique ID will allow you target this specific Ajax Load More instance with the alm_query_args_id() filter','ajax-load-more'); ?>."></a></h4>
57
+ <p><?php _e('Set a unique ID for this Ajax Load More instance.', 'ajax-load-more'); ?></p>
58
+ <p><a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args" target="_blank"><?php _e('Learn More', 'ajax-load-more'); ?></a></p>
59
  </div>
60
  <div class="wrap">
61
  <div class="inner">
245
  <hr>
246
  <div class="section-title">
247
  <h4><?php _e('Scroll Distance', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Distance is based on the position of the loading button from the bottom of the screen','ajax-load-more'); ?>."></a></h4>
248
+ <p><?php _e('The distance from the bottom of the screen to trigger loading of posts. (Default = 100)', 'ajax-load-more'); ?></p>
249
  </div>
250
  <div class="wrap">
251
  <div class="inner">
252
+ <input type="number" class="alm_element numbers-only" name="scroll-distance" id="scroll-distance" step="10" min="0" value="100">
253
  </div>
254
  </div>
255
  </div>
441
  <hr>
442
 
443
  <div class="section-title">
444
+ <h4><?php _e('Transition Container Classes', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('This setting is not available with the Single Post or Next Page add-ons','ajax-load-more'); ?>."></a></h4>
445
  <p><?php _e('Add custom classes to the <span>.alm-reveal</span> loading container', 'ajax-load-more'); ?>.</p>
446
  </div>
447
  <div class="wrap">
506
  <h3 class="heading" tabindex="0"><?php _e('Progress Bar', 'ajax-load-more'); ?></h3>
507
  <div class="expand-wrap">
508
  <div class="section-title">
509
+ <p><?php _e('Display progress bar indicator at the top of the window while loading Ajax content.', 'ajax-load-more'); ?></p>
510
+ <p><a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/examples/progress-bar/" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
 
 
511
  </div>
512
  <div class="wrap">
513
  <div class="inner">
724
  <div class="section-title">
725
  <h4><?php _e('Include', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Get posts by category using a category_name or category__and query','ajax-load-more'); ?>."></a></h4>
726
  <p><?php _e('Comma separated list of categories to include by', 'ajax-load-more'); ?> <strong class="alm-populate"><?php _e('slug', 'ajax-load-more'); ?></strong>.
727
+ <small class="alm-populate-eg">e.g. design, research etc...</small></p>
728
+ <p><a class="button-small" href="admin.php?page=ajax-load-more-help&section=examples#example-category" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
 
729
  </div>
730
  <div class="wrap">
731
  <div class="inner">
813
  <div class="section-title">
814
  <h4><?php _e('Include', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Get posts by tags using a tag or tag__and query','ajax-load-more'); ?>."></a></h4>
815
  <p><?php _e('Comma separated list of tags to include by', 'ajax-load-more'); ?> <strong class="alm-populate"><?php _e('slug', 'ajax-load-more'); ?></strong>.
816
+ <small class="alm-populate-eg">e.g. toronto, canada etc...</small></p>
817
+ <p><a class="button-small" href="admin.php?page=ajax-load-more-help&section=examples#example-tag" target="_blank">
818
  <?php _e('View Example', 'ajax-load-more'); ?>
819
  </a></p>
820
  </div>
957
  <h3 class="heading" tabindex="0"><?php _e('Date', 'ajax-load-more'); ?></h3>
958
  <div class="expand-wrap">
959
  <div class="section-title">
960
+ <p><?php _e('Enter a year, month(number) and day to query by date archive.', 'ajax-load-more'); ?></p>
961
+ <p><a class="button-small" href="admin.php?page=ajax-load-more-help&section=examples#example-date" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
962
  </div>
963
  <div class="wrap">
964
  <div class="inner">
992
  echo '<h3 class="heading" tabindex="0">' . __('Author', 'ajax-load-more') . '</h3>';
993
  echo '<div class="expand-wrap">';
994
  echo '<div class="section-title">';
995
+ echo '<p>' . __('Select an Author to query(by ID).', 'ajax-load-more') . '</p>';
996
+ ?>
997
+ <p><a class="button-small" href="admin.php?page=ajax-load-more-help&section=examples#example-author" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
998
+ <?php
999
  echo '</div>';
1000
  echo '<div class="wrap"><div class="inner">';
1001
  if(!$disable_dynamic_content){
1047
  <hr/>
1048
  <div class="section-title">
1049
  <h4><?php _e('Exclude', 'ajax-load-more'); ?></h4>
1050
+ <p><?php _e('A comma separated list of post ID\'s to exclude from query.', 'ajax-load-more'); ?></p>
1051
+ <P><a class="button-small" href="admin.php?page=ajax-load-more-help&section=examples#example-exclude" target="_blank"><?php _e('View Example', 'ajax-load-more'); ?></a></p>
1052
  </div>
1053
  <div class="wrap">
1054
  <div class="inner">
admin/src/scss/admin.scss CHANGED
@@ -295,10 +295,21 @@ a.layout-hover{
295
  margin-top: -10px;
296
  opacity: 0.7;
297
  }
 
 
 
298
  .ajax-load-more p.small.reset-shortcode-builder{
 
 
 
 
299
  text-align: right;
300
- margin: 10px 0 0;
 
301
  display: none;
 
 
 
302
  }
303
  .ajax-load-more p.small.reset-shortcode-builder a{
304
  text-decoration: none;
@@ -420,6 +431,21 @@ a.layout-hover{
420
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
421
  }
422
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
423
 
424
  .ajax-load-more ul{
425
  padding: 0;
@@ -435,6 +461,7 @@ a.layout-hover{
435
  display: inline-block;
436
  vertical-align: top;
437
  overflow: visible;
 
438
  }
439
 
440
  .ajax-load-more label.full{
@@ -608,24 +635,40 @@ a.layout-hover{
608
  }
609
 
610
  .ajax-load-more p.warning-callout{
611
- background-color: #cbecf7;
612
- border-left: 5px solid #5e99ac;
613
  color: #333;
614
- font-size: 13px;
615
  margin: 0;
616
  display: block;
617
- padding: 12px 12px 12px 17px;
618
  border-radius: 3px;
619
  margin: 10px;
620
  width: auto;
621
  line-height: 1.55;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  }
623
  .ajax-load-more p.warning-callout strong{
624
  display: inline-block;
625
  font-weight: normal;
626
- font-family: Consolas,monaco,monospace;
627
- background-color: #edfbff;
628
- color:#525c5f;
629
  padding: 0 6px;
630
  border-radius: 2px;
631
  }
@@ -959,8 +1002,13 @@ hr.indented{ // Indented as fake padding in shortcode builder
959
  }
960
  .ajax-load-more .section-title {
961
  float: left;
962
- padding: 20px 0 20px 20px;
963
  width: 35%;
 
 
 
 
 
964
  p:last-of-type{
965
  margin-bottom: 0;
966
  }
@@ -969,22 +1017,17 @@ hr.indented{ // Indented as fake padding in shortcode builder
969
  padding-top: 8px;
970
  display: block;
971
  }
972
- }
973
-
974
- .ajax-load-more .section-title.full {
975
- width: 100%;
976
- float: none;
977
- }
978
- .ajax-load-more .section-title h4{
979
  font-size: 14px;
980
  font-weight: 600;
981
  margin-bottom: 15px;
982
- }
983
- .ajax-load-more .section-title p,
984
- .ajax-load-more .wrap p.descriptor{
985
- font-size: 13px;
986
- line-height: 20px;
987
- color: #999;
 
988
  }
989
  .ajax-load-more .wrap p.descriptor{
990
  margin: 0;
@@ -1636,7 +1679,9 @@ table.highlight{
1636
  flex-wrap: wrap;
1637
  margin-bottom: 20px;
1638
  border-top: 1px solid #e1e1e1;
1639
- border-left: 1px solid #e1e1e1;
 
 
1640
  }
1641
 
1642
  #alm-add-ons {}
@@ -2802,7 +2847,10 @@ p.theme-title{
2802
  .shortcode-builder input[type=radio],
2803
  .ajax-load-more .form-table input[type=checkbox],
2804
  .ajax-load-more .form-table input[type=radio]{
2805
- display:none;
 
 
 
2806
  }
2807
 
2808
  .shortcode-builder input[type=checkbox] + label,
295
  margin-top: -10px;
296
  opacity: 0.7;
297
  }
298
+ .ajax-load-more.shortcode-builder .major-publishing-actions{
299
+ position: relative;
300
+ }
301
  .ajax-load-more p.small.reset-shortcode-builder{
302
+ position: absolute;
303
+ right: 15px;
304
+ top: 50%;
305
+ transform: translateY(-45%);
306
  text-align: right;
307
+ margin: 0;
308
+ padding: 0;
309
  display: none;
310
+ width: auto;
311
+ opacity: 1;
312
+ font-size: 12px;
313
  }
314
  .ajax-load-more p.small.reset-shortcode-builder a{
315
  text-decoration: none;
431
  font-family: -apple-system,BlinkMacSystemFont, "Segoe UI", Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
432
  }
433
 
434
+ a.button-small{
435
+ text-decoration: none;
436
+ font-size: 11px;
437
+ padding: 7px;
438
+ display: inline-block;
439
+ background-color: #eaf6fb;
440
+ color: #333;
441
+ line-height: 1.1;
442
+ border-radius: 2px;
443
+ &:hover,
444
+ &:focus{
445
+ color: #222;
446
+ background-color: #d9edf5;
447
+ }
448
+ }
449
 
450
  .ajax-load-more ul{
451
  padding: 0;
461
  display: inline-block;
462
  vertical-align: top;
463
  overflow: visible;
464
+ position: relative;
465
  }
466
 
467
  .ajax-load-more label.full{
635
  }
636
 
637
  .ajax-load-more p.warning-callout{
638
+ background-color: #eaf6fb;
639
+ border-left: 6px solid #4e99bf;
640
  color: #333;
641
+ font-size: 12px;
642
  margin: 0;
643
  display: block;
644
+ padding: 18px 100px 18px 18px;
645
  border-radius: 3px;
646
  margin: 10px;
647
  width: auto;
648
  line-height: 1.55;
649
+ position: relative;
650
+ a{
651
+ color: #0071ac;
652
+ }
653
+ a.button-small{
654
+ position: absolute;
655
+ right: 14px;
656
+ top: 14px;
657
+ font-size: 12px;
658
+ display: inline-block;
659
+ background-color: rgba(255, 255, 255, 0.65);
660
+ margin: 0 0 0 10px;
661
+ &:hover,
662
+ &:focus{
663
+ background-color: #fff;
664
+ }
665
+ }
666
  }
667
  .ajax-load-more p.warning-callout strong{
668
  display: inline-block;
669
  font-weight: normal;
670
+ font-family: Consolas, monaco, monospace;
671
+ background-color: #fff;
 
672
  padding: 0 6px;
673
  border-radius: 2px;
674
  }
1002
  }
1003
  .ajax-load-more .section-title {
1004
  float: left;
1005
+ padding: 20px 0 25px 20px;
1006
  width: 35%;
1007
+ &.full{
1008
+ width: 100%;
1009
+ float: none;
1010
+ padding-right: 25px;
1011
+ }
1012
  p:last-of-type{
1013
  margin-bottom: 0;
1014
  }
1017
  padding-top: 8px;
1018
  display: block;
1019
  }
1020
+ h4{
 
 
 
 
 
 
1021
  font-size: 14px;
1022
  font-weight: 600;
1023
  margin-bottom: 15px;
1024
+ }
1025
+ p,
1026
+ .wrap p.descriptor{
1027
+ font-size: 13px;
1028
+ line-height: 20px;
1029
+ color: #999;
1030
+ }
1031
  }
1032
  .ajax-load-more .wrap p.descriptor{
1033
  margin: 0;
1679
  flex-wrap: wrap;
1680
  margin-bottom: 20px;
1681
  border-top: 1px solid #e1e1e1;
1682
+ border-left: 1px solid #e1e1e1;
1683
+ background-color: #f7f7f7;
1684
+ box-shadow: inset 0 0 0 1px #e1e1e1;
1685
  }
1686
 
1687
  #alm-add-ons {}
2847
  .shortcode-builder input[type=radio],
2848
  .ajax-load-more .form-table input[type=checkbox],
2849
  .ajax-load-more .form-table input[type=radio]{
2850
+ width: 0;
2851
+ height: 0;
2852
+ opacity: 0;
2853
+ position: absolute;
2854
  }
2855
 
2856
  .shortcode-builder input[type=checkbox] + label,
admin/views/settings.php CHANGED
@@ -1,7 +1,7 @@
1
  <div class="alm-settings-feedback"></div>
2
 
3
  <div class="admin ajax-load-more settings" id="alm-settings">
4
-
5
  <div class="wrap main-cnkt-wrap">
6
 
7
  <header class="header-wrap">
@@ -9,16 +9,16 @@
9
  <?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span>
10
  <em><?php _e('A powerful plugin to add infinite scroll functionality to your website.', 'ajax-load-more'); ?></em>
11
  </h1>
12
- <?php alm_render_transient_notification(); ?>
13
-
14
- </header>
15
-
16
- <div class="ajax-load-more-inner-wrapper">
 
 
17
 
18
- <div class="cnkt-main">
19
-
20
  <?php //include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
21
-
22
  <?php
23
  if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
24
  ?>
@@ -39,12 +39,12 @@
39
  echo '<option value="4">'.__('Layouts', 'ajax-load-more').'</options>';
40
  if(has_action('alm_paging_settings'))
41
  echo '<option value="5">'.__('Paging', 'ajax-load-more').'</option>';
42
- if(has_action('alm_prev_post_settings'))
43
- echo '<option value="6">'.__('Previous Post', 'ajax-load-more').'</option>';
44
  if(has_action('alm_rest_api_settings'))
45
- echo '<option value="7">'.__('REST API', 'ajax-load-more').'</option>';
46
  if(has_action('alm_seo_settings'))
47
- echo '<option value="8">'.__('SEO', 'ajax-load-more').'</option>';
 
 
48
  if(has_action('alm_theme_repeaters_settings'))
49
  echo '<option value="9">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
50
  ?>
@@ -62,18 +62,18 @@
62
  $options = get_option( '_alm_settings' ); ?>
63
  <div class="save-in-progress"></div>
64
  </form>
65
-
66
  </div>
67
- <aside class="cnkt-sidebar">
68
  <?php //include_once( ALM_PATH . 'admin/includes/cta/pro.php'); ?>
69
  <?php //include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
70
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
71
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
72
  <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
73
  </aside>
74
-
75
- <div class="clear"></div>
76
  </div>
77
-
78
  </div>
79
  </div>
1
  <div class="alm-settings-feedback"></div>
2
 
3
  <div class="admin ajax-load-more settings" id="alm-settings">
4
+
5
  <div class="wrap main-cnkt-wrap">
6
 
7
  <header class="header-wrap">
9
  <?php echo ALM_TITLE; ?> <span><?php echo ALM_VERSION; ?></span>
10
  <em><?php _e('A powerful plugin to add infinite scroll functionality to your website.', 'ajax-load-more'); ?></em>
11
  </h1>
12
+ <?php alm_render_transient_notification(); ?>
13
+
14
+ </header>
15
+
16
+ <div class="ajax-load-more-inner-wrapper">
17
+
18
+ <div class="cnkt-main">
19
 
 
 
20
  <?php //include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
21
+
22
  <?php
23
  if(has_action('alm_cache_settings') || has_action('alm_layouts_installed') || has_action('alm_prev_post_settings') || has_action('alm_paging_settings') || has_action('alm_seo_settings') || has_action('alm_theme_repeaters_settings')) {
24
  ?>
39
  echo '<option value="4">'.__('Layouts', 'ajax-load-more').'</options>';
40
  if(has_action('alm_paging_settings'))
41
  echo '<option value="5">'.__('Paging', 'ajax-load-more').'</option>';
 
 
42
  if(has_action('alm_rest_api_settings'))
43
+ echo '<option value="6">'.__('REST API', 'ajax-load-more').'</option>';
44
  if(has_action('alm_seo_settings'))
45
+ echo '<option value="7">'.__('SEO', 'ajax-load-more').'</option>';
46
+ if(has_action('alm_prev_post_settings'))
47
+ echo '<option value="8">'.__('Single Posts', 'ajax-load-more').'</option>';
48
  if(has_action('alm_theme_repeaters_settings'))
49
  echo '<option value="9">'.__('Theme Repeaters', 'ajax-load-more').'</option>';
50
  ?>
62
  $options = get_option( '_alm_settings' ); ?>
63
  <div class="save-in-progress"></div>
64
  </form>
65
+
66
  </div>
67
+ <aside class="cnkt-sidebar">
68
  <?php //include_once( ALM_PATH . 'admin/includes/cta/pro.php'); ?>
69
  <?php //include_once( ALM_PATH . 'admin/includes/cta/sharing.php'); ?>
70
  <?php include_once( ALM_PATH . 'admin/includes/cta/resources.php'); ?>
71
  <?php include_once( ALM_PATH . 'admin/includes/cta/dyk.php'); ?>
72
  <?php include_once( ALM_PATH . 'admin/includes/cta/about.php'); ?>
73
  </aside>
74
+
75
+ <div class="clear"></div>
76
  </div>
77
+
78
  </div>
79
  </div>
admin/views/shortcode-builder.php CHANGED
@@ -32,11 +32,11 @@
32
  <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', 'ajax-load-more'); ?></p>
33
  <div class="output-wrap">
34
  <div id="shortcode_output"></div>
35
- </div>
36
- <p class="small reset-shortcode-builder"><a href="javascript:void(0);"><i class="fa fa-refresh"></i> <?php _e('Reset', 'ajax-load-more'); ?></a></p>
37
  </div>
38
  <div class="major-publishing-actions">
39
  <a class="button button-primary copy copy-to-clipboard"><?php _e('Copy Shortcode', 'ajax-load-more'); ?></a>
 
40
  </div>
41
  </div>
42
  </div>
32
  <p><?php _e('Place the following shortcode into the content editor or widget area of your theme.', 'ajax-load-more'); ?></p>
33
  <div class="output-wrap">
34
  <div id="shortcode_output"></div>
35
+ </div>
 
36
  </div>
37
  <div class="major-publishing-actions">
38
  <a class="button button-primary copy copy-to-clipboard"><?php _e('Copy Shortcode', 'ajax-load-more'); ?></a>
39
+ <p class="small reset-shortcode-builder"><a href="javascript:void(0);"><i class="fa fa-refresh"></i> <?php _e('Reset', 'ajax-load-more'); ?></a></p>
40
  </div>
41
  </div>
42
  </div>
ajax-load-more.php CHANGED
@@ -6,15 +6,15 @@ Description: The ultimate solution to add infinite scroll functionality to your
6
  Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
- Author URI: https://connekthq.com
10
- Version: 4.1.0
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
- define('ALM_VERSION', '4.1.0');
17
- define('ALM_RELEASE', 'December 6, 2018');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
@@ -90,6 +90,19 @@ function alm_create_table(){
90
  }
91
 
92
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  if( !class_exists('AjaxLoadMore') ):
94
 
95
  class AjaxLoadMore {
@@ -345,7 +358,7 @@ if( !class_exists('AjaxLoadMore') ):
345
 
346
  // Core ALM JS
347
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
348
- wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more'. $suffix .'.js', __FILE__ ), $dependencies, ALM_VERSION, true );
349
 
350
  // Progress Bar JS
351
  wp_register_script( 'ajax-load-more-progress', plugins_url( '/vendor/js/pace/pace.min.js', __FILE__ ), 'ajax-load-more', ALM_VERSION, true );
@@ -380,7 +393,6 @@ if( !class_exists('AjaxLoadMore') ):
380
  'ajax_object' => array('is_single' => true, 'is_singular' => true )
381
  )
382
  );
383
-
384
  }
385
 
386
 
@@ -392,7 +404,6 @@ if( !class_exists('AjaxLoadMore') ):
392
  * @since 2.0.0
393
  * @updated 3.2.0
394
  */
395
-
396
  public function alm_shortcode($atts) {
397
  self::$shortcode_atts = $atts;
398
  return ALM_SHORTCODE::alm_render_shortcode($atts);
@@ -503,13 +514,13 @@ if( !class_exists('AjaxLoadMore') ):
503
  }
504
 
505
 
506
- // Previous Post Add-on
507
- $previous_post = false;
508
- $pp_data = (isset($_GET['previous_post'])) ? $_GET['previous_post'] : false;
509
- if($pp_data){
510
- $previous_post = true;
511
- $previous_post_id = (isset($pp_data['id'])) ? $pp_data['id'] : '';
512
- $previous_post_slug = (isset($pp_data['slug'])) ? $pp_data['slug'] : '';
513
  }
514
 
515
 
@@ -528,16 +539,14 @@ if( !class_exists('AjaxLoadMore') ):
528
 
529
 
530
  /*
531
- * alm_prev_post_args
532
  *
533
- * Previous Post Add-on hook
534
- * Hijack $args and and return previous post only $args
535
  *
536
  * @return $args;
537
  */
538
- if($previous_post && has_action('alm_prev_post_installed')){
539
- $args = apply_filters('alm_prev_post_args', $previous_post_id, $postType);
540
- }
541
 
542
 
543
 
@@ -671,9 +680,9 @@ if( !class_exists('AjaxLoadMore') ):
671
  * @return null
672
  */
673
  if(!empty($cache_id) && has_action('alm_cache_installed') && $do_create_cache){
674
- if($previous_post){
675
- // Previous Post Cache
676
- apply_filters('alm_previous_post_cache_file', $cache_id, $previous_post_id, $data);
677
  }else{
678
  // Standard Cache
679
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
6
  Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
+ Author URI: https://connekthq.com
10
+ Version: 4.2.0.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
+ define('ALM_VERSION', '4.2.0.1');
17
+ define('ALM_RELEASE', 'January 16, 2019');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
90
  }
91
 
92
 
93
+
94
+ /*
95
+ * alm_render
96
+ * Render Ajax Load More public function
97
+ *
98
+ * @param {array} $args
99
+ * @since 4.2.0
100
+ */
101
+ function alm_render($args){
102
+ echo AjaxLoadMore::alm_shortcode($args);
103
+ }
104
+
105
+
106
  if( !class_exists('AjaxLoadMore') ):
107
 
108
  class AjaxLoadMore {
358
 
359
  // Core ALM JS
360
  $suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min'; // Use minified libraries if SCRIPT_DEBUG is turned off
361
+ wp_register_script( 'ajax-load-more', plugins_url( '/core/dist/js/ajax-load-more'.$suffix.'.js', __FILE__ ), $dependencies, ALM_VERSION, true );
362
 
363
  // Progress Bar JS
364
  wp_register_script( 'ajax-load-more-progress', plugins_url( '/vendor/js/pace/pace.min.js', __FILE__ ), 'ajax-load-more', ALM_VERSION, true );
393
  'ajax_object' => array('is_single' => true, 'is_singular' => true )
394
  )
395
  );
 
396
  }
397
 
398
 
404
  * @since 2.0.0
405
  * @updated 3.2.0
406
  */
 
407
  public function alm_shortcode($atts) {
408
  self::$shortcode_atts = $atts;
409
  return ALM_SHORTCODE::alm_render_shortcode($atts);
514
  }
515
 
516
 
517
+ // Single Post Add-on
518
+ $single_post = false;
519
+ $single_post_data = (isset($_GET['single_post'])) ? $_GET['single_post'] : false;
520
+ if($single_post_data){
521
+ $single_post = true;
522
+ $single_post_id = (isset($single_post_data['id'])) ? $single_post_data['id'] : '';
523
+ $single_post_slug = (isset($single_post_data['slug'])) ? $single_post_data['slug'] : '';
524
  }
525
 
526
 
539
 
540
 
541
  /*
542
+ * alm_single_post_args
543
  *
544
+ * Single Post Add-on hook
545
+ * Hijack $args and and return single post only $args
546
  *
547
  * @return $args;
548
  */
549
+ $args = ($single_post && has_action('alm_single_post_installed')) ? apply_filters('alm_single_post_args', $single_post_id, $postType) : $args;
 
 
550
 
551
 
552
 
680
  * @return null
681
  */
682
  if(!empty($cache_id) && has_action('alm_cache_installed') && $do_create_cache){
683
+ if($single_post){
684
+ // Single Post Cache
685
+ apply_filters('alm_previous_post_cache_file', $cache_id, $single_post_id, $data);
686
  }else{
687
  // Standard Cache
688
  apply_filters('alm_cache_file', $cache_id, $page, $seo_start_page, $data, $preloaded);
core/classes/class.alm-localize.php CHANGED
@@ -18,7 +18,7 @@ if(!class_exists('ALM_LOCALIZE')):
18
 
19
  static $vars = array();
20
 
21
- /*
22
  * add_localized_var
23
  * Create <script> variables for use with Preloaded addon
24
  *
@@ -38,7 +38,7 @@ if(!class_exists('ALM_LOCALIZE')):
38
 
39
 
40
 
41
- /*
42
  * create_script_vars
43
  * Create <script> variables for use with Preloaded addon
44
  *
@@ -47,13 +47,11 @@ if(!class_exists('ALM_LOCALIZE')):
47
  * @since 3.7
48
  */
49
  public static function create_script_vars($id){
50
- if(!empty(self::$vars) && isset(self::$vars[$id]) && is_array(self::$vars[$id])){
51
-
52
- // Add div ID to the start of array
53
- self::$vars[$id] = array_merge(array('id' => $id), self::$vars[$id]);
54
-
55
  // Render wp_localize_script vars with 'ajax-load-more' script handle.
56
  wp_localize_script( 'ajax-load-more', alm_convert_dashes_to_underscore($id) .'_vars', self::$vars[$id] );
 
57
  }
58
  }
59
 
18
 
19
  static $vars = array();
20
 
21
+ /**
22
  * add_localized_var
23
  * Create <script> variables for use with Preloaded addon
24
  *
38
 
39
 
40
 
41
+ /**
42
  * create_script_vars
43
  * Create <script> variables for use with Preloaded addon
44
  *
47
  * @since 3.7
48
  */
49
  public static function create_script_vars($id){
50
+ if(!empty(self::$vars) && isset(self::$vars[$id]) && is_array(self::$vars[$id])){
51
+
 
 
 
52
  // Render wp_localize_script vars with 'ajax-load-more' script handle.
53
  wp_localize_script( 'ajax-load-more', alm_convert_dashes_to_underscore($id) .'_vars', self::$vars[$id] );
54
+
55
  }
56
  }
57
 
core/classes/class.alm-shortcode.php CHANGED
@@ -89,8 +89,14 @@ if( !class_exists('ALM_SHORTCODE') ):
89
  'nextpage_start' => 1,
90
  'previous_post' => false,
91
  'previous_post_id' => 'null',
 
92
  'previous_post_taxonomy' => '',
93
  'previous_post_excluded_terms' => '',
 
 
 
 
 
94
  'cache' => 'false',
95
  'cache_id' => '',
96
  'paging' => 'false',
@@ -140,7 +146,7 @@ if( !class_exists('ALM_SHORTCODE') ):
140
  'offset' => '0',
141
  'posts_per_page' => '5',
142
  'scroll' => 'true',
143
- 'scroll_distance' => '150',
144
  'scroll_container' => '',
145
  'max_pages' => '0',
146
  'pause_override' => 'false',
@@ -164,6 +170,17 @@ if( !class_exists('ALM_SHORTCODE') ):
164
  'id' => '',
165
  'primary' => false
166
  ), $atts));
 
 
 
 
 
 
 
 
 
 
 
167
 
168
 
169
  // Start Enqueue Scripts
@@ -225,8 +242,8 @@ if( !class_exists('ALM_SHORTCODE') ):
225
  }
226
 
227
  // Previous Post
228
- if(has_action('alm_prev_post_installed') && $previous_post === 'true'){
229
- wp_enqueue_script( 'ajax-load-more-previous-post' );
230
  }
231
 
232
  // SEO
@@ -253,7 +270,7 @@ if( !class_exists('ALM_SHORTCODE') ):
253
  // Filters - Set initial shortcode state
254
  $filters = ($filters === 'true' && class_exists('ALMFilters')) ? true : false;
255
  if($filters){
256
- $previous_post = $seo = false;
257
  $transition_container = "true"; // required
258
  if(defined('ALM_FILTERS_PATH')){
259
  include(ALM_FILTERS_PATH .'includes/initial-state-params.php');
@@ -261,10 +278,10 @@ if( !class_exists('ALM_SHORTCODE') ):
261
  }
262
 
263
 
264
- $previous_post = ($previous_post === 'true') ? true : false;
265
 
266
 
267
- if($seo === "true" || $previous_post || $filters){
268
  $transition_container = "true";
269
  }
270
 
@@ -280,7 +297,7 @@ if( !class_exists('ALM_SHORTCODE') ):
280
  // Get container elements (ul | div)
281
 
282
  $container_element = 'ul';
283
- if($options['_alm_container_type'] == '2' || $previous_post){
284
  $container_element = 'div';
285
  }
286
 
@@ -292,7 +309,7 @@ if( !class_exists('ALM_SHORTCODE') ):
292
  }
293
 
294
  // Previous Post
295
- if($previous_post){
296
  $posts_per_page = 1;
297
  $container_element = 'div';
298
  }
@@ -404,9 +421,9 @@ if( !class_exists('ALM_SHORTCODE') ):
404
  $ajaxloadmore .= apply_filters('alm_masonry_before', $transition);
405
 
406
 
407
- // Previous Post Add-on
408
  // - Set other add-on params to false
409
- if($previous_post){
410
  $preloaded = false;
411
  $seo = false;
412
  $paging = false;
@@ -418,7 +435,7 @@ if( !class_exists('ALM_SHORTCODE') ):
418
  // Comments Add-on
419
  // - Set other add-on params to false
420
  if($comments){
421
- $previous_post = false;
422
  $seo = false;
423
  $cache = false;
424
  $acf = false;
@@ -438,7 +455,7 @@ if( !class_exists('ALM_SHORTCODE') ):
438
  // Nextpage Add-on
439
  // - Set other add-on params to false
440
  if($nextpage){
441
- $previous_post = false;
442
  $seo = false;
443
  $preloaded = false;
444
  $comments = false;
@@ -654,16 +671,17 @@ if( !class_exists('ALM_SHORTCODE') ):
654
  }
655
 
656
 
657
- // Previous Post Post Add-on
658
- if(has_action('alm_prev_post_installed') && $previous_post){
659
- $prev_post_return = apply_filters(
660
- 'alm_prev_post_shortcode',
661
- $previous_post_id,
662
- $previous_post_taxonomy,
663
- $previous_post_excluded_terms,
 
664
  $options
665
  );
666
- $ajaxloadmore .= $prev_post_return;
667
  }
668
 
669
 
@@ -818,7 +836,7 @@ if( !class_exists('ALM_SHORTCODE') ):
818
 
819
  // Previous Post
820
  // Get first post and append to alm object
821
- if(has_action('alm_prev_post_installed') && $previous_post){
822
 
823
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
824
  $repeater_type = $repeater_type[0]; // (default | repeater | template_)
@@ -827,23 +845,23 @@ if( !class_exists('ALM_SHORTCODE') ):
827
  $repeater_type = null;
828
  }
829
  // Get current permalink - (including querystring)
830
- $previous_post_permanlink = ($_SERVER["QUERY_STRING"]) ? get_permalink($previous_post_id) .'?'. $_SERVER["QUERY_STRING"] : get_permalink($previous_post_id);
831
 
832
  // Get previous post include, build output from the next post filter
833
- $previous_post_output = '<div class="alm-reveal alm-previous-post post-'. $previous_post_id .'" data-url="'. $previous_post_permanlink .'" data-title="'. strip_tags(get_the_title($previous_post_id)) .'" data-id="'. $previous_post_id .'" data-page="0">'; // Set the post id .alm-reveal div
834
 
835
 
836
  /*
837
- * alm_prev_post_inc
838
  *
839
  * Previous Post Add-on hook
840
  *
841
  * @return $args;
842
  */
843
- $previous_post_output .= apply_filters('alm_prev_post_inc', $repeater, $repeater_type, $theme_repeater, $previous_post_id, $post_type);
844
 
845
- $previous_post_output .= '</div>';
846
- $ajaxloadmore .= $previous_post_output; // Add $previous_post_output data to $ajaxloadmore
847
 
848
  }
849
  // End Previous Post
@@ -933,7 +951,7 @@ if( !class_exists('ALM_SHORTCODE') ):
933
 
934
 
935
  // Add some localized vars
936
- ALM_LOCALIZE::add_localized_var('IP', $_SERVER['REMOTE_ADDR'], $div_id);
937
 
938
 
939
 
@@ -967,12 +985,7 @@ if( !class_exists('ALM_SHORTCODE') ):
967
  if($paging !== 'true'){
968
  $btn_element = 'button';
969
  $btn_href = '';
970
- $btn_rel = ' rel="next"';
971
- /* if($seo === 'true'){
972
- $btn_element = 'a'; // Convert to link for SEO
973
- $btn_href = ' href="'. $canonicalURL .'"';
974
- $btn_rel = ' rel="next"';
975
- } */
976
  $html .= '<'. $btn_element .' class="alm-load-more-btn more'. $button_classname .'"'. $btn_href . $btn_rel .'>'. $button_label .'</'. $btn_element .'>';
977
  }
978
  $html .= '</div>';
89
  'nextpage_start' => 1,
90
  'previous_post' => false,
91
  'previous_post_id' => 'null',
92
+ 'previous_post_order' => 'previous',
93
  'previous_post_taxonomy' => '',
94
  'previous_post_excluded_terms' => '',
95
+ 'single_post' => false,
96
+ 'single_post_id' => 'null',
97
+ 'single_post_order' => 'previous',
98