From 699c8bc622d356e440eca5304d77f1a0881e72b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 2 Jun 2026 15:39:00 +0200 Subject: [PATCH 1/2] Fix 'Show more comments' button in comments metabox not working for custom comment types --- src/js/_enqueues/admin/post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index d50fe6007d33b..a0fc3c5ea1bf8 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -41,7 +41,7 @@ window.wp = window.wp || {}; get : function(total, num) { var st = this.st, data; if ( ! num ) - num = 20; + num = 10; this.st += num; this.total = total; @@ -97,7 +97,7 @@ window.wp = window.wp || {}; * @param {number} total Total number of comments to load. */ load: function(total){ - this.st = jQuery('#the-comment-list tr.comment:visible').length; + this.st = jQuery('#the-comment-list tr[id^="comment-"]:visible').length; this.get(total); } }; From fcdecf752c4de3b2a779534bde6eb011a4cfef59 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:45:13 +0300 Subject: [PATCH 2/2] Update the doc block with the fixed default value --- src/js/_enqueues/admin/post.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index a0fc3c5ea1bf8..445e79d8a6f05 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -35,7 +35,7 @@ window.wp = window.wp || {}; * @memberof commentsBox * * @param {number} total Total number of comments for this post. - * @param {number} num Optional. Number of comments to fetch, defaults to 20. + * @param {number} num Optional. Number of comments to fetch, defaults to 10. * @return {boolean} Always returns false. */ get : function(total, num) {