mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Docs: Further improve documentation for plugins_api()
.
* Adds a matrix-like data table demonstrating which arguments are available for the different `$action` types * Adjusts the return types to accommodate an `array` for the 'hot_tags' `$action` choice Props ocean90. See #34035. Built from https://develop.svn.wordpress.org/trunk@34641 git-svn-id: http://core.svn.wordpress.org/trunk@34605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b6de1478fd
commit
5b07b691f7
@ -20,6 +20,24 @@
|
||||
*
|
||||
* The second filter, {@see 'plugins_api'}, is the result that would be returned.
|
||||
*
|
||||
* Supported arguments per action:
|
||||
*
|
||||
* | Argument Name | query_plugins | plugin_information | hot_tags | hot_categories |
|
||||
* | -------------------- | :-----------: | :----------------: | :------: | :------------: |
|
||||
* | `$slug` | No | Yes | No | No |
|
||||
* | `$per_page` | Yes | No | No | No |
|
||||
* | `$page` | Yes | No | No | No |
|
||||
* | `$number` | No | No | Yes | Yes |
|
||||
* | `$search` | Yes | No | No | No |
|
||||
* | `$tag` | Yes | No | No | No |
|
||||
* | `$author` | Yes | No | No | No |
|
||||
* | `$user` | Yes | No | No | No |
|
||||
* | `$browse` | Yes | No | No | No |
|
||||
* | `$locale` | Yes | Yes | No | No |
|
||||
* | `$installed_plugins` | Yes | No | No | No |
|
||||
* | `$is_ssl` | Yes | Yes | No | No |
|
||||
* | `$fields` | Yes | Yes | No | No |
|
||||
*
|
||||
* @since 2.7.0
|
||||
*
|
||||
* @param string $action API action to perform: 'query_plugins', 'plugin_information',
|
||||
@ -70,9 +88,9 @@
|
||||
* @type bool $contributors Whether to return the list of contributors. Default false.
|
||||
* }
|
||||
* }
|
||||
* @return object|WP_Error Response object on success, WP_Error on failure. See the
|
||||
* @return object|array|WP_Error Response object or array on success, WP_Error on failure. See the
|
||||
* {@link https://developer.wordpress.org/reference/functions/plugins_api/ function reference article}
|
||||
* for more information on the make-up of possible return objects depending on the value of `$action`.
|
||||
* for more information on the make-up of possible return values depending on the value of `$action`.
|
||||
*/
|
||||
function plugins_api( $action, $args = array() ) {
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34640';
|
||||
$wp_version = '4.4-alpha-34641';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user