[wp-trac] [WordPress Trac] #45265: REST API: register_rest_route should warn when used improperly.

WordPress Trac noreply at wordpress.org
Thu Jan 10 20:53:20 UTC 2019


#45265: REST API: register_rest_route should warn when used improperly.
--------------------------------------+------------------------
 Reporter:  kraftbj                   |       Owner:  desrosj
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  5.1
Component:  REST API                  |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch needs-dev-note  |     Focuses:  rest-api
--------------------------------------+------------------------

Comment (by desrosj):

 Sorry for the noise. I forgot to include an added line for the inline
 documentation that specifies the function should not be called before
 `rest_api_init`. This follows a similar pattern on `register_post_type()`
 and `register_taxonomy()`. [attachment:"45265.3.diff"] includes that.

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


More information about the wp-trac mailing list