Exclude unsupported params in all controllers (extends #2770)#2804
Conversation
|
@rachelbaker This now includes almost all properties across all controllers. The duplication is evident as discussed in #2770 but I think I'm more in favor of duplication now and a mindful abstraction later, than prematurely introducing an insufficient abstraction now. |
|
Open questions:
These questions determine whether post types & revisions need similar treatment |
| // values are accepted as-passed, and their internal WP_Query parameter | ||
| // name equivalents (some are the same). Only values which are also | ||
| // present in $registered will be set. | ||
| $parameter_mappings = array( |
There was a problem hiding this comment.
What do you think about including this parameter mapping in the collection param definition itself?
There was a problem hiding this comment.
Do you mean in the schema? Certainly not opposed, but I guess I'm not sure how that would look, given what's there now.
|
I think it's ok for this to stay where it is in get_items rather than moving to get_collection params, this is a procedural / controller thing, and |
I don't think so no.
Like #2770 I don't think we need to solve context |
…broadly Exclude unsupported params more broadly (was #2804)
This is a PR against #2770, not
develop, and extends the approach taken there to apply to all other controllers in which get_items assigns query properties from requests.