diff --git a/README.txt b/README.txt index 200ccf7..edfb015 100755 --- a/README.txt +++ b/README.txt @@ -5,7 +5,7 @@ Tags: infinite scroll, load more, ajax, lazy load, endless scroll, infinite scro Requires at least: 5.0 Requires PHP: 5.6 Tested up to: 6.4 -Stable tag: 7.0.2 +Stable tag: 7.0.3 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -260,6 +260,11 @@ How to install Ajax Load More. == Changelog == += 7.0.3 - February 15, 2024 = +* FIX: Added fix for Paging add-on scrolling to top of listing on initial page load when `paging_scroll` was `true`. +* FIX: Fixed issue with undefined `post_count` when loading Ajax Load More with Ajax/HTTP request. + + = 7.0.2 - February 8, 2024 = * NEW: Added 'alm_licensing_sslverify' hook to allow users to disable SSL verification when checking for updates. * NEW: Added new Paging add-on parameter `paging_container_classes` used for adding CSS classes to the paging HTML container. diff --git a/ajax-load-more.php b/ajax-load-more.php index 873687b..09681d8 100755 --- a/ajax-load-more.php +++ b/ajax-load-more.php @@ -7,15 +7,15 @@ * Author: Darren Cooney * Twitter: @KaptonKaos * Author URI: https://connekthq.com - * Version: 7.0.2 + * Version: 7.0.3 * License: GPL * Copyright: Darren Cooney & Connekt Media * * @package AjaxLoadMore */ -define( 'ALM_VERSION', '7.0.2' ); -define( 'ALM_RELEASE', 'February 8, 2024' ); +define( 'ALM_VERSION', '7.0.3' ); +define( 'ALM_RELEASE', 'February 15, 2024' ); define( 'ALM_STORE_URL', 'https://connekthq.com' ); // Plugin installation helpers. diff --git a/build/frontend/ajax-load-more.asset.php b/build/frontend/ajax-load-more.asset.php index abcbcc3..4ef16d9 100644 --- a/build/frontend/ajax-load-more.asset.php +++ b/build/frontend/ajax-load-more.asset.php @@ -1 +1 @@ - array(), 'version' => '645de9921ce43595fcba'); + array(), 'version' => '41bf2ff3e240f56330fa'); diff --git a/build/frontend/ajax-load-more.js b/build/frontend/ajax-load-more.js index 7c644c0..7f7d40e 100644 --- a/build/frontend/ajax-load-more.js +++ b/build/frontend/ajax-load-more.js @@ -8912,15 +8912,23 @@ function pagingCreateParams(alm) { * * @param {Object} alm The alm object. * @param {boolean} alm_is_filtering Is ALM filtering. + * @param {boolean} init Is first run. */ -function pagingComplete(alm, alm_is_filtering = false) { +function pagingComplete(alm, alm_is_filtering = false, init = false) { const { main, AjaxLoadMore, last_loaded } = alm; main.classList.remove('alm-loading'); AjaxLoadMore.triggerAddons(alm); - if (typeof almOnPagingComplete === 'function') { - window.almOnPagingComplete(alm); // Callback: Paging Add-on Complete + if (init) { + if (typeof almPagingComplete === 'function') { + window.almPagingComplete(); + } + } else { + // Dispatch almOnPagingComplete callback when not alm.init. + if (typeof almOnPagingComplete === 'function') { + window.almOnPagingComplete(alm); // Callback: Paging Add-on Complete. + } } if (alm_is_filtering && alm.addons.filters && typeof almFiltersAddonComplete === 'function') { @@ -11392,7 +11400,12 @@ let alm_is_filtering = false; alm.master_id = alm.master_id.replace(/-/g, '_'); // Localized