[wp-trac] [WordPress Trac] #50204: wp_query_reset seems to reset the loop and not the query
WordPress Trac
noreply at wordpress.org
Mon May 18 22:48:16 UTC 2020
#50204: wp_query_reset seems to reset the loop and not the query
--------------------------+-------------------------------------
Reporter: elieobeid7 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: docs, coding-standards
--------------------------+-------------------------------------
Comment (by apedog):
Perhaps you're looking for this function - {{{wp_reset_postdata()}}}?
https://developer.wordpress.org/reference/functions/wp_reset_postdata/
You're actually asking for a widely-used function to be renamed because
the naming convention is bad?
WordPress is a patchwork. Its full of inconsistently named APIs and
functions, and mismatched function signatures etc.
The trade-off is that backward-compatibility is assured.
Changing the naming convention will break backward-compatibility.
But you already knew that:
> you're going to defend your naming conventions and design conventions
I'm guessing you're right - no one is going to fix this "bug". The
WordPress design philosophy (AFAIK) is that backward-compatibility trumps
good naming conventions.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50204#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list