Docs: Clarify the expected replacement element type if replacing the object or array in `plugins_api()` via the `plugins_api` hook.

If the `$action` type is 'query_plugins' or 'plugin_information', the API will return an object, thus an object should be passed if replacing it. For 'hot_tags' and 'hot_categories', the same logic applies, but with arrays instead.

See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34763 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes 2015-10-02 04:47:14 +00:00
parent a31e54344c
commit 4c6d50413b
1 changed files with 2 additions and 2 deletions

View File

@ -19,8 +19,8 @@
* an object is returned.
*
* The second filter, {@see 'plugins_api'}, allows a plugin to override the WordPress.org
* Plugin Install API entirely. If `$action` is 'query_plugins', 'plugin_information', or
* 'hot_categories', an object MUST be passed. If `$action` is 'hot_tags`, an array should
* Plugin Install API entirely. If `$action` is 'query_plugins' or 'plugin_information',
* an object MUST be passed. If `$action` is 'hot_tags` or 'hot_categories', an array MUST
* be passed.
*
* Finally, the third filter, {@see 'plugins_api_result'}, makes it possible to filter the