Make WordPress Core

Opened 8 years ago

Closed 4 years ago

#38920 closed enhancement (worksforme)

Use REST API for link query in editor

Reported by: iseulde's profile iseulde 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)

38920.patch (2.3 KB) - added by iseuldebot 8 years ago.

Download all attachments as: .zip

Change History (11)

@iseuldebot
8 years ago

#1 @rachelbaker
8 years ago

Love this! Thanks @iseuldebot

#2 @iseulde
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 @afercia
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").

This ticket was mentioned in Slack in #accessibility by afercia. View the logs.


8 years ago

#6 @afercia
8 years ago

Re: date formatting see #39222 and #38342.

#7 @afercia
8 years ago

  • Focuses rest-api added

This ticket was mentioned in Slack in #core-js by afercia. View the logs.


8 years ago

This ticket was mentioned in Slack in #core by afercia. View the logs.


8 years ago

#10 @TimothyBlynJacobs
4 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

We have the search endpoints now, so I don't think this is necessary any longer.

Note: See TracTickets for help on using tickets.