[wp-trac] [WordPress Trac] #39092: REST API: Add support for filename search in media endpoint
WordPress Trac
noreply at wordpress.org
Tue Dec 6 03:18:32 UTC 2016
#39092: REST API: Add support for filename search in media endpoint
-------------------------------------------------+-------------------------
Reporter: jblz | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: REST API | Review
Severity: normal | Version: trunk
Keywords: has-patch needs-unit-tests needs- | Resolution:
testing | Focuses: rest-api
-------------------------------------------------+-------------------------
Comment (by jnylen0):
Replying to [comment:4 joemcgill]:
> It looks like by adding the filter to
`WP_REST_Posts_Controller::get_items()`, the extra JOINs would get added
to all search queries and not just attachment search queries.
Yep, we shouldn't do that, see my note above about moving the filter to
`WP_REST_Attachments_Controller`.
@joemcgill in your opinion is this good enough, or should we only search
filenames if `context=edit` (requires authentication)?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39092#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list