Skip to content

Commit dcb17cb

Browse files
authored
Fixed issue with registering the load_text_domain() function (#236)
* Fix for load_text_domain action, add single posts querystring. * Adding fix for load_text_domain * Updated build assets
1 parent d738b13 commit dcb17cb

File tree

12 files changed

+211
-1451
lines changed

12 files changed

+211
-1451
lines changed

README.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: infinite scroll, load more, lazy load, endless scroll, ajax load more
55
Requires at least: 5.0
66
Requires PHP: 5.6
77
Tested up to: 6.8
8-
Stable tag: 7.4.1
8+
Stable tag: 7.4.2
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -269,6 +269,11 @@ How to install Ajax Load More.
269269

270270
== Changelog ==
271271

272+
= 7.4.2 - June 10, 2025 =
273+
* FIX: Fixed issue with registering the load_text_domain() function.
274+
* UPDATE: Updated functions to get the querystring with the SEO and Single Posts Add-on. [DONE]
275+
* UPDATE: Various updates UI/UX updates to the core plugin.
276+
272277
= 7.4.1 - June 6, 2025 =
273278
* UPDATE: Updated license handling functionality to reduce failed attempted to activate licenses.
274279
* UPDATE: Various code cleanup and UI updates throughout the plugin.

admin/views/shortcode-builder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<div class="major-publishing-actions">
3030
<button class="button button-primary copy copy-to-clipboard" data-copied="<?php _e( 'Copied!', 'ajax-load-more' ); ?>"><?php _e( 'Copy Shortcode', 'ajax-load-more' ); ?></button>
3131
<a id="shortcode-preview" class="button button-secondary" data-home-url="<?php echo esc_url( get_home_url() ); ?>" href="<?php echo esc_url( get_home_url() ); ?>?alm_preview=[ajax_load_more]" target="_blank"><?php _e( 'Preview', 'ajax-load-more' ); ?></a>
32-
<button class="button reset-shortcode-builder"><i class="fa fa-refresh"></i> <?php _e( 'Reset', 'ajax-load-more' ); ?></button>
32+
<button class="button reset-shortcode-builder"><?php _e( 'Reset', 'ajax-load-more' ); ?></button>
3333
</div>
3434
</div>
3535
</aside>

ajax-load-more.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
* Author: Darren Cooney
88
* Twitter: @KaptonKaos
99
* Author URI: https://connekthq.com
10-
* Version: 7.4.1
10+
* Version: 7.4.2
1111
* License: GPL
1212
* Copyright: Darren Cooney & Connekt Media
1313
*
1414
* @package AjaxLoadMore
1515
*/
1616

17-
define( 'ALM_VERSION', '7.4.1' );
18-
define( 'ALM_RELEASE', 'June 6, 2025' );
17+
define( 'ALM_VERSION', '7.4.2' );
18+
define( 'ALM_RELEASE', 'June 10, 2025' );
1919
define( 'ALM_STORE_URL', 'https://connekthq.com' );
2020

2121
require_once plugin_dir_path( __FILE__ ) . 'core/functions/install.php';
@@ -68,6 +68,7 @@ public function __construct() {
6868
add_action( 'wp_ajax_nopriv_alm_get_posts', [ $this, 'alm_query_posts' ] );
6969
add_action( 'wp_enqueue_scripts', [ $this, 'alm_enqueue_scripts' ] );
7070
add_action( 'after_setup_theme', [ $this, 'alm_image_sizes' ] );
71+
add_action( 'init', [ $this, 'alm_load_text_domain' ] );
7172

7273
add_filter( 'alm_noscript', [ $this, 'alm_noscript' ], 10, 6 );
7374
add_filter( 'alm_noscript_pagination', [ $this, 'alm_noscript_pagination' ], 10, 3 );
@@ -76,7 +77,6 @@ public function __construct() {
7677
add_filter( 'widget_text', 'do_shortcode' );
7778

7879
add_shortcode( 'ajax_load_more', [ $this, 'alm_shortcode' ] );
79-
add_shortcode( 'init', [ $this, 'alm_load_text_domain' ] );
8080
}
8181

8282
/**
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => 'f8febdd59d7681183d3b');
1+
<?php return array('dependencies' => array(), 'version' => '52ba44d7ced59bb3bc05');

build/frontend/ajax-load-more.js

Lines changed: 119 additions & 1415 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => '9abc759e5688db9e01bd');
1+
<?php return array('dependencies' => array(), 'version' => 'fc4df552f90365c4b09b');

build/frontend/ajax-load-more.min.js

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lang/ajax-load-more.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GPL.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: Ajax Load More 7.4.1\n"
5+
"Project-Id-Version: Ajax Load More 7.4.2\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ajax-load-more\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <[email protected]>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-06-06T14:33:10+00:00\n"
12+
"POT-Creation-Date: 2025-06-10T11:24:21+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.11.0\n"
1515
"X-Domain: ajax-load-more\n"

src/frontend/js/addons/seo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function seoCreateParams(alm) {
5252
export function addSEOAttributes(alm, element, pagenum, skipOffset = false) {
5353
const { addons, canonical_url } = alm;
5454
const { retain_querystring = true } = alm_localize;
55-
const querystring = retain_querystring ? window.location.search : '';
55+
const querystring = retain_querystring || alm.init ? window.location.search : '';
5656

5757
pagenum = !skipOffset ? getSEOPageNum(addons?.seo_offset, pagenum) : pagenum;
5858

src/frontend/js/addons/singleposts.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,12 @@ export function addSinglePostsAttributes(alm, element) {
177177
}
178178

179179
const { page, addons } = alm;
180+
const { retain_querystring = true } = alm_localize;
181+
const querystring = retain_querystring ? window.location.search : '';
182+
180183
element.setAttribute('class', `alm-single-post post-${addons.single_post_id}`);
181184
element.dataset.id = addons.single_post_id;
182-
element.dataset.url = addons.single_post_permalink;
185+
element.dataset.url = `${addons.single_post_permalink}${querystring}`;
183186
element.dataset.page = addons.single_post_target ? parseInt(page) + 1 : page;
184187
element.dataset.title = addons.single_post_title;
185188
return element;

0 commit comments

Comments
 (0)