[wp-trac] [WordPress Trac] #60806: Remove query alteration from build_comment_query_vars_from_block
WordPress Trac
noreply at wordpress.org
Fri Mar 22 02:06:00 UTC 2024
#60806: Remove query alteration from build_comment_query_vars_from_block
--------------------------+------------------------------
Reporter: Cybr | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.0
Severity: major | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------------
Comment (by Cybr):
The use of `set_query_var()` should also be reconsidered in
`comments_template()` and `wp_list_comments()`—these functions also adjust
the entire query only to serve their specific needs.
With that, Core would rid itself of such patches.
However, it will become nigh impossible to do so in `comments_template()`
since that will break implementations via filter `comments_template` or
the included custom theme files. `wp_list_comments()` will only set it
after `comments_template()`, because of globals `$overridden_cpage`.
I think maintaining focus on the block issue would be best since all FSE
sites are affected by this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60806#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list