[wp-trac] [WordPress Trac] #39376: Pass WP_REST_Request object to registered callback for a route schema.

WordPress Trac noreply at wordpress.org
Thu Dec 29 16:31:11 UTC 2016


#39376: Pass WP_REST_Request object to registered callback for a route schema.
-------------------------+-----------------------
 Reporter:  nerrad       |       Owner:  jnylen0
     Type:  enhancement  |      Status:  accepted
 Priority:  normal       |   Milestone:  4.7.1
Component:  REST API     |     Version:  4.7
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------

Comment (by nerrad):

 Hi @rachelbaker, sure!  It might help if I link to the slack convo where I
 conversed a bit with James about this.
 https://wordpress.slack.com/archives/core-restapi/p1482439019001505

 If you would like more detail than that I can try to provide.

 Also, I should emphasize, regardless of what happens with this ticket, the
 REST API documentation I linked to in the original post here does need
 fixed.  It's incorrect and is primarily why I started out this ticket as a
 bug (but totally am fine with the change to enhancement).  Specifically in
 the documentation is this function:

 {{{
 function prefix_get_comment_schema( $request ) { ... }
 }}}

 Which is not correct because the callback registered on schema currently
 receives nothing for its argument (unless I'm reading the related code
 wrong :) )

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


More information about the wp-trac mailing list