[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
Tue Feb 11 16:06:46 UTC 2020


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

Comment (by TimothyBlynJacobs):

 Added a test for the doing it wrong. We also don't need the
 `remove_filters` call since all hooks added in a test will be removed by
 `_restore_hooks` in the tear down.

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


More information about the wp-trac mailing list