[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
Fri Oct 25 07:30:25 UTC 2019
#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 needs-unit- | Focuses: rest-api
tests |
-------------------------------------------------+-------------------------
Comment (by luisherranz):
Awesome :)
Do you have any idea about how to solve the test problem with
`rest_api_init`?
I don't like neither of these solutions:
- Add the filter before `parent::setUp()`.
- Do the `setUp` again in the test.
- Do the `rest_api_init` again in the test.
- Don't do `setUp` at initialization and move it inside each individual
test.
- Create a new file for filters that depend on `rest_api_init`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47779#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list