Opened 8 years ago
Closed 4 years ago
#38920 closed enhancement (worksforme)
Use REST API for link query in editor
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Editor | Keywords: | |
Focuses: | rest-api | Cc: |
Description
This doesn't necessarily show best practices or whatever, it's just replacing and admin ajax endpoint with a REST API one and not a big change.
Reviewing the implementation of this is a good place to start, e.g. handling date formatting.
Patch still needs date formatting and query other post types.
Attachments (1)
Change History (11)
#2
@
8 years ago
One of the things I run into with this: there seems to be no way to query all post types as once (or a set) like you can do with WP_Query. So you have to start making multiple requests which is a bit insane.
This ticket was mentioned in Slack in #core-restapi by iseulde. View the logs.
8 years ago
#4
@
8 years ago
I'm totally new to the REST API so I may be wrong, but maybe one thing to consider when using the API in core is that it returns by default all the post fields including the content. With very long posts the response could be huge, while here we need just the ID, title, permalink, and date (the "info").
Love this! Thanks @iseuldebot