[wp-trac] [WordPress Trac] #29079: themes_api_result filter should use original arguments
WordPress Trac
noreply at wordpress.org
Thu Jul 31 19:27:47 UTC 2014
#29079: themes_api_result filter should use original arguments
--------------------------+-----------------------------
Reporter: Corphi | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Themes | Version: 3.9.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
The Themes API currently behaves differently whether it was overridden or
it used its native method of querying theme information.
If the API is overridden by a custom implementation, the $args argument to
the filter is - as documented - the original $args object that was passed
to the API.
If the API uses the native method, the $args variable gets overridden by
an array of arguments to a HTTP query. This behavior is neither documented
nor intuitive.
The attached patch separates these two concerns and makes the HTTP query
arguments available as a further parameter to the filter. But to me, they
only seem useful for debugging (where WP_Http seems the right place to
hook into) and should probably be dropped entirely. I created a patch for
this scenario, too.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29079>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list