Skip to content
This repository has been archived by the owner on Oct 12, 2024. It is now read-only.

REST API Support: Endpoints for Schema, Expose Fields to REST #39

Closed
1 of 2 tasks
Mte90 opened this issue Dec 15, 2015 · 6 comments
Closed
1 of 2 tasks

REST API Support: Endpoints for Schema, Expose Fields to REST #39

Mte90 opened this issue Dec 15, 2015 · 6 comments
Labels
archived Issues from an archived version of the Fields API enhancement help wanted

Comments

@Mte90
Copy link

Mte90 commented Dec 15, 2015

Are there any plans for the rest API support?

  • Create/Extend REST API Endpoints for Schema
  • Expose Fields to REST (register_rest_field)
@sc0ttkclark
Copy link
Owner

Yes, we need help working on extending the REST API endpoints that expose the fields available for a post type, user, etc

@sc0ttkclark sc0ttkclark changed the title Support for Rest API REST API Endpoints for Schema Dec 15, 2015
@sc0ttkclark sc0ttkclark changed the title REST API Endpoints for Schema REST API Support: Endpoints for Schema, Expose Fields to REST Dec 15, 2015
@sc0ttkclark sc0ttkclark modified the milestones: Core Proposal, Fields API 0.1 Dec 15, 2015
@danielbachhuber
Copy link

@sc0ttkclark
Copy link
Owner

@danielbachhuber when using register_rest_field, should we register all fields or should we make that opt-in. The default is no get/update/schema callback right now.

c394e4f

@danielbachhuber
Copy link

should we register all fields or should we make that opt-in.

Good question. I'd imagine we'd want it to be opt-in, but that's not a strong opinion.

@lucyllewy
Copy link

I think if no preference is specified when a field is created then it should be exposed by default. That way if the developer who creates a new field is lazy she'll get out-of-the-box functionality via REST. The developer should be able, however, to choose to opt-out of REST support if they're going to implement their own interface.

@sc0ttkclark
Copy link
Owner

We're now somewhat mirroring some of the stuff from https://core.trac.wordpress.org/ticket/35658 and only using register_rest_field if show_in_rest is set.

@sc0ttkclark sc0ttkclark added the archived Issues from an archived version of the Fields API label Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Issues from an archived version of the Fields API enhancement help wanted
Projects
None yet
Development

No branches or pull requests

4 participants