[wp-trac] [WordPress Trac] #33982: WP REST API Stage One: Infrastructure

WordPress Trac noreply at wordpress.org
Wed Oct 7 05:56:28 UTC 2015


#33982: WP REST API Stage One: Infrastructure
----------------------------+--------------------------
 Reporter:  rachelbaker     |       Owner:  rachelbaker
     Type:  task (blessed)  |      Status:  assigned
 Priority:  normal          |   Milestone:  4.4
Component:  REST API        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:
----------------------------+--------------------------

Comment (by rmccue):

 Been working on making sure we have a [https://github.com/WP-API/WP-
 API/issues/1618 smooth transition] on the plugin side, looks like all is
 well there now.

 (Apologies for not having commented here previously, being sick is no
 fun.)

 Replying to [comment:6 rachelbaker]:
 > > * Is it necessary to have the `infrastructure` folder - for vanity and
 semantics' sake, can those files just all live in `rest-api`? or if in a
 folder, can we call it `lib`?
 > I think the idea is to have the `infrastructure` directory and
 eventually an `endpoints` directory.  But I will name the directory
 `microsoft` if it that is your desire.

 I'd like to keep this one as `infrastructure` so that when we eventually
 get to endpoints, the two are separated. If you'd definitely prefer we
 have `lib`, I'd suggest we instead move it all up into `rest-api`,
 otherwise it's a bit redundant.

 ----

 Questions for y'all:

 * We have `rest_is_list`, which tells us whether an array is a numeric
 array (aka list). Along the lines of the previous functions, should we
 turn this into a generic WP function? (Maybe `is_numeric_array` or
 something.)
 * `WP_REST_Server::prepare_response` should be rolled into
 `wp_json_encode` now that we have r34845 (since it's only there to be a
 JsonSerializable shim). Should I do this in the main patch, or a separate
 one?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33982#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list