WordPress Infinite Scroll – Ajax Load More - Version 5.0.1

Version Description

  • March 13, 2019 =
  • FIX - Fixed issue with Masonry not working when empty whitespace was present in a Repeater Template.
  • FIX - Fixed issue with innerHTML and appendChild not trigger JavaScript present in Repeater Templates.
Download this release

Release Info

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

Code changes from version 4.2.0.1 to 5.0.1

.babelrc CHANGED
@@ -1,3 +1,3 @@
1
  {
2
- "presets": ["es2015"]
3
- }
1
  {
2
+ "presets": ["env"]
3
+ }
.eslintrc ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ {
2
+ parser: "babel-eslint",
3
+ "rules": {
4
+ }
5
+ }
README.txt CHANGED
@@ -2,9 +2,9 @@
2
  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.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
 
@@ -18,7 +18,7 @@ Build complex custom WordPress queries with the Ajax Load More shortcode builder
18
 
19
  Ajax Load More is compatible for endless scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
- [→ Get More Information](https://connekthq.com/plugins/ajax-load-more/)
22
 
23
 
24
 
@@ -203,40 +203,40 @@ The following [functions](https://connekthq.com/plugins/ajax-load-more/docs/call
203
 
204
  **Complete** - The almComplete() function is triggered after every *successful* ajax call made by Ajax Load More.
205
 
206
- $.fn.almComplete = function(alm){
207
  // Your on complete code goes here
208
  };
209
 
210
 
211
  **Destroyed** - The almDestroyed() function is dispatched after the destroy_after shortcode parameter is triggered.
212
 
213
- $.fn.almDestroyed = function(alm){
214
  console.log('"Ajax Load More functionality has been destroyed!');
215
  };
216
 
217
 
218
  **Done** - The almDone() function is triggered after all posts have been loaded.
219
 
220
- $.fn.almDone = function(alm){
221
  console.log('All posts have been loaded!');
222
  };
223
 
224
  **Empty** - The almEmpty() function is triggered if there are zero results returned in the initial query.
225
 
226
- $.fn.almEmpty = function(alm){
227
  console.log('Sorry, but we could not locate any posts that matched your criteria.');
228
  };
229
 
230
  **Filter Complete** - The almFilterComplete() function is triggered after a successful call to the public function almFilter().
231
 
232
- $.fn.almFilterComplete = function(){
233
  console.log('Ajax Load More filter has completed!');
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.');
241
  };
242
 
@@ -280,7 +280,7 @@ Ajax Load More passes the following PHP **[variables](https://connekthq.com/plug
280
 
281
  ### Please Review Ajax Load More!
282
 
283
- Your reviews make a big difference! If you like and use Ajax Load More, please consider taking the time to [review my plugin](https://wordpress.org/support/view/plugin-reviews/ajax-load-more). Your ratings and reviews help the plugin grow and provide the motivation needed to keep pushing it forward.
284
 
285
  [→ Leave a Review](https://wordpress.org/support/plugin/ajax-load-more/reviews/#new-post)
286
 
@@ -328,7 +328,13 @@ global $post;
328
  * Safari (Mac, iOS)
329
  * Opera
330
  * Android
331
- * IE8+
 
 
 
 
 
 
332
 
333
 
334
  == Installation ==
@@ -371,6 +377,40 @@ How to install Ajax Load More.
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.
@@ -397,629 +437,7 @@ How to install Ajax Load More.
397
  * FIX - Fixed issue with Filters onComplete functions triggering before Ajax results were rendered on the screen.
398
  * FIX - Adding fix for `alm_get_canonical_url` function when getting URLs of child category and tag archives.
399
 
400
-
401
- = 3.7.1 - October 3, 2018 =
402
- Minor point release that affects Preloaded and Search Engine Optimization add-on users only. This release fixes 2 critical bugs in Ajax Load More 3.7.
403
-
404
- * FIX - Fix for Preloaded not parsing multiple Post Types (Sorry about that)
405
- * FIX - Adding `.alm-reveal` div and `css_classes` to NO_SCRIPT render.
406
-
407
-
408
- = 3.7 - September 19, 2018 =
409
- * UPDATE NOTICE for Preloaded Addon Users - this ALM update moves preloaded posts into core .alm-listing container. This update was required for refactoring of core JS and HTML elements while making future enhancements easier to maintain.
410
- * NEW - Added new `ALM_LOCALIZE` class that allows Ajax Load More variables and parameters to be written to the page and accessed as JavaScript variables. This will be expanded in the near future and used for our React and Vue examples :)
411
- * NEW - Added <noscript /> support for SEO addon users that renders `WP_Query` results for SEO and users without JS enabled.
412
- * UPDATE - Updated Ajax `WP_Query` to use new `ALM_QUERY_ARGS` class.
413
- * FIX - Removed PHP warning messages caused by some Ajax Load More functions running in WP Admin.
414
- * FIX - Fixed issue with offset and preloaded posts in Users addon, Comments addon and ACF extensions.
415
- * FIX - Added a fix for `post__not_in` shortcode parameter not working with Sticky Posts.
416
- * FIX - Fixed issue with fading in of Ajax elements when using SEO addon is active.
417
- * FIX - Fixed issue search term filtering on default `search.php` template.
418
- * UPDATE - Hiding Load More button if JavaScript is not enabled.
419
- * UPDATE - Updated loading functionality of Preloaded and SEO addon when hitting a paged URL directly.
420
- * UPDATE - Code refactoring of some PHP functions and Core ALM JS.
421
- * UPDATE - Code clean up and organization.
422
-
423
-
424
- = 3.6.1 - August 24, 2018 =
425
- * FIX - Fix for search parameter not being passed correctly to Ajax Load More.
426
- * FIX - Fixed PHP warning message being displayed with Call the Action add-on.
427
- * FIX - Fixed issue with Masonry settings not applying after latest 3.6 update.
428
- * NEW - Adding `total-posts` data attribute to parent Ajax Load More container.
429
-
430
-
431
- = 3.6 - August 24, 2018 =
432
- - NEW - Added export/download functionality for Repeater Templates, click the options icon (cog) under each Repeater Template to reveal.
433
- - NEW - Added compatibility with Gutenberg editor.
434
- - NEW - Added support for SCRIPT_DEBUG.
435
- - FIX - Fixed issue with abrupt transition when filtering with Masonry.
436
- - FIX - Removed JS error in console when custom filtering with Masonry.
437
- - Update - Admin UI/UX enhancements to Repeater Template page.
438
- - Update - Added support for passing extra Masonry options to Ajax Load More.
439
- - Update - Improving the Ajax headers that are sent with each query - ALM now only sends relevant query params via GET request.
440
- - Update - Improving the HTML output - ALM now only renders relevant data attributes on the `.alm-listing` div.
441
- - Update - Started initial integration of upcoming ALM Pro add-on.
442
- - Update - Updated Plugin Updater Class for add-ons.
443
-
444
-
445
- = 3.5.1 - June 20, 2018 =
446
- * NEW - Adding `columnWidth` support for Masonry.
447
- * NEW - Adding support and backwards compatibility for Custom Repeaters < v2.5
448
- * UPDATE - Added `transition_container_classes` parameter option to .alm-paging-content div for paging add-on.
449
- * FIX - Added fix for WPML taxonomy archive pages.
450
- * FIX - Fixed issue with `transition_container="false"` and new loading transition.
451
- * FIX - Updated ACF Relationship field function to return null if field is not present on the post ID page.
452
-
453
-
454
- = 3.5.0 - April 17, 2018 =
455
- ### Notice
456
- This Ajax Load More update contains a major change to how the default repeater template is saved and displayed.
457
- On update, your default repeater template will be moved from `/plugins/ajax-load-more/core/repeater` to an `alm_templates` directory created within `/wp-content/uploads`.
458
- This is a long overdue enhancement to the plugin and I highly recommend you backup your site (or Repeater Template at least) prior to updating Ajax Load More incase permission issues occur during the upgrade process.
459
-
460
- * NEW - Updating Ajax Load More loading sequence to help with integration for Adsense and DFP advertisements in Ajax content.
461
- * NEW - Default Repeater Template now saved and accessed from the `/wp-content/uploads` directory.
462
- * FIX - Added a fix for WPML users that supports category and tag archives across languages [See issues](https://wpml.org/forums/topic/ajax-load-more-wpml-non-default-languages-not-loading/).
463
- * FIX - Fixed issue with `destroy_after` not triggering at correct intervals when using [Preloaded add-on](https://connekthq.com/plugins/ajax-load-more/add-ons/preloaded/).
464
- * FIX - Fixed issue with shortcode parameters not being sent to Ajax Load More for the [Comments add-on](https://connekthq.com/plugins/ajax-load-more/add-ons/comments/).
465
- * UPDATE - Added support for new [SEO](https://connekthq.com/plugins/ajax-load-more/add-ons/search-engine-optimization/) add-on filter hooks.
466
- * UPDATE - Updated CSS for the styling list elements. (`.alm-listing > li`)
467
- * UPDATE - Packaging [Masonry v4.2.1](https://masonry.desandro.com/) in Ajax Load More as core WordPress includes an older version of Masonry that was causing issues with certain features.
468
- * UPDATE - Simplifying Ajax Load More transition property to allow for feature enhancements (Removed 'slide' transition and jQuery animations).
469
- * UPDATE - Removing `transition_speed` shortcode parameter and set a globe 1/4 second transition speed for all animations.
470
- * UPDATE - Various UI/UX enhancements
471
- * UPDATE - Code cleanup.
472
-
473
-
474
- = 3.4.1 - February 22, 2018 =
475
- * UPDATE - Added compatibility for Filters + Paging add-ons.
476
- * UPDATE - Added compatibility for Filters + Preloaded add-ons.
477
- * UPDATE - Code clean up
478
- * FIX - Fixed issue with Shortcode Builder showing Add-on and Extensions section when add-ons not installed.
479
- * FIX - Fixed issue with almDone and almEmpty callbacks not firing with Preloaded and Paging add-ons.
480
-
481
-
482
- = 3.4.0 - February 13, 2018 =
483
- * NEW - Adding various functionality to support the new [`Filters`](https://connekthq.com/plugins/ajax-load-more/add-ons/filters/) add-on.
484
- * FIX - Fixed bug with passing search parameter to Preloaded add-on.
485
- * FIX - Fixed issue with license activation for Theme Repeaters, SEO and User add-ons.
486
- * UPDATE - Updated default loading transition to be fade, previously slide.
487
- * UPDATE - Added support for multiple instances of Ajax Load More and Masonry.
488
- * UPDATE - Fixed issue with the Post ID field in the ACF section of shortcode builder.
489
- * UPDATE - Various UI/UX enhancements
490
-
491
-
492
- = 3.3.1 - December 7, 2017 =
493
-
494
- ### Notice
495
- This Ajax Load More release contains fundamental changes to the way ALM loads CSS. After update, if you run into issues visit the Ajax Load More settings screen and deselect the `Load CSS Inline` option.
496
-
497
- * NEW - Updated the default loading of Ajax Load More CSS. CSS Will now be inlined to improve site overall performance. A new setting has been added to allow for disabling of this inline CSS update.
498
- * NEW - New filters added for hooking the post ID, slug and canonical URL.
499
- * FIX - Updated shortcode builder JS to remove unwanted references to the Users add-on.
500
- * FIX - Fixed bug with searching and the Preloaded add-on.
501
- * FIX - Fixed for REST API returning null results do to unset data variable.
502
- * Update - Updated Previous Post cache to reference the post ID vs post slug. This fixes an issue with special characters in post URLs causing 404 errors.
503
-
504
-
505
- = 3.3.0.1 - November 22, 2017 =
506
-
507
- * FIX - Applied a fix for the filtering method that was updated in 3.3.0 - it was causing load more function to be called multple times in some situations.
508
- * FIX - Fixed issue where filtering with the Paging add-on was resulting in a JavaScript error.
509
-
510
-
511
- = 3.3.0 - November 20, 2017 =
512
-
513
- * NEW - Adding functionality for new for [`WP_User_Query`](https://connekthq.com/plugins/ajax-load-more/add-ons/users/) add-on.
514
- * NEW - New Admin design, cleaner layout, improved performance.
515
- * UPDATE - Remove `load-more` ID from loading button.
516
- * UPDATE - Updated `alm_query_args` filter to accept the current post ID as a parameter within the filter.
517
- * UPDATE - Code clean up, creating JS modules
518
- * UPDATE - Improved license activations
519
- * FIX- Removed 'data-masonry-horizontalorder' being rendered into HTML page if empty.
520
- * FIX- Fixed issue with jump to link on ALM settings page.
521
-
522
-
523
- = 3.2.1 - October 5, 2017 =
524
-
525
- * NEW - Added new filter to optionally remove the trailing slash in URL of the SEO add-on. `add_filter('alm_seo_remove_trailing_slash', '__return_true');`
526
- * NEW - Added new `transition_container_classes` parameter that allows for custom classes to be added to the `.alm-reveal` container div.
527
- * NEW - Added new `almDestroyed` callback function that is dispatched after destroy_after has been triggered.
528
- ADD-ONS
529
- * NEW - Added `horizontalOrder` support for built in Masonry. The `masonry_horizontalorder` shortcode param will lay out items to maintain horizontal left-to-right order.
530
- * FIX - Fix for font icons not showing in shortcode builder.
531
- * FIX - Fix for issue with cache being created by logged in users even if 'Don't cache files for logged in users' is selected in the ALM settings.
532
- * UPDATE - Removed Nonce security option from ALM Settings.
533
- * UPDATE - Code cleanup, updating HTML markup in some areas.
534
- * UPDATE - Various UI/UX enhancements
535
-
536
-
537
- = 3.2.0 - August 8, 2017 =
538
-
539
- * NEW - Added new `masonry_animation` setting to allow for adjusting of Masonry transitions (Default, zoom-out, slide-up, slide-down, none).
540
- * NEW - Added new `scroll_container` setting that will allow for posts to be loaded on scroll when Ajax load more has been placed inside of a container.
541
- * NEW - Added required support for new excluded terms feature in the Previous Post add-on.
542
- * NEW - Added support for entering html into the `button_label` and `button_loading_label` shortcode parameters. This will allow for users to enter font icons in the button.
543
- * FIX -Fixed issue where ACF options where not displaying in Shortcode Builder.
544
- * UPDATE - Updated image thumbnail size in default repeater template.
545
- * UPDATE - Updated save functionality of the ALM Settings screen.
546
- * UPDATE -Updated Font Awesome to 4.7.0
547
- * UPDATE - Updated build process/gulpfile to include admin css/js.
548
- * UPDATE - Various admin UI/UX updates.
549
-
550
-
551
- = 3.1.2 - July 11, 2017 =
552
-
553
- * FIX - Bug fix for JavaScript issues introduced for IE11 & Edge browsers in ALM 3.1.1 - I reverted the problematic new functions and everything is working as expected.
554
-
555
-
556
- = 3.1.1 - July 10, 2017 =
557
-
558
- * UPGRADE NOTICE - Version 3.1.1 drops support for IE8.
559
- * Update - Added support for ALM Filtering + Masonry.
560
- * Update - Added support for Preloaded + Masonry.
561
- * Update - Started transitioning Ajax Load More away from jQuery. This will be a long process but hopefully will be able to remove dependency in the near future.
562
- * FIX - Fixed issue where .alm-loading class was not being removed after Ajax post load.
563
- * FIX - Removed Advanced Custom Fields from licenses section - this extension does NOT require a license key.
564
-
565
- = 3.1.0 - May 30, 2017 =
566
-
567
- * UPGRADE NOTICE - Ajax Load More has changed the directory from which the core CSS and JS are loaded. Core CSS and JS is now loaded from the `/ajax-load-more/core/dist/` directory - you may need to clear your browser and site cache after update.
568
- * NEW - Adding built-in support for [Masonry](https://connekthq.com/plugins/ajax-load-more/examples/masonry/). Set `transition="masonry" masonry_selector=".{selector_name}"` in your shortcode to enable a custom Masonry callback and automatically enqueue Masonry and ImagesLoaded from core WordPress.
569
- * NEW - Adding built-in support progress bar loaders using [Pace.js](https://connekthq.com/plugins/ajax-load-more/examples/progress-bar/).
570
- * UPDATE - Core ALM CSS and JS is now loaded from `core/dist/` directory.
571
- * UPDATE - Added `modules`, `libs` and `vendor` directories to `core/js/` for splitting of JS files.
572
- * UPDATE - Added gulp config for compiling Ajax Load More JS and Sass locally.
573
- * FIX - Fixed issues with shortcode building providing incorrect values.
574
-
575
-
576
- = 3.0.1 - May 22, 2017 =
577
-
578
- * NEW - Added support for caching single posts with the Previous Post and Cache add-ons.
579
- * NEW - Adding support for Advanced Custom Fields extension for Gallery and Flexible Content field types.
580
- * UPDATE - Updating cache-path parameter to allow for easier caching while ajax filtering.
581
- * FIX - Fixed PHP warning in ALM_SHORTCODE class for undefined $post->ID on taxonomy archive pages.
582
-
583
-
584
- = 3.0 - May 4, 2017 =
585
-
586
- * NEW - Added required functionality for new [Advanced Custom Fields extension](https://connekthq.com/plugins/ajax-load-more/extensions/advanced-custom-fields/)
587
- * NEW - New interface for displaying Theme Repeater Templates inside template admin.
588
- * NEW - Added new `.alm-loading` class to `#ajax-load-more` container while content is loading. This class will allow for added transition states without needing to bake into core.
589
- * NEW - Adding `post__in` to `orderby` param in shortcode builder
590
- * NEW - Added new `data-post-id` attribute to ALM container to get current post ID.
591
- * NEW - Add Extensions page to ALM admin for installs extensions with a single click.
592
- * Updated - Added support for > 4 meta_query queries.
593
- * Updated - Updated cache directory path to reside in `uploads/alm-cache` directory vs ALM cache directory.
594
- * Updated - Updated styling (font size and family) on Load More button.
595
- * FIX - JS error when using multiple filters in Safari (Missing closing `]` bracket on data attribute).
596
- * FIX - Missing quote in shortcode builder when using call to actions and theme repater add-ons.
597
- * UPDATE - Various UI and UX enhancements.
598
-
599
- = 2.14.1 - March 24, 2017 =
600
-
601
- * NEW - Adding built in support for sticky posts (sticky_posts="true").
602
- * NEW - Added new alm_js_dependencies filter for removing jQuery dependency.
603
- * NEW - New alm_enqueue_external_scripts action for loading external JS files.
604
- * NEW - Adding support for paging + comments add-on.
605
- * FIX - Fixed issue with some addons not appearing in Shortcode Builder.
606
- * UPDATE - Various UI Updates and enhancements.
607
-
608
- = 2.14.0 - February 14, 2017 =
609
-
610
- * NEW - Adding functionality for Next Page add-on (https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/).
611
- * NEW - Added support for SEO add-on to be integrated with default WP search page.
612
- * NEW - Added support for Paging + Preloaded + SEO to be used on a single instance.
613
- * NEW - Added functions for triggering callbacks to various addons on load complete.
614
- * UPDATE - Various UI tweaks
615
- * UPDATE - Improving core JS functions and methods
616
-
617
-
618
- = 2.13.1 - December 5, 2016 =
619
-
620
- * NEW - Adding support for multiple instances of filtering.
621
- * NEW - Adding caching support for initial requests if page > 1. e.g. /page/10/ will now be cached and served to visitors as page-1-10.html
622
- * NEW - Added new filter for creating and listing custom layouts within repeater template admin (docs coming soon).
623
- * Update - Adding Post Type 'any' to shortcode builder.
624
- * Update - Updating max_pages parameter to be '0' as the plugin default.
625
- * Update - Various UI updates and enhancements.
626
- * FIX - Updated post_status parameter to support inherit for attachments.
627
- * FIX - Undefined variables in Shortcode Builder pop up.
628
- * FIX - Shortcode Builder UI and copy updates.
629
- * FIX - JS error on Examples page within plugin.
630
- * FIX - JS errors on with ALM Cache admin page.
631
- * FIX - Support for preserving querystring parameters in Previous Post add-on.
632
-
633
-
634
- = 2.13.0.1 - November 10, 2016 =
635
-
636
- * FIX - almEmpty() callback function not firing because of updated return value of empty query.
637
- * FIX - almdebug() filter causing 'Missing argument 2 for apply_filters()' error for some users.
638
- * FIX - Shortcode builder UI heading update.
639
-
640
-
641
- = 2.13.0 - November 6, 2016 =
642
-
643
- * NEW - ID shortcode parameter. Assigning a unique ID to an Ajax Load More instance will allow for filters to be run more easily.
644
- * NEW - Added a new filter alm_query_args_[id] that let's users create custom filters based on the ID of the Ajax Load More instance. Users can easily target a specific instance of Ajax Load More to modify query $args. See https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/#alm_query_args
645
- * NEW - Added a debug filter to view the return contents of the Ajax Load More query in the browser console (add_filter( 'alm_debug', '__return_true' )).
646
- * FIX - Issue with cta_position parameter for Call to Actions add-on in shortcode builder.
647
- * UPDATE - Updated Shortcode Builder UI to add groupings for parameter types [Add-ons, Display Settings, Query Parameters].
648
- * UPDATE - Removed limit of 3 Taxonomy queries. Tax queries now support an unlimited amount however the Shortcode Builder is still capped at 3.
649
- * UPDATE - Adjusted max_pages shortcode parameter to default to 0.
650
- * UPDATE - Reworked alm_get_page_slug ()function to get current page slug.
651
- * UPDATE - Remove support for author slugs in favor of multiple author support and selection from the Shortcode Builder
652
- * UPDATE - Various UI/UX updates, new logos added to admin panel.
653
-
654
-
655
- = 2.12.0 - September 5, 2016 =
656
- * NEW - Completed integration of new Call to Actions add-on.
657
- * NEW - Added $.fn.almTriggerClick() public function that will easily allow users to trigger Ajax Load More from any object on the screen.
658
- * UPDATE - Allow for post_status="inherit" for use with attachments.
659
- * UPDATE - Adding Media (attachment) post type to the Shortcode Builder.
660
- * UPDATE - Allow for Author slug or ID within shortcode.
661
- * UPDATE - Updating Ajax Load More menu icon.
662
- * UPDATE - Updating license notifications on License page.
663
- * 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.
664
- * 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.
665
- * FIX - URL/paging issue with Polylang and SEO plugins.
666
- * FIX - Updated code used to split pages with Search Engine Optimization add-on.
667
-
668
- = 2.11.2 - August 4, 2016 =
669
- * SECURITY - Security fix for Custom Repeaters and Theme Repeaters include file path.
670
- * 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.
671
- * FIX - Updated code used to split pages with Search Engine Optimization add-on.
672
- * FIX - Issue where SEO License key input was not displaying for some users.
673
- * FIX - Issue for double popstate trigger with Paging + SEO add-on.
674
- * UPDATE - Various code improvements.
675
- * NEW - Adding functionality for upcoming Call to Actions add-on.
676
-
677
-
678
- = 2.11.1 - May 30, 2016 =
679
- * SECURITY - Security fix for posts_status parameter. posts_status is now only available for logged in (admin) users. Non logged in users will only have access to view content in a 'publish' state.
680
- * UPDATE - Added support for preloading comments with the Comments and Preloaded add-ons.
681
- * Shortcode Builder UI improvements
682
-
683
-
684
- = 2.11.0 - May 25, 2016 =
685
- * NEW - Adding required functionality for the new REST API add-on.
686
- * FIX - Fixed url parsing issue with the ALM base URL and Blog page url. This was affecting SEO add-on users.
687
- * UPDATE - WP_Query Performance improvements.
688
- * UPDATE - Various UI updates/tweaks.
689
-
690
-
691
- = 2.10.1 - May 8, 2016 =
692
- * NEW - Users can now load a custom version of ajax-load-more.css from {/alm} folder in current theme directory.
693
- * NEW - Class definitions for alm shortcode and css enqueue script. More to come.
694
- * FIX - Removed unnecessary ob_end_clean() function from alm_query_posts() that was causing php notices for some users.
695
- * FIX - Fixed meta_query issue with EXISTS and NOT EXISTS meta_compare values.
696
- * FIX - Issue with meta_key parameter and orderby.
697
- * UPDATE - Updated $.fn.almUpdateCurrentPage() function to allow for multiple instances of Paging.
698
- * UPDATE - Various Admin UI bug fixes/enhancements.
699
-
700
-
701
- = 2.10.0.1 - April 11, 2016 =
702
- * FIX - JavaScript fix for 'Unexpected token' error is Safari and IE with alm.AjaxLoadMore.success() function.
703
- * FIX - Fixed canonical URL issue on home/front pages.
704
-
705
-
706
- = 2.10.0 - April 10, 2016 =
707
- * NEW - Converted the Ajax return content type from HTML to JSON.
708
- * NEW - Adding transition_speed shortcode parameter.
709
- * NEW - Added alm_button_label filter to modify default button text.
710
- * NEW - Added new canonical URL builder for pages and archives - this function helps build legitimate URLs for the Search Engine Optimization add-on.
711
- * FIX - Fixed issue with undefined post slug on archive pages.
712
- * UPDATE - Performance improvements and code reduction.
713
- * UPGRADE NOTICE - When updating to 2.10 you must also update SEO and Comments add-ons.
714
-
715
-
716
- = 2.9 =
717
- * NEW - Adding support for new Layouts add-on.
718
- * NEW - Adding support for table container type.
719
- * NEW - Adding new 'transition_container' shortcode parameter to allow for removal of the .alm-reveal div in the ajax output.
720
- * FIX - Fixed issue with the display of Previous Post taxonomy selection in Shortcode Builder.
721
- * FIX - Fixed issue with noscript navigation for preloaded and seo add-ons.
722
- * FIX - Fixed issue with hiding of Button Classes setting if 'Disable CSS' is checked.
723
- * FIX - Fixed bug with custom repeater fallback function.
724
- * FIX - Fixed issue with almDone function firing before a the button text reset function.
725
- * UPDATE - Various UI/UX enhancments.
726
- * UPDATE - Adding cache support for Theme Repeaters add-on.
727
- * UPDATE - Updating add-on activation script from wp_remote_get to wp_remote_post.
728
-
729
-
730
- = 2.8.6 =
731
- * NEW - Adding a set of filter hooks to enable users to hook into Ajax Load More to insert or modify data. See https://connekthq.com/plugins/ajax-load-more/docs/filter-hooks/ for more information.
732
- * FIX - Updated infinite scrolling css styling.
733
-
734
-
735
- = 2.8.5 =
736
- * FIX - Update for ALM settings screen - layout was broken with WP 4.4 release.
737
- * NEW - Adding new functionality to allow for loading of local default repeater template. Users can create a /alm_templates directory within their current theme and add default.php. If default.php is present it will be loaded before repeater template shipped with Ajax Load More.
738
- * NEW - Adding multiple taxonomy support - you can now query WordPress by up to 3 unique taxonomy queries.
739
- * NEW - Adding taxonomy_relation shortcode parameter.
740
- * FIX - Fixed JS error in shortcode builder popup.
741
- * FIX - Fix for issue with '<' and '<=' Custom Field operators, WP was rendering these tags as HTML (https://github.com/dcooney/wordpress-ajax-load-more/issues/98). Users can now enter 'lessthan' and 'lessthanequalto' to fix this issue.
742
- * UPDATE - Changing 'exclude' shortcode parameter name to be 'post__not_in' to follow WordPress naming conventions. 'exclude' will continue to work along side 'post__not_in'.
743
-
744
-
745
- = 2.8.4 =
746
- * NEW - Adding new loading styles and button types.
747
- * NEW - Adding new 'button_loading_label' parameter allowing users to change button text while loading content.
748
- * NEW - Adding required support and functionality for new Comments add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/comments/
749
- * UPDATE - Updating JS functions for release of Previous Post v1.1.
750
- * UPDATE - Various admin enhancements and removing deprecated code.
751
- * UPDATE - removing default link color in ajax-load-more.css.
752
-
753
-
754
-
755
- = 2.8.3 =
756
- * PERFORMANCE - Updating ALM core to enqueue Ajax Load More js only when shortcode is present on screen.
757
- * NEW - Adding 'canonical-url' data attribute to ALM plugin wrapper - this will be used by various functions throughout the core plugin and add-ons.
758
- * NEW - Adding new alm-thumbnail image size.
759
- * NEW - Adding required functionality for upcoming Layouts add-on.
760
- * NEW - To increase SEO and crawler access we added a <noscript> paging navigation when seo and preloaded are both 'true'.
761
- * FIX - Fixed issue with almDone() function not firing in certain instances.
762
- * UPDATE - Rebuilt License activation screen to use ajax and alert users when licenses run out.
763
- * UPDATE - Various admin UI enhancements.
764
-
765
-
766
- = 2.8.2 =
767
- * FIX - Fixed issue with the passing of ALM template variables to Theme Repeaters add-on.
768
- * FIX - Fixed issue shortcode builder returning an error when loading custom taxonomies.
769
- * NEW - Added new almDone() function that is dispatched after all posts have been loaded. $.fn.almDone(alm)
770
-
771
-
772
- = 2.8.1.2 =
773
- * SECURITY - Due to a security scare with non-admin logged-in users I have updated all admin-ajax.php calls to verify nonce variables (wp_verify_nonce) and check user capabilities(edit_theme_options).
774
-
775
-
776
- = 2.8.1.1 =
777
- * FIX - Update for issue where Ajax Load More CSS would load even if unchecked.
778
-
779
-
780
- = 2.8.1.1 =
781
- * UPDATE - Adding required support/update for Language Pack translations (https://translate.wordpress.org/)
782
- * FIX - Update to automatically set posts_per_page to 1 if Previous Post add-on is in use.
783
- * FIX - Various core JS updates/improvements
784
- * FIX - Licenses not showing for Theme Repeaters and Previous Post add-ons
785
- * UPDATE - Various admin UI updates and enhancements.
786
-
787
- = 2.8.0 =
788
- * NEW - Adding required support and functionality for new Previous Post add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/previous-post/
789
- * NEW - Adding a set of filters to inject content into ALM containers.
790
- * NEW - Adding 'container_type' shortcode parameter that allows for override of the global Container Type.
791
- * NEW - Adding 'pause_override' shortcode parameter that will allow scrolling to override the Pause parameter and trigger the loading of posts on scroll.
792
- * NEW - Adding 'meta_type' shortcode parameter that will allow for specification of a custom field type..
793
- * UPDATE - Added unique id(classname/data-id) to each instance of ajax load more - this will allow for targeting of specific instances from outside elements.
794
- * FIX - Fixed JS issue with Paging add-on + SEO add-on URLs.
795
- * UPDATE - Various admin fixes and updates.
796
-
797
-
798
- = 2.7.3 =
799
- * NEW - Adding required support and functionality for new Theme Repeaters add-on - https://connekthq.com/plugins/ajax-load-more/add-ons/theme-repeaters/
800
- * NEW - Added new shortcode parameter 'images_loaded' which will allow you to wait for all images to load before displaying ajax loaded content.
801
- * UPDATE - General admin UI enhancements to settings screen.
802
-
803
-
804
- = 2.7.2 =
805
- * NEW - Adding multisite support for Repeater Templates - if using a multisite, please deactivate then re-activate Ajax Load More.
806
- * NEW - Completely rebuilt update script for repeater templates to be more efficient and integrate with multisite installations.
807
- * UPDATE - Split up ALM setting fields into Global and Admin settings for increased usability.
808
- * NEW - Added new setting field for Error Reporting - User can now choose to display error notices regarding repeater template updating in the browser console.
809
-
810
-
811
- = 2.7.1 =
812
- * FIX - Fixed issue for querying by meta_key - users are not required to enter a meta_value to query by meta_key.
813
-
814
-
815
- = 2.7.0 =
816
- * MILESTONE - This 2.7.0 release includes major updates to ALM core functionality to allow for new features and various fixes.
817
- * NEW - Added multiple meta query functionality to the shortcode builder - users can now query by up to 4 custom fields.
818
- * NEW - Adding 'css_classes' parameter - users can now add container css classes directly within the shortcode builder as well as the setting screen.
819
- * NEW - Adding Paging add-on functionality.
820
- * NEW - Adding secondary query to return total posts for entire ALM query.
821
- * NEW - Adding licensing section for add-on license key activation.
822
- * FIX - Fixed issue with boolean vs string variables in core JS.
823
- * FIX - Fixed bug with the 'custom_args' parameter that was blocking arrays from being passed. Please check the documentation for the updated 'custom_args' syntax for multiple values.
824
-
825
-
826
- = 2.6.3.2 =
827
- * FIX - Fixed bug with Preloaded + SEO and scrolling to current page in core Ajax Load More JS.
828
- * UPDATE - Moved SEO and Cache add-on settings and controls from ALM core to SEO core.
829
- * NEW - Added Google Analytics Pageview support to SEO add-on.
830
- * UPDATE - Various admin UI improvements.
831
-
832
- = 2.6.3.1 =
833
- * FIX - Fixed/updated error handling of repeater templates. Errors are now being reported in the browser console and do not interfere with the WP admin.
834
- * FIX - Fixed javascript issue with shorthand if statements and script concatenation.
835
- * REMOVED - Legacy code for creating 'alias' table columns.
836
-
837
- = 2.6.3 =
838
- * NEW - Added new shortcode parameter 'custom_args' which will let users pass custom query params. e.g. custom_args="order:custom_meta_key, tag_slug__and:array(design,development)"
839
- * NEW - Added setting for implementing WP nonce for added security of Ajax functionality.
840
- * Update - Removed WP nonce for ALM query as this was causing issues with various caching plugins.
841
- * Update - Various UI improvements and enhancements
842
-
843
- = 2.6.2 =
844
- * NEW - Adding new ALM setting to move user to top of page on window load.
845
- * FIX - Fixed issue with Cache + SEO where initial user might end up caching multiple pages in a single query if the page requested was greater than 1.
846
- * FIX - Fix for scrolling to load posts when max_pages = 0 - issue was introduced in release 2.6.1
847
-
848
- = 2.6.1 =
849
- * NEW - Public function, almFilter(type, speed, data) function which will allow for filtering/resetting of a ajax load more object.
850
- * NEW - Callback function, almFilterComplete() function which is dispatched after a successful almFilter() event.
851
- * NEW - Adding 'post__in' parameter. You can now curate queries based on a comma separated list of post ids.
852
- * UPDATE - Updating data() variables in ajax-load-more.js to allow for manipulation via JS.
853
- * FIX - Fix for cache parameter always true in ajax-load-more.js.
854
-
855
- = 2.6.0 =
856
- * NEW - Adding scroll_distance parameter - easily adjust the distance from the bottom of the page that will trigger loading of posts.
857
- * NEW - Adding required functionality for Caching Add-on.
858
- * NEW - Adding new almEmpty function triggered if zero results were returned.
859
- * FIX - Disabled in previous versions, Preloaded and SEO can now work together to produce SEO URLs.
860
- * UPDATE - Performance updates, various UI improvements.
861
-
862
-
863
- = 2.5.1 =
864
- * FIX - Dynamic population of category, tag and author content within Shortcode Builder - now this actually works as requested and no database queries happen if this setting is true.
865
- * FIX - Small issue with new destory_after parameter in core js.
866
- * UPDATE - Updated language .pot file.
867
- * UPDATE - Small admin interface tweaks.
868
-
869
-
870
- = 2.5.0 =
871
- * NEW - Adding query by multiple categories and tags.
872
- * NEW - Adding required functionality for new Preloaded add-on - preload posts before any ajax queries kick in.
873
- * NEW - Adding 'destroy_after' parameter to completely remove Ajax Load More functionality after 'n' number of pages.
874
- * NEW - Adding setting to disable dynamic population of category, tag and author content within shortcode builder.
875
- * NEW - Adding functionality to exclude categories('category__not_in').
876
- * NEW - Adding functionality to exclude tags('tag__not_in').
877
- * NEW - Adding option to copy repeater content and update templates from database directly on the Repeater Template settings page.
878
- * NEW - Query by multiple meta query values e.g "cat, dog, fish".
879
- * FIX - Issue with simultaneous query by category and custom taxonomy.
880
- * Fix - Issue for SEO add-on when pause = "true". ALM will now set pause to false if page > 1 when using the SEO add-on.
881
-
882
-
883
- = 2.4.0 =
884
- * Adding date query parameters - users can now query by day, month and year.
885
- * Admin UX improvements including sticky navigation in shortcode builder.
886
- * Updated ALM examples page with date query and improved archive.php.
887
- * Fixed PHP warning related to hiding Ajax Load More button in editor and Custom Repeaters v1.
888
- * Added language support for Polylang and qTranslate plugins.
889
-
890
-
891
- = 2.3.1 =
892
- * Urgent fix for array_push error
893
-
894
-
895
- = 2.3.0 =
896
- * Adding required functionality for ALM SEO add-on (https://connekthq.com/plugins/ajax-load-more/seo/)
897
- * Adding variables for counting items within the ALM query - $alm_page & $alm_item are now accessible within repeater templates.
898
- * Remove plugin activation notification due to error fetching column names.
899
- * Fixed issue with orderby = "rand", ALM now excludes all previously queried post ids.
900
- * fixed JS error on ALM setting pages.
901
- * Fixed issue with hiding TinyMCE button that was affecting other plugins.
902
- * General plugin improvements and enhancements.
903
-
904
-
905
- = 2.2.8 =
906
- * Adding required functionality for the NEW Ajax Load More Custom Repeaters v2 add-on - https://connekthq.com/plugins/ajax-load-more/custom-repeaters/
907
- * Improved debug messaging for Ajax Load More and Add-Ons.
908
- * Adding fix for ordering by meta value.
909
- * Admin stying updates.
910
- * Updated FAQs
911
- * Fix meta_query query and orderby meta value
912
-
913
-
914
- = 2.2.7 =
915
- * Fix for query by Standard post format.
916
- * Fix for Shortcode Builder where Custom Taxonomies were not building correctly.
917
-
918
-
919
- = 2.2.6 =
920
- * Bug fix for meta_query parameters.
921
- * Further improvements to WordPress query arguments from 2.2.4.
922
- * Update plugin .pot file.
923
-
924
- = 2.2.5 =
925
- * Urgent fix for category queries.
926
-
927
- = 2.2.4 =
928
- * Improving WordPress query arguments.
929
- * Removing empty query parameters which were conflicting with various hooks and filters reported by ALM users.
930
- * Updated admin notifications.
931
- * Added plugin action links to plugin listing.
932
-
933
- = 2.2.3 =
934
- * Adding query by Custom Field value(Meta Query).
935
- * Improved error handling for easier debugging.
936
- * Fixed issue with pause = "true" and scroll = "true". Pause should always take precendence over scroll.
937
- * Code clean up, improving overall quality for easier merges and updates.
938
-
939
- = 2.2.2 =
940
- * Adding callback function that is dispatched once a successful ajax call is made. $.fn.almComplete(alm).
941
- * Adding WPML support for ICL_LANGUAGE_CODE - A 'lang' atributed is added dynamically if WPML is installed.
942
- * Making JS variables and functions publically accessible.
943
-
944
- = 2.2.1 =
945
- * Fixed php notice/warning that would trigger if WP_DEBUG was enabled.
946
- * Adding minified core JS.
947
- * Adding global option to disable shortcode button in the content editor.
948
- * Adding touchmove js event for faster scroll detection on mobile devices.
949
- * Code clean up, removing unused functions.
950
-
951
- = 2.2.0 =
952
- * Adding Post Format query.
953
- * Adding syntax highlighting for Repeater Templates with CodeMirror (https://codemirror.net/).
954
- * Adding custom alias integration for Repeater Templates (Only for the custom repeater add-on).
955
- * Adding button preview on settings page.
956
- * Adding 'White' button style.
957
- * Updated .pot language file.
958
-
959
- = 2.1.3 =
960
- * Fixed issue causing the Ajax Load More menu to not show on some admin screen do to location conflict with another plugin.
961
- * Adding column 'alias' to wp_alm table to allow for repeater alias (Only for the custom repeater add-on).
962
- * Remove legacy column 'test' from wp_alm table.
963
- * Updating styles in admin.css.
964
-
965
- = 2.1.2 =
966
- * Adding ability to have multiple instances of script on a single page
967
- * Adding global class name('.ajax-load-more-wrap') to Ajax Load More container. I plan to remove the #ajax-load-more naming convention in upcoming releases, but need time for users to update their code.
968
- * Small styling enhancements to admin panel.
969
- * Updated .pot language file.
970
-
971
- = 2.1.1 =
972
- * Adding Order and Orderby query parameters, you can now set these values within the Shortcode Builder
973
- * Updating core javascript code
974
- * Fixed bug with taxonomy query selectors
975
-
976
- = 2.1.0 =
977
- * Adding custom taxonomy query - select from a list of custom taxonomies then select terms and operator
978
- * Fixed path to repeater file in admin functions
979
-
980
- = 2.0.15 =
981
- * Fixed issue with loading of admin javascript and css on pages other than Ajax Load More
982
-
983
- = 2.0.14 =
984
- * Fixed issue with author query
985
-
986
- = 2.0.13 =
987
- * Fixed issue where loading button was not turning off when posts remaining were zero
988
-
989
- = 2.0.12 =
990
- * Adding add_filter('widget_text', 'do_shortcode');
991
-
992
- = 2.0.11 =
993
- * Removed 2 filters for widget_text which were casuing issues in sidebars
994
-
995
- = 2.0.10 =
996
- * Updating default repeater template to include the_permalink()
997
-
998
- = 2.0.9 =
999
- * Fixing issue with duplicate column names in database.
1000
-
1001
- = 2.0.8 =
1002
- * removed upgrader_process_complete as it was unreliable. Replaced with admin_init to check whether plugin has been updated.
1003
-
1004
- = 2.0.7 =
1005
- * Fixed jQuery conflict javascript error
1006
-
1007
- = 2.0.6 =
1008
- * Fixing issue with scrolling of posts
1009
-
1010
- = 2.0.5 =
1011
- * Updating db table structure
1012
- * Adding upgrader_process_complete checker
1013
-
1014
- = 2.0.4 =
1015
- * Adding plugin version to wpdb table.
1016
- * Removed legacy repeater code.
1017
-
1018
- = 2.0.3 =
1019
- * Fixed issue with WP auto updates overriding the default repeater. Please deactivate and then activate your plugin.
1020
-
1021
- = 2.0.2 =
1022
- * Fixed issue with tinymce conflict
1023
 
1024
  = 2.0.1 - June 20, 2014 =
1025
  * Ajax Load More
2
  Contributors: dcooney, connekthq
3
  Donate link: https://connekthq.com/donate/
4
  Tags: infinite scroll, infinite scrolling, scroll, infinite, lazy load, lazy loading, endless scroll, pagination, ajax pagination, ajax, ajax posts, woocommerce, ajax load more, masonry
5
+ Requires at least: 4.0
6
+ Tested up to: 5.1.1
7
+ Stable tag: 5.0.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
18
 
19
  Ajax Load More is compatible for endless scrolling with popular eCommerce plugins such as WooCommerce and Easy Digital Downloads.
20
 
21
+ [Get More Information](https://connekthq.com/plugins/ajax-load-more/)
22
 
23
 
24
 
203
 
204
  **Complete** - The almComplete() function is triggered after every *successful* ajax call made by Ajax Load More.
205
 
206
+ almComplete = function(alm){
207
  // Your on complete code goes here
208
  };
209
 
210
 
211
  **Destroyed** - The almDestroyed() function is dispatched after the destroy_after shortcode parameter is triggered.
212
 
213
+ almDestroyed = function(alm){
214
  console.log('"Ajax Load More functionality has been destroyed!');
215
  };
216
 
217
 
218
  **Done** - The almDone() function is triggered after all posts have been loaded.
219
 
220
+ almDone = function(alm){
221
  console.log('All posts have been loaded!');
222
  };
223
 
224
  **Empty** - The almEmpty() function is triggered if there are zero results returned in the initial query.
225
 
226
+ almEmpty = function(alm){
227
  console.log('Sorry, but we could not locate any posts that matched your criteria.');
228
  };
229
 
230
  **Filter Complete** - The almFilterComplete() function is triggered after a successful call to the public function almFilter().
231
 
232
+ almFilterComplete = function(){
233
  console.log('Ajax Load More filter has completed!');
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
+ almUrlUpdate = function(permalink, type){
240
  console.log("URL updated to " + permalink + '- dispatched from the '+ type + ' add-on.');
241
  };
242
 
280
 
281
  ### Please Review Ajax Load More!
282
 
283
+ Your reviews make a big difference! Please consider taking the time to [review my plugin](https://wordpress.org/support/view/plugin-reviews/ajax-load-more). Your ratings and reviews help the plugin grow and provide the motivation needed to keep pushing it forward.
284
 
285
  [&rarr; Leave a Review](https://wordpress.org/support/plugin/ajax-load-more/reviews/#new-post)
286
 
328
  * Safari (Mac, iOS)
329
  * Opera
330
  * Android
331
+ * IE10+
332
+
333
+
334
+ = How Can You Contribute? =
335
+ Issues and pull requests can be submitted via [GitHub](https://github.com/dcooney/wordpress-ajax-load-more).
336
+
337
+ ***
338
 
339
 
340
  == Installation ==
377
 
378
  == Changelog ==
379
 
380
+ = 5.0.1 - March 13, 2019 =
381
+ - FIX - Fixed issue with Masonry not working when empty whitespace was present in a Repeater Template.
382
+ - FIX - Fixed issue with innerHTML and appendChild not trigger JavaScript present in Repeater Templates.
383
+
384
+
385
+ = 5.0.0 - March 8, 2019 =
386
+
387
+ MAJOR UPDATE NOTICE
388
+ All users running the Filters, SEO, Paging or Next Page add-ons MUST also update each of these plugins when running this 5.0 update.
389
+ Failing to upgrade the add-ons may result in JavaScript errors or broken functionality. It's always best to also backup your site prior to updating.
390
+
391
+ If you are using one of the add-ons listed above and you do not see a plugin update notification, please hold off on updating until prompted. Or try installing [Force Plugin Updates Check](https://wordpress.org/plugins/force-plugin-updates-check/) to force the plugin cache to clear.
392
+
393
+
394
+ Callback Functions
395
+ ALL [callback](https://connekthq.com/plugins/ajax-load-more/docs/callback-functions/) functions have been updated to remove legacy jQuery `$.fn()` prototype properties.
396
+ Users are encouraged to update their current callbacks to the new methods, but for now can autoload a helper JS file that has these legacy callbacks in place.
397
+ To maintain the legacy callbacks, visit Ajax Load More > Settings > Legacy Callbacks to enable the library.
398
+
399
+
400
+ What's New in 5.0.0
401
+ * NEW - Removing jQuery dependancy. Ajax Load More and all the add-ons plugins have been completely rewritten in Vanilla JS and ES6. 🎉
402
+ * NEW - Added [ImagesLoaded](https://imagesloaded.desandro.com/) library in place of WaitForImages for `images_loaded` param.
403
+ * NEW - Nested Ajax Load More instances will now auto-trigger on load.
404
+ * UPDATE - Updated build process from Gulp to Webpack.
405
+ * UPDATE - Added JS polyfills for various IE 11, 10 and 9 issues.
406
+ * UPDATE - Added ALM ID to `alm_nextpage_query` for Next page users.
407
+ - Fix - Fixed issue with `querySelector` on button element when using nested ALM instances.
408
+ * FIX - Removed duplicate `transition_container_classes` when using Paging add-on.
409
+ * FIX - Fixed issue with `alm-listing` container causing an error with the Comments addon.
410
+ * FIX - Added fix for `destroy_after` not triggered button `.done` class.
411
+ * Fix - Various JS other fixes and UX improvements.
412
+
413
+
414
  = 4.2.0.1 - January 16, 2019 =
415
  * FIX - Removed duplicate `transition_container_classes` when using Paging add-on.
416
  * FIX - Fixed issue with `alm-listing` container causing an error with the Comments addon.
437
  * FIX - Fixed issue with Filters onComplete functions triggering before Ajax results were rendered on the screen.
438
  * FIX - Adding fix for `alm_get_canonical_url` function when getting URLs of child category and tag archives.
439
 
440
+ ...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
441
 
442
  = 2.0.1 - June 20, 2014 =
443
  * Ajax Load More
admin/admin.php CHANGED
@@ -1242,6 +1242,14 @@ function alm_admin_init(){
1242
  'alm_general_settings'
1243
  );
1244
 
 
 
 
 
 
 
 
 
1245
  add_settings_field( // Uninstall
1246
  '_alm_uninstall',
1247
  __('Delete on Uninstall', 'ajax-load-more' ),
@@ -1623,7 +1631,7 @@ function alm_btn_class_callback(){
1623
  if(!isset($options['_alm_btn_classname']))
1624
  $options['_alm_btn_classname'] = '';
1625
 
1626
- $html = '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to your <strong>Load More</strong> button', 'ajax-load-more').'.</label>';
1627
  $html .= '<input type="text" class="btn-classes" id="alm_settings[_alm_btn_classname]" name="alm_settings[_alm_btn_classname]" value="'.$options['_alm_btn_classname'].'" placeholder="button rounded listing etc..." /> ';
1628
 
1629
  echo $html;
@@ -1668,7 +1676,34 @@ function _alm_scroll_top_callback(){
1668
 
1669
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
1670
  $html .= '<input type="checkbox" name="alm_settings[_alm_scroll_top]" id="_alm_scroll_top" value="1"'. (($options['_alm_scroll_top']) ? ' checked="checked"' : '') .' />';
1671
- $html .= '<label for="_alm_scroll_top">'.__('On initial page load, move the user\'s browser window to the top of the screen.<span style="display:block">This <u>may</u> help prevent the loading of unnecessary posts.</span>', 'ajax-load-more').'</label>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1672
 
1673
  echo $html;
1674
  }
1242
  'alm_general_settings'
1243
  );
1244
 
1245
+ add_settings_field( // Scroll to top on load
1246
+ '_alm_legacy_callbacks',
1247
+ __('Legacy Callbacks', 'ajax-load-more' ),
1248
+ '_alm_legacy_callbacks_callback',
1249
+ 'ajax-load-more',
1250
+ 'alm_general_settings'
1251
+ );
1252
+
1253
  add_settings_field( // Uninstall
1254
  '_alm_uninstall',
1255
  __('Delete on Uninstall', 'ajax-load-more' ),
1631
  if(!isset($options['_alm_btn_classname']))
1632
  $options['_alm_btn_classname'] = '';
1633
 
1634
+ $html = '<label for="alm_settings[_alm_btn_classname]">'.__('Add classes to your <strong>Load More</strong> button.', 'ajax-load-more').'</label>';
1635
  $html .= '<input type="text" class="btn-classes" id="alm_settings[_alm_btn_classname]" name="alm_settings[_alm_btn_classname]" value="'.$options['_alm_btn_classname'].'" placeholder="button rounded listing etc..." /> ';
1636
 
1637
  echo $html;
1676
 
1677
  $html = '<input type="hidden" name="alm_settings[_alm_scroll_top]" value="0" />';
1678
  $html .= '<input type="checkbox" name="alm_settings[_alm_scroll_top]" id="_alm_scroll_top" value="1"'. (($options['_alm_scroll_top']) ? ' checked="checked"' : '') .' />';
1679
+ $html .= '<label for="_alm_scroll_top">';
1680
+ $html .= __('On initial page load, move the user\'s browser window to the top of the screen.', 'ajax-load-more');
1681
+ $html .= '<span style="display:block">'. __('This may help prevent the loading of unnecessary posts.', 'ajax-load-more') .'</span>';
1682
+ $html .= '</label>';
1683
+
1684
+ echo $html;
1685
+ }
1686
+
1687
+
1688
+
1689
+ /*
1690
+ * _alm_legacy_callbacks_callback
1691
+ * Load legacy callback actions
1692
+ *
1693
+ * @since 5.0.0
1694
+ */
1695
+
1696
+ function _alm_legacy_callbacks_callback(){
1697
+ $options = get_option( 'alm_settings' );
1698
+ if(!isset($options['_alm_legacy_callbacks']))
1699
+ $options['_alm_legacy_callbacks'] = '0';
1700
+
1701
+ $html = '<input type="hidden" name="alm_settings[_alm_legacy_callbacks]" value="0" />';
1702
+ $html .= '<input type="checkbox" name="alm_settings[_alm_legacy_callbacks]" id="_alm_legacy_callbacks" value="1"'. (($options['_alm_legacy_callbacks']) ? ' checked="checked"' : '') .' />';
1703
+ $html .= '<label for="_alm_legacy_callbacks">';
1704
+ $html .= __('Load legacy JavaScript callback functions.', 'ajax-load-more');
1705
+ $html .= '<span style="display:block">'. __('Ajax Load More <a href="https://connekthq.com/plugins/ajax-load-more/docs/callback-functions/" target="_blank">callback functions</a> were updated in 5.0. Users who were using callbacks prior to ALM 5.0 can load this helper library to maintain compatibility.', 'ajax-load-more') .'</span>';
1706
+ $html .= '</label>';
1707
 
1708
  echo $html;
1709
  }
admin/dist/css/admin.css CHANGED
@@ -3546,7 +3546,7 @@ p.theme-title {
3546
  .shortcode-builder input[type=radio] + label span,
3547
  .ajax-load-more .form-table input[type=radio] + label span {
3548
  display: inline-block;
3549
- padding-left: 4px;
3550
  font-size: 12px;
3551
  color: #999; }
3552
 
3546
  .shortcode-builder input[type=radio] + label span,
3547
  .ajax-load-more .form-table input[type=radio] + label span {
3548
  display: inline-block;
3549
+ padding-left: 1px;
3550
  font-size: 12px;
3551
  color: #999; }
3552
 
admin/shortcode-builder/components/filters.php CHANGED
@@ -28,8 +28,8 @@
28
  <hr>
29
 
30
  <div class="section-title">
31
- <h4><?php _e('Target', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A target ID is not required but it is highly recommended to avoid issues with querystring parsing on page load','ajax-load-more'); ?>."></a></h4>
32
- <p><?php _e('Connect Ajax Load More to a specific <a href="admin.php?page=ajax-load-more-filters">filter instance</a> by selecting the filter ID', 'ajax-load-more'); ?>.</p>
33
  </div>
34
  <div class="wrap">
35
  <div class="inner">
@@ -67,8 +67,71 @@
67
  <hr>
68
 
69
  <div class="section-title">
70
- <h4><?php _e('Analytics', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Each time the filter is updated a pageview will be sent to Google Analytics','ajax-load-more'); ?>."></a></h4>
71
- <p><?php _e('Send pageviews to Google Analytics', 'ajax-load-more'); ?>.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  </div>
73
  <div class="wrap">
74
  <div class="inner">
@@ -90,7 +153,7 @@
90
 
91
  <div class="section-title">
92
  <h4><?php _e('Debug Mode', 'ajax-load-more'); ?></h4>
93
- <p><?php _e('Enable debugging of the Ajax Load More filter object in the browser console', 'ajax-load-more'); ?>.</p>
94
  </div>
95
  <div class="wrap">
96
  <div class="inner">
28
  <hr>
29
 
30
  <div class="section-title">
31
+ <h4><?php _e('Target', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('A target ID is not required but it is highly recommended to avoid issues with querystring parsing on page load.','ajax-load-more'); ?>"></a></h4>
32
+ <p><?php _e('Connect Ajax Load More to a specific <a href="admin.php?page=ajax-load-more-filters">filter instance</a> by selecting the filter ID.', 'ajax-load-more'); ?></p>
33
  </div>
34
  <div class="wrap">
35
  <div class="inner">
67
  <hr>
68
 
69
  <div class="section-title">
70
+ <h4><?php _e('Paging Parameters', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Adding paging parameters will allow for deep linking to a paged filter.','ajax-load-more'); ?>"></a></h4>
71
+ <p><?php _e('Add <span>?pg=x</span> to the browser querystring as users load additional pages.', 'ajax-load-more'); ?></p>
72
+ </div>
73
+ <div class="wrap">
74
+ <div class="inner">
75
+ <ul>
76
+ <li>
77
+ <input class="alm_element" type="radio" name="filters-paging" value="true" id="filters-paging-true" checked="checked">
78
+ <label for="filters-paging-true"><?php _e('True', 'ajax-load-more'); ?></label>
79
+ </li>
80
+ <li>
81
+ <input class="alm_element" type="radio" name="filters-paging" value="false" id="filters-paging-false">
82
+ <label for="filters-paging-false"><?php _e('False', 'ajax-load-more'); ?></label>
83
+ </li>
84
+ </ul>
85
+ </div>
86
+ </div>
87
+
88
+ <div class="clear"></div>
89
+ <hr>
90
+
91
+ <div class="section-title">
92
+ <h4><?php _e('Scroll', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('When a user filters a list they will be auto scrolled back to the top.','ajax-load-more'); ?>"></a></h4>
93
+ <p><?php _e('Automatically scroll users to the top of list after a filter update.', 'ajax-load-more'); ?></p>
94
+ </div>
95
+ <div class="wrap">
96
+ <div class="inner">
97
+ <ul>
98
+ <li>
99
+ <input class="alm_element" type="radio" name="filters-scroll" value="true" id="filters-scroll-true">
100
+ <label for="filters-scroll-true"><?php _e('True', 'ajax-load-more'); ?></label>
101
+ </li>
102
+ <li>
103
+ <input class="alm_element" type="radio" name="filters-scroll" value="false" id="filters-scroll-false" checked="checked">
104
+ <label for="filters-scroll-false"><?php _e('False', 'ajax-load-more'); ?></label>
105
+ </li>
106
+ </ul>
107
+ </div>
108
+ </div>
109
+
110
+ <div class="clear"></div>
111
+ <div id="filter-scrollTopOptions" style="display: none; overflow: hidden;">
112
+ <div class="clear"></div>
113
+ <hr>
114
+
115
+ <div class="section-title">
116
+ <h4><?php _e('Scroll Top', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('The Scroll Top value is the pixel position the window will be scrolled to.','ajax-load-more'); ?>"></a></h4>
117
+ <p><?php _e('The offset top position of the window used with `Paging Parameters` and `Scroll`.', 'ajax-load-more'); ?></p>
118
+ </div>
119
+ <div class="wrap">
120
+ <div class="inner">
121
+ <label for="filters-scrolltop" class="full">
122
+ <?php _e('Scroll Top Value', 'ajax-load-more'); ?>
123
+ </label>
124
+ <input id="filters-scrolltop" name="filters-scrolltop" class="alm_element sm" type="number" min="0" max="1000" step="1" value="30" placeholder="30">
125
+ </div>
126
+ </div>
127
+ </div>
128
+
129
+ <div class="clear"></div>
130
+ <hr>
131
+
132
+ <div class="section-title">
133
+ <h4><?php _e('Analytics', 'ajax-load-more'); ?> <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Each time the filter is updated a pageview will be sent to Google Analytics.','ajax-load-more'); ?>"></a></h4>
134
+ <p><?php _e('Send pageviews to Google Analytics.', 'ajax-load-more'); ?></p>
135
  </div>
136
  <div class="wrap">
137
  <div class="inner">
153
 
154
  <div class="section-title">
155
  <h4><?php _e('Debug Mode', 'ajax-load-more'); ?></h4>
156
+ <p><?php _e('Enable debugging of the Ajax Load More filter object in the browser console.', 'ajax-load-more'); ?></p>
157
  </div>
158
  <div class="wrap">
159
  <div class="inner">
admin/shortcode-builder/components/nextpage.php CHANGED
@@ -80,21 +80,18 @@
80
  <div class="clear"></div>
81
  <hr>
82
  <div class="section-title">
83
- <h4>
84
- <?php _e('Scroll to Page', 'ajax-load-more'); ?>
85
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Set Scroll Speed to 0 to disable scrolling to page','ajax-load-more'); ?>."></a>
86
- </h4>
87
  <p>
88
- <?php _e('Scroll users automatically to the next page on \'Load More\' button click', 'ajax-load-more'); ?>.
89
  </p>
90
  </div>
91
  <div class="wrap">
92
  <div class="inner half">
93
- <label for="next-page-scroll-speed" class="full">
94
- <?php _e('Scroll Speed', 'ajax-load-more'); ?>
95
- <a href="javascript:void(0)" class="fa fa-question-circle tooltip" title="<?php _e('Scrolling speed in milliseconds (e.g. 1 second = 1000)','ajax-load-more'); ?>."></a>
96
- </label>
97
- <input id="next-page-scroll-speed" name="next-page-scroll-speed" class="alm_element sm" type="number" min="0" max="5000" step="25" value="250" placeholder="250">
98
  </div>
99
  <div class="inner half">
100
  <label for="next-page-scroll-top" class="full">
@@ -106,10 +103,11 @@
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'); ?>
113
  </p>
114
 
115
  </div>
80
  <div class="clear"></div>
81
  <hr>
82
  <div class="section-title">
83
+ <h4><?php _e('Scroll to Page', 'ajax-load-more'); ?></h4>
 
 
 
84
  <p>
85
+ <?php _e('Scroll users automatically to the next page on \'Load More\' action', 'ajax-load-more'); ?>.
86
  </p>
87
  </div>
88
  <div class="wrap">
89
  <div class="inner half">
90
+ <label for="next-page-scroll" class="full"><?php _e('Enable Scrolling', 'ajax-load-more'); ?></label>
91
+ <select class="alm_element" name="next-page-scroll" id="next-page-scroll">
92
+ <option value="true" selected="selected"><?php _e('True', 'ajax-load-more'); ?></option>
93
+ <option value="false"><?php _e('False', 'ajax-load-more'); ?></option>
94
+ </select>
95
  </div>
96
  <div class="inner half">
97
  <label for="next-page-scroll-top" class="full">
103
  </div>
104
 
105
  <div class="clear"></div>
106
+
107
+ <hr/>
108
+
109
  <p class="warning-callout">
110
+ <?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.', 'ajax-load-more'); ?> <a class="button-small" href="https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/" target="_blank"><?php _e('View Docs', 'ajax-load-more'); ?></a>
111
  </p>
112
 
113
  </div>
admin/shortcode-builder/components/single-post.php CHANGED
@@ -116,7 +116,7 @@
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>
116
  <div class="clear"></div>
117
  <hr>
118
  <p class="warning-callout">
119
+ <?php _e('You must add the Single 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/single-post/" target="_blank"><?php _e('View Docs', 'ajax-load-more'); ?></a>
120
  </p>
121
  </div>
122
  </div>
admin/shortcode-builder/js/shortcode-builder.js CHANGED
@@ -327,6 +327,26 @@ jQuery(document).ready(function($) {
327
 
328
  output += ' filters="'+filters+'"';
329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  var filters_analytics = $('#alm-filters input[name=filters-analytics]:checked').val().trim();
331
  if(filters_analytics !== '' && filters_analytics !== 'true')
332
  output += ' filters_analytics="'+filters_analytics+'"';
@@ -353,7 +373,7 @@ jQuery(document).ready(function($) {
353
  var nextpage_post_id = $('#next-page_post_id').val(),
354
  nextpage_url = $('input#next-page-url:checked').val(),
355
  nextpage_pageviews = $('input#next-page-pageviews:checked').val(),
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');
@@ -368,10 +388,7 @@ jQuery(document).ready(function($) {
368
  output += ' nextpage_pageviews="false"';
369
  }
370
 
371
- if(!nextpage_scrollspeed.length) nextpage_scrollspeed = 250;
372
- if(!nextpage_scrolltop.length) nextpage_scrollspeed = 30;
373
-
374
- output += ' nextpage_scroll="'+ nextpage_scrollspeed +':'+ nextpage_scrolltop +'"';
375
 
376
 
377
  }else{
327
 
328
  output += ' filters="'+filters+'"';
329
 
330
+ var filters_paging = $('#alm-filters input[name=filters-paging]:checked').val().trim();
331
+ if(filters_paging !== '' && filters_paging !== 'true')
332
+ output += ' filters_paging="'+filters_paging+'"';
333
+
334
+ var filters_scroll = $('#alm-filters input[name=filters-scroll]:checked').val().trim();
335
+ if(filters_scroll !== '' && filters_scroll !== 'false')
336
+ output += ' filters_scroll="'+filters_paging+'"';
337
+
338
+ if(filters_paging === 'true' || filters_scroll === 'true'){
339
+
340
+ $('#filter-scrollTopOptions').slideDown(250, 'alm_easeInOutQuad');
341
+
342
+ var filters_scrolltop = $('#alm-filters input[name=filters-scrolltop]').val();
343
+ if(filters_scrolltop !== '30')
344
+ output += ' filters_scrolltop="'+filters_scrolltop+'"';
345
+
346
+ } else {
347
+ $('#filter-scrollTopOptions').slideUp(250, 'alm_easeInOutQuad');
348
+ }
349
+
350
  var filters_analytics = $('#alm-filters input[name=filters-analytics]:checked').val().trim();
351
  if(filters_analytics !== '' && filters_analytics !== 'true')
352
  output += ' filters_analytics="'+filters_analytics+'"';
373
  var nextpage_post_id = $('#next-page_post_id').val(),
374
  nextpage_url = $('input#next-page-url:checked').val(),
375
  nextpage_pageviews = $('input#next-page-pageviews:checked').val(),
376
+ nextpage_scroll = $('select#next-page-scroll').val(),
377
  nextpage_scrolltop = $('input#next-page-scroll-top').val();
378
 
379
  $('.next-page-content').slideDown(250, 'alm_easeInOutQuad');
388
  output += ' nextpage_pageviews="false"';
389
  }
390
 
391
+ output += ' nextpage_scroll="'+ nextpage_scroll +':'+ nextpage_scrolltop +'"';
 
 
 
392
 
393
 
394
  }else{
admin/src/scss/admin.scss CHANGED
@@ -2869,7 +2869,7 @@ p.theme-title{
2869
  cursor: pointer !important;
2870
  span{
2871
  display: inline-block;
2872
- padding-left: 4px;
2873
  font-size: 12px;
2874
  color: #999;
2875
  }
2869
  cursor: pointer !important;
2870
  span{
2871
  display: inline-block;
2872
+ padding-left: 1px;
2873
  font-size: 12px;
2874
  color: #999;
2875
  }
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.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
 
@@ -335,7 +335,7 @@ if( !class_exists('AjaxLoadMore') ):
335
 
336
  /*
337
  * alm_enqueue_scripts
338
- * Enqueue our scripts and create our localize variables
339
  *
340
  * @since 2.0.0
341
  */
@@ -353,7 +353,7 @@ if( !class_exists('AjaxLoadMore') ):
353
  *
354
  * @return Boolean
355
  */
356
- $dependencies = apply_filters( 'alm_js_dependencies', array('jquery') );
357
 
358
 
359
  // Core ALM JS
@@ -366,6 +366,9 @@ if( !class_exists('AjaxLoadMore') ):
366
  // Masonry JS
367
  wp_register_script( 'ajax-load-more-masonry', plugins_url( '/vendor/js/masonry/masonry.pkgd.min.js', __FILE__ ), 'ajax-load-more', '4.2.1', true );
368
 
 
 
 
369
 
370
  // Core CSS
371
  if( !alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css')){ // Not inline or disabled
@@ -374,13 +377,9 @@ if( !class_exists('AjaxLoadMore') ):
374
  }
375
 
376
  // Prevent loading of unnessasry posts - move user to top of page
377
- $scrolltop = 'false';
378
- if(!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1'){ // if unset or false
379
- $scrolltop = 'false';
380
- }else{ // if checked
381
- $scrolltop = 'true';
382
- }
383
-
384
  wp_localize_script(
385
  'ajax-load-more',
386
  'alm_localize',
@@ -449,10 +448,8 @@ if( !class_exists('AjaxLoadMore') ):
449
  // Cache
450
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
451
  $cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
452
- $do_create_cache = true;
453
- if($cache_logged_in === 'true' && is_user_logged_in()){
454
- $do_create_cache = false;
455
- }
456
 
457
  // Offset
458
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
@@ -636,7 +633,7 @@ if( !class_exists('AjaxLoadMore') ):
636
  $alm_current++; // Current item in loop
637
  $alm_page = $alm_page_count; // Get page number
638
  $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
639
-
640
 
641
  // Call to Action [Before]
642
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
6
  Text Domain: ajax-load-more
7
  Author: Darren Cooney
8
  Twitter: @KaptonKaos
9
+ Author URI: https://connekthq.com
10
+ Version: 5.0.1
11
  License: GPL
12
  Copyright: Darren Cooney & Connekt Media
13
  */
14
 
15
 
16
+ define('ALM_VERSION', '5.0.1');
17
+ define('ALM_RELEASE', 'March 13, 2019');
18
  define('ALM_STORE_URL', 'https://connekthq.com');
19
 
20
 
335
 
336
  /*
337
  * alm_enqueue_scripts
338
+ * Enqueue scripts and create localized variables
339
  *
340
  * @since 2.0.0
341
  */
353
  *
354
  * @return Boolean
355
  */
356
+ $dependencies = apply_filters( 'alm_js_dependencies', '' );
357
 
358
 
359
  // Core ALM JS
366
  // Masonry JS
367
  wp_register_script( 'ajax-load-more-masonry', plugins_url( '/vendor/js/masonry/masonry.pkgd.min.js', __FILE__ ), 'ajax-load-more', '4.2.1', true );
368
 
369
+ // Callback Helpers
370
+ wp_register_script( 'ajax-load-more-legacy-callbacks', plugins_url( '/vendor/js/alm/legacy-callbacks.js', __FILE__ ), 'jquery', '', false);
371
+
372
 
373
  // Core CSS
374
  if( !alm_do_inline_css('_alm_inline_css') && !alm_css_disabled('_alm_disable_css')){ // Not inline or disabled
377
  }
378
 
379
  // Prevent loading of unnessasry posts - move user to top of page
380
+ // if unset or false
381
+ $scrolltop = (!isset($options['_alm_scroll_top']) || $options['_alm_scroll_top'] != '1') ? 'false' : 'true';
382
+
 
 
 
 
383
  wp_localize_script(
384
  'ajax-load-more',
385
  'alm_localize',
448
  // Cache
449
  $cache_id = (isset($_GET['cache_id'])) ? $_GET['cache_id'] : '';
450
  $cache_logged_in = (isset($_GET['cache_logged_in'])) ? $_GET['cache_logged_in'] : false;
451
+ $do_create_cache = ($cache_logged_in === 'true' && is_user_logged_in()) ? false : true;
452
+
 
 
453
 
454
  // Offset
455
  $offset = (isset($_GET['offset'])) ? $_GET['offset'] : 0;
633
  $alm_current++; // Current item in loop
634
  $alm_page = $alm_page_count; // Get page number
635
  $alm_item = ($alm_page_count * $posts_per_page) - $posts_per_page + $alm_loop_count; // Get current item
636
+
637
 
638
  // Call to Action [Before]
639
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'before' && in_array($alm_current, $cta_array)){
core/classes/class.alm-queryargs.php CHANGED
@@ -36,7 +36,7 @@ if(!class_exists('ALM_QUERY_ARGS')):
36
 
37
  // Post Type
38
  if($is_ajax){
39
- $post_type = (isset($a['post_type'])) ? $a['post_type'] : 'post';
40
  } else {
41
  $post_type = explode(",", $a['post_type']);
42
  }
36
 
37
  // Post Type
38
  if($is_ajax){
39
+ $post_type = (isset($a['post_type'])) ? explode(",", $a['post_type']) : 'post';
40
  } else {
41
  $post_type = explode(",", $a['post_type']);
42
  }
core/classes/class.alm-shortcode.php CHANGED
@@ -55,6 +55,9 @@ if( !class_exists('ALM_SHORTCODE') ):
55
  'nested' => false,
56
  'filters' => false,
57
  'target' => '',
 
 
 
58
  'filters_analytics' => 'true',
59
  'filters_debug' => false,
60
  'acf' => false,
@@ -84,7 +87,7 @@ if( !class_exists('ALM_SHORTCODE') ):
84
  'nextpage' => false,
85
  'nextpage_post_id' => 'null',
86
  'nextpage_urls' => 'true',
87
- 'nextpage_scroll' => '250:30',
88
  'nextpage_pageviews' => 'true',
89
  'nextpage_start' => 1,
90
  'previous_post' => false,
@@ -192,18 +195,18 @@ if( !class_exists('ALM_SHORTCODE') ):
192
  echo ALM_ENQUEUE::alm_inline_css(ALM_SLUG, $file, ALM_URL);
193
  }
194
 
 
 
 
 
 
 
 
 
195
  // Masonry
196
  if($transition === 'masonry'){
197
- wp_enqueue_script( 'imagesloaded' ); // Enqueue before core ALM
198
  wp_enqueue_script( 'ajax-load-more-masonry' ); // Enqueue before core ALM
199
  }
200
-
201
- if($images_loaded === 'true'){
202
- wp_enqueue_script( 'ajax-load-more-images-loaded' );
203
- }
204
-
205
- // Core ALM
206
- wp_enqueue_script( 'ajax-load-more' );
207
 
208
  // Progress Bar
209
  if($progress_bar === 'true'){ // Enqueue bar JS
@@ -263,7 +266,6 @@ if( !class_exists('ALM_SHORTCODE') ):
263
  do_action('alm_enqueue_external_scripts', $atts);
264
 
265
 
266
-
267
  // End Enqueue Scripts
268
 
269
 
@@ -275,38 +277,33 @@ if( !class_exists('ALM_SHORTCODE') ):
275
  if(defined('ALM_FILTERS_PATH')){
276
  include(ALM_FILTERS_PATH .'includes/initial-state-params.php');
277
  }
278
- }
279
-
280
 
281
- $single_post = ($single_post === 'true') ? true : false;
282
-
283
 
284
- if($seo === "true" || $single_post || $filters){
285
- $transition_container = "true";
286
- }
287
 
288
- if(!empty($transition_container_classes)){
289
- $transition_container_classes = ' '. $transition_container_classes;
290
- }
291
 
 
292
  if($restapi === 'true'){
293
  $restapi = true;
294
  $preloaded = false;
295
  }
296
 
297
  // Get container elements (ul | div)
298
-
299
  $container_element = 'ul';
300
  if($options['_alm_container_type'] == '2' || $single_post){
301
  $container_element = 'div';
302
  }
303
 
 
304
  $css_classes = (!empty($css_classes)) ? ' ' . $css_classes : '';
305
 
306
  // override shortcode param
307
- if($container_type){
308
- $container_element = $container_type;
309
- }
310
 
311
  // Previous Post
312
  if($single_post){
@@ -318,9 +315,7 @@ if( !class_exists('ALM_SHORTCODE') ):
318
  $users = ($users === 'true') ? true : false;
319
 
320
  // Comments
321
- if($comments === 'true'){
322
- $container_element = $comments_style;
323
- }
324
 
325
  // Get extra classnames
326
  $classname = '';
@@ -342,16 +337,10 @@ if( !class_exists('ALM_SHORTCODE') ):
342
  }
343
 
344
  // Get Layouts activated
345
- $alm_layouts = '';
346
- if(has_action('alm_layouts_installed')){
347
- $alm_layouts = ' alm-layouts';
348
- }
349
 
350
  // Get btn classnames
351
- $button_classname = '';
352
- if(isset($options['_alm_btn_classname'])){
353
- $button_classname = ' '.$options['_alm_btn_classname'];
354
- }
355
 
356
  // Language support
357
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
@@ -372,9 +361,10 @@ if( !class_exists('ALM_SHORTCODE') ):
372
 
373
  // Paging
374
  $paging_container_class = '';
 
375
  if($paging === 'true'){
376
  $paging_container_class = ' alm-paging-wrap';
377
-
378
  // If Preloaded & Paging, pause loading by default.
379
  // Added in 2.14.0
380
  if($preloaded === 'true'){
@@ -382,6 +372,7 @@ if( !class_exists('ALM_SHORTCODE') ):
382
  $pause_override = 'false';
383
  }
384
  }
 
385
 
386
  // Start ALM object
387
  $ajaxloadmore = '';
@@ -463,12 +454,16 @@ if( !class_exists('ALM_SHORTCODE') ):
463
  $pause = 'true';
464
  }
465
 
466
-
467
- if($seo === 'true'){
468
- // If seo, set preloaded_amount to posts_per_page value
469
  $preloaded_amount = $posts_per_page;
470
  }
471
 
 
 
 
 
 
472
 
473
  // $query_args array to store global ALM variables
474
  $query_args = array(
@@ -539,7 +534,7 @@ if( !class_exists('ALM_SHORTCODE') ):
539
 
540
  // Open #ajax-load-more
541
 
542
- $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class . $classname . $css_classes .'"';
543
 
544
  // Build container data atts
545
 
@@ -604,6 +599,9 @@ if( !class_exists('ALM_SHORTCODE') ):
604
  'alm_filters_shortcode_params',
605
  $filters,
606
  $target,
 
 
 
607
  $filters_analytics,
608
  $filters_debug,
609
  $options
@@ -631,8 +629,21 @@ if( !class_exists('ALM_SHORTCODE') ):
631
 
632
  $preloaded = ($seo === 'true' && (int)$query_args['paged'] < 1 && $paging !== 'true') ? 'true' : $preloaded; // SEO page 1
633
 
 
634
  // SEO > page 1
635
- $preloaded = ($seo === 'true' && $query_args['paged'] > 1 && $paging !== 'true') ? false : $preloaded; // SEO page 1
 
 
 
 
 
 
 
 
 
 
 
 
636
 
637
  // Set was-preloaded attribute to add alm-preloaded class to first alm-reveal div
638
  if($seo === 'true' && $query_args['paged'] > 1){
@@ -714,6 +725,8 @@ if( !class_exists('ALM_SHORTCODE') ):
714
  );
715
  $ajaxloadmore .= $users_return;
716
  }
 
 
717
 
718
 
719
  $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
@@ -838,6 +851,7 @@ if( !class_exists('ALM_SHORTCODE') ):
838
  // Get first post and append to alm object
839
  if(has_action('alm_single_post_installed') && $single_post){
840
 
 
841
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
842
  $repeater_type = $repeater_type[0]; // (default | repeater | template_)
843
 
@@ -853,12 +867,16 @@ if( !class_exists('ALM_SHORTCODE') ):
853
 
854
  /*
855
  * alm_single_post_inc
856
- *
857
  * Previous Post Add-on hook
858
  *
859
  * @return $args;
860
  */
861
- $single_post_output .= apply_filters('alm_single_post_inc', $repeater, $repeater_type, $theme_repeater, $single_post_id, $post_type);
 
 
 
 
 
862
 
863
  $single_post_output .= '</div>';
864
  $ajaxloadmore .= $single_post_output; // Add $single_post_output data to $ajaxloadmore
@@ -874,7 +892,7 @@ if( !class_exists('ALM_SHORTCODE') ):
874
 
875
  $nextpage_is_paged = ($nextpage_start > 1) ? true : false;
876
 
877
- $alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging, $div_id);
878
  $ajaxloadmore .= $alm_nextpage_output;
879
 
880
  }
55
  'nested' => false,
56
  'filters' => false,
57
  'target' => '',
58
+ 'filters_paging' => 'true',
59
+ 'filters_scroll' => 'false',
60
+ 'filters_scrolltop' => '30',
61
  'filters_analytics' => 'true',
62
  'filters_debug' => false,
63
  'acf' => false,
87
  'nextpage' => false,
88
  'nextpage_post_id' => 'null',
89
  'nextpage_urls' => 'true',
90
+ 'nextpage_scroll' => 'true:30',
91
  'nextpage_pageviews' => 'true',
92
  'nextpage_start' => 1,
93
  'previous_post' => false,
195
  echo ALM_ENQUEUE::alm_inline_css(ALM_SLUG, $file, ALM_URL);
196
  }
197
 
198
+ // Legacy Callback Helpers
199
+ if(isset($options['_alm_legacy_callbacks']) && $options['_alm_legacy_callbacks'] == '1'){ // Load if active
200
+ wp_enqueue_script( 'ajax-load-more-legacy-callbacks' );
201
+ }
202
+
203
+ // Core ALM
204
+ wp_enqueue_script( 'ajax-load-more' );
205
+
206
  // Masonry
207
  if($transition === 'masonry'){
 
208
  wp_enqueue_script( 'ajax-load-more-masonry' ); // Enqueue before core ALM
209
  }
 
 
 
 
 
 
 
210
 
211
  // Progress Bar
212
  if($progress_bar === 'true'){ // Enqueue bar JS
266
  do_action('alm_enqueue_external_scripts', $atts);
267
 
268
 
 
269
  // End Enqueue Scripts
270
 
271
 
277
  if(defined('ALM_FILTERS_PATH')){
278
  include(ALM_FILTERS_PATH .'includes/initial-state-params.php');
279
  }
280
+ }
 
281
 
282
+ $single_post = ($single_post === 'true') ? true : false;
 
283
 
284
+ $transition_container = ($seo === "true" || $single_post || $filters) ? 'true' : $transition_container;
 
 
285
 
286
+ // Transition Container Classes
287
+ $transition_container_classes = (!empty($transition_container_classes)) ? ' '. $transition_container_classes : '';
288
+
289
 
290
+ // REST API
291
  if($restapi === 'true'){
292
  $restapi = true;
293
  $preloaded = false;
294
  }
295
 
296
  // Get container elements (ul | div)
 
297
  $container_element = 'ul';
298
  if($options['_alm_container_type'] == '2' || $single_post){
299
  $container_element = 'div';
300
  }
301
 
302
+ // CSS Classes
303
  $css_classes = (!empty($css_classes)) ? ' ' . $css_classes : '';
304
 
305
  // override shortcode param
306
+ $container_element = ($container_type) ? $container_type : $container_element;
 
 
307
 
308
  // Previous Post
309
  if($single_post){
315
  $users = ($users === 'true') ? true : false;
316
 
317
  // Comments
318
+ $container_element = ($comments === 'true') ? $comments_style : $container_element;
 
 
319
 
320
  // Get extra classnames
321
  $classname = '';
337
  }
338
 
339
  // Get Layouts activated
340
+ $alm_layouts = (has_action('alm_layouts_installed')) ? ' alm-layouts' : '';
 
 
 
341
 
342
  // Get btn classnames
343
+ $button_classname = (isset($options['_alm_btn_classname'])) ? ' '.$options['_alm_btn_classname'] : '';
 
 
 
344
 
345
  // Language support
346
  $lang = defined('ICL_LANGUAGE_CODE') ? ICL_LANGUAGE_CODE : ''; // WPML - http://wpml.org
361
 
362
  // Paging
363
  $paging_container_class = '';
364
+ $paging_transition = '';
365
  if($paging === 'true'){
366
  $paging_container_class = ' alm-paging-wrap';
367
+ $paging_transition = ' style="-webkit-transition: height 0.25s ease; transition: height 0.25s ease;"';
368
  // If Preloaded & Paging, pause loading by default.
369
  // Added in 2.14.0
370
  if($preloaded === 'true'){
372
  $pause_override = 'false';
373
  }
374
  }
375
+
376
 
377
  // Start ALM object
378
  $ajaxloadmore = '';
454
  $pause = 'true';
455
  }
456
 
457
+ // If SEO, set preloaded_amount to posts_per_page
458
+ if($seo === 'true' || $filters){
 
459
  $preloaded_amount = $posts_per_page;
460
  }
461
 
462
+ // If Filters & Filters Paging, set preloaded_amount to posts_per_page
463
+ if($filters && $filters_paging === 'true'){
464
+ $preloaded_amount = $posts_per_page;
465
+ }
466
+
467
 
468
  // $query_args array to store global ALM variables
469
  $query_args = array(
534
 
535
  // Open #ajax-load-more
536
 
537
+ $ajaxloadmore .= '<'.$container_element.' class="'.$listing_class.' alm-ajax'. $paging_container_class . $classname . $css_classes .'"'.$paging_transition.'';
538
 
539
  // Build container data atts
540
 
599
  'alm_filters_shortcode_params',
600
  $filters,
601
  $target,
602
+ $filters_paging,
603
+ $filters_scroll,
604
+ $filters_scrolltop,
605
  $filters_analytics,
606
  $filters_debug,
607
  $options
629
 
630
  $preloaded = ($seo === 'true' && (int)$query_args['paged'] < 1 && $paging !== 'true') ? 'true' : $preloaded; // SEO page 1
631
 
632
+
633
  // SEO > page 1
634
+ $preloaded = ($seo === 'true' && $query_args['paged'] > 1 && $paging !== 'true') ? false : $preloaded; // SEO page > 1
635
+
636
+
637
+ // Filters
638
+ if($filters && $_SERVER['QUERY_STRING']){
639
+ $querystring = $_SERVER['QUERY_STRING'];
640
+ if(isset($_GET['pg'])){
641
+ $pg = $_GET['pg'];
642
+ $preloaded = ($pg > 1) ? false : $preloaded;
643
+ $ajaxloadmore .= ' data-is-preloaded="true"';
644
+ }
645
+ }
646
+
647
 
648
  // Set was-preloaded attribute to add alm-preloaded class to first alm-reveal div
649
  if($seo === 'true' && $query_args['paged'] > 1){
725
  );
726
  $ajaxloadmore .= $users_return;
727
  }
728
+
729
+ $ajaxloadmore .= ' data-container-type="'.$container_element.'"';
730
 
731
 
732
  $ajaxloadmore .= ' data-repeater="'.$repeater.'"';
851
  // Get first post and append to alm object
852
  if(has_action('alm_single_post_installed') && $single_post){
853
 
854
+
855
  $repeater_type = preg_split('/(?=\d)/', $repeater, 2); // split $repeater at number to retrieve type
856
  $repeater_type = $repeater_type[0]; // (default | repeater | template_)
857
 
867
 
868
  /*
869
  * alm_single_post_inc
 
870
  * Previous Post Add-on hook
871
  *
872
  * @return $args;
873
  */
874
+
875
+ if($offset < 1){
876
+ // Only render include if offset is zero
877
+ $single_post_output .= apply_filters('alm_single_post_inc', $repeater, $repeater_type, $theme_repeater, $single_post_id, $post_type);
878
+ }
879
+
880
 
881
  $single_post_output .= '</div>';
882
  $ajaxloadmore .= $single_post_output; // Add $single_post_output data to $ajaxloadmore
892
 
893
  $nextpage_is_paged = ($nextpage_start > 1) ? true : false;
894
 
895
+ $alm_nextpage_output = apply_filters('alm_init_nextpage', $nextpage_post_id, $nextpage_start,$nextpage_is_paged, $paging, $div_id, $id);
896
  $ajaxloadmore .= $alm_nextpage_output;
897
 
898
  }
core/classes/includes/preloaded.php CHANGED
@@ -10,7 +10,7 @@ $preload_offset = $offset;
10
 
11
 
12
  // .alm-reveal default
13
- $alm_reveal= '<div class="alm-reveal alm-preloaded'. $transition_container_classes .'">';
14
 
15
 
16
  // If $seo or $filters, set $preloaded_amount to $posts_per_page
@@ -255,7 +255,7 @@ else {
255
  // Call to Action [After]
256
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'after'){
257
  $output .= ($alm_current == $cta_val) ? apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true) : '';
258
- }
259
 
260
  endwhile; wp_reset_query();
261
 
@@ -272,13 +272,6 @@ else {
272
 
273
 
274
  endif;
275
-
276
-
277
- if($filters && class_exists('ALMFILTERS')){
278
- // Maybe use this for Preloaded
279
- //$pg = ALMFILTERS::alm_filters_get_page_num();
280
- //$alm_total_posts = ($pg > 1 ) ? $alm_total_posts - ($preloaded_amount * $pg) + $preloaded_amount : $alm_total_posts;
281
- }
282
 
283
 
284
  // Add total_posts to localized ALM JS variables
@@ -288,16 +281,16 @@ else {
288
 
289
  if($seo === "true"){ // SEO, not Paging
290
 
291
- // Get querystring to append to URL (Maybe in the future)
292
- $querystring = ''; // $querystring = $_SERVER['QUERY_STRING'];
293
 
294
  // If search, append slug (?s=term) to data-url
295
  $search_slug = (is_search()) ? $slug : '';
296
 
297
  // Append querystring to data-url
298
  $querystring = ($querystring) ? '?'.$querystring : '';
299
-
300
- $alm_reveal = '<div class="alm-reveal alm-seo alm-preloaded'. $transition_container_classes .'" data-page="1" data-url="'. $canonicalURL .''. $search_slug . $querystring .'" data-total-posts="'. $alm_preload_query->found_posts .'">';
301
 
302
  } else {
303
 
10
 
11
 
12
  // .alm-reveal default
13
+ $alm_reveal = '<div class="alm-reveal alm-preloaded'. $transition_container_classes .'">';
14
 
15
 
16
  // If $seo or $filters, set $preloaded_amount to $posts_per_page
255
  // Call to Action [After]
256
  if($cta && has_action('alm_cta_inc') && $cta_pos === 'after'){
257
  $output .= ($alm_current == $cta_val) ? apply_filters('alm_cta_inc', $cta_repeater, $cta_theme_repeater, $alm_found_posts, $alm_page, $alm_item, $alm_current, true) : '';
258
+ }
259
 
260
  endwhile; wp_reset_query();
261
 
272
 
273
 
274
  endif;
 
 
 
 
 
 
 
275
 
276
 
277
  // Add total_posts to localized ALM JS variables
281
 
282
  if($seo === "true"){ // SEO, not Paging
283
 
284
+ // Get querystring to append to URL
285