WordPress.org

WordPRess GSoC Trac

Opened 9 months ago

Closed 7 months ago

#311 closed enhancement (fixed)

Support all WP Query parameters for getPosts

Reported by: rmccue Owned by:
Milestone: 2013 Final (1.0) Priority: normal
Component: JSON REST API Keywords:
Cc:

Description

As part of #267, it might be a better idea to support all query parameters rather than only a certain subset of them.

Considerations

Security

There may be security issues that arise as part of passing this data straight in from the submitted data. For example, if plugins are using this data and expect it to only occur in certain contexts.

As a counterpoint, most (all?) items passed into WP Query can be set via the URL usually anyway as part of the normal query system.

This should be researched as to how normal request data is passed in.

Documentation

Allowing data straight through means a huge amount of documentation needed for the API documentation, since WP Query can take a huge number of parameters.

This is a deeper issue than it may seem, since the documentation for all the parameters has to be fairly thorough for compatibility reasons. This is a huge amount of work, even if starting from the Codex documentation.

I think for now, filing under someday maybe. This will be reevaluated moving forward.

Change History (2)

comment:1 rmccue9 months ago

In 2081:

Allow all public query vars to be passed to WP_Query

See #311, #267

comment:2 rmccue7 months ago

  • Milestone set to 2013 Final (1.0)
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.