[wp-trac] [WordPress Trac] #47779: Add a filter to `get_item_schema()` to be able to extend the schema of existing properties

WordPress Trac noreply at wordpress.org
Mon Oct 7 13:38:26 UTC 2019


#47779: Add a filter to `get_item_schema()` to be able to extend the schema of
existing properties
-------------------------------------------------+-------------------------
 Reporter:  luisherranz                          |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  REST API                             |     Version:  4.7
 Severity:  trivial                              |  Resolution:
 Keywords:  has-patch dev-feedback needs-unit-   |     Focuses:  rest-api
  tests                                          |
-------------------------------------------------+-------------------------
Changes (by luisherranz):

 * Attachment "47779.2.diff" added.

 Emit a _doing_it_wrong warning if user tries to add new properties with
 this filter instead of register_rest_field.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47779>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list