[wp-trac] [WordPress Trac] #34219: Move filters out of `rest_api_default_filters()`
WordPress Trac
noreply at wordpress.org
Thu Oct 8 17:16:29 UTC 2015
#34219: Move filters out of `rest_api_default_filters()`
-------------------------+-----------------------
Reporter: swissspidy | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.4
Component: General | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-------------------------+-----------------------
I just noticed the following docblock for `rest_api_default_filters()`:
`@internal This will live in default-filters.php`
I don't know the details, but it looks like this was forgotten during the
merge. The attached patch moves those filters to default-filters.php. In
order to achieve this, `rest_handle_deprecated_function` and
`rest_handle_deprecated_argument` are modified and also made private. It
also introduces a new `_rest_deprecated_trigger_error` function to disable
errors during a REST request.
Note that I combined the two REST API sections in default-filters.php
because (contrary to the inline comments) both are mostly for actions, not
for filters. Having everything in one place makes it easier to find
related hooks.
Another option is to just remove that `@internal` comment and explain why
it is that way.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34219>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list