Allow filtering of comments number text in Post Comments Link #56405
Labels
[Block] Post Comments Form
Affects the Comments Form Block
[Status] In Progress
Tracking issues with work in progress
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
In its current form, the Post Comments Link block restricts comment link text to values predefined by Gutenberg.
In WordPress core, the similarly used
comments_popup_link()
usesget_comments_number_text()
, which passes the comment link text through thecomments_number
filter, allowing for modification by extenders.My specific example that I'd like to handle is replacing the default:
With a custom:
What is your proposed solution?
It doesn't seem like there is any harm in supporting the existing core functionality here, so I think we can harness
get_comments_number_text()
with the zero/one/more string decisions that have been made in the block.I'll submit a PR that I think handles this.
The text was updated successfully, but these errors were encountered: