Opened 2 years ago
Last modified 2 years ago
#17072 new enhancement
Make $wp_query->query read-only
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Query | Version: | |
| Severity: | normal | Keywords: | dev-feedback has-patch |
| Cc: |
Description
WP_Query has two properties that contain query vars:
$wp_query->query is the initial query.
$wp_query->query_vars is the "working copy", with all possible query vars filled.
I propose we prevent modification of $wp_query->query and keep it as a signature of that particular instance.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Note that attempts to modify $wp_query->query will just trigger a notice: