Docs: Remove unsupported values in `plugins_api()` DocBlocks.

The `group` field and the `hot_categories` action were never actually implemented on the WordPress.org side.

Follow-up to [34596], [meta3227].

Props lopo, milana_cap.
See #55645.
Built from https://develop.svn.wordpress.org/trunk@58873


git-svn-id: http://core.svn.wordpress.org/trunk@58269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2024-08-09 00:18:16 +00:00
parent 32bf860db4
commit ddab80be2c
2 changed files with 19 additions and 21 deletions

View File

@ -20,34 +20,33 @@
* *
* The second filter, {@see 'plugins_api'}, allows a plugin to override the WordPress.org * The second filter, {@see 'plugins_api'}, allows a plugin to override the WordPress.org
* Plugin Installation API entirely. If `$action` is 'query_plugins' or 'plugin_information', * Plugin Installation 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 * an object MUST be passed. If `$action` is 'hot_tags', an array MUST be passed.
* be passed.
* *
* Finally, the third filter, {@see 'plugins_api_result'}, makes it possible to filter the * Finally, the third filter, {@see 'plugins_api_result'}, makes it possible to filter the
* response object or array, depending on the `$action` type. * response object or array, depending on the `$action` type.
* *
* Supported arguments per action: * Supported arguments per action:
* *
* | Argument Name | query_plugins | plugin_information | hot_tags | hot_categories | * | Argument Name | query_plugins | plugin_information | hot_tags |
* | -------------------- | :-----------: | :----------------: | :------: | :------------: | * | -------------------- | :-----------: | :----------------: | :------: |
* | `$slug` | No | Yes | No | No | * | `$slug` | No | Yes | No |
* | `$per_page` | Yes | No | No | No | * | `$per_page` | Yes | No | No |
* | `$page` | Yes | No | No | No | * | `$page` | Yes | No | No |
* | `$number` | No | No | Yes | Yes | * | `$number` | No | No | Yes |
* | `$search` | Yes | No | No | No | * | `$search` | Yes | No | No |
* | `$tag` | Yes | No | No | No | * | `$tag` | Yes | No | No |
* | `$author` | Yes | No | No | No | * | `$author` | Yes | No | No |
* | `$user` | Yes | No | No | No | * | `$user` | Yes | No | No |
* | `$browse` | Yes | No | No | No | * | `$browse` | Yes | No | No |
* | `$locale` | Yes | Yes | No | No | * | `$locale` | Yes | Yes | No |
* | `$installed_plugins` | Yes | No | No | No | * | `$installed_plugins` | Yes | No | No |
* | `$is_ssl` | Yes | Yes | No | No | * | `$is_ssl` | Yes | Yes | No |
* | `$fields` | Yes | Yes | No | No | * | `$fields` | Yes | Yes | No |
* *
* @since 2.7.0 * @since 2.7.0
* *
* @param string $action API action to perform: 'query_plugins', 'plugin_information', * @param string $action API action to perform: 'query_plugins', 'plugin_information',
* 'hot_tags' or 'hot_categories'. * or 'hot_tags'.
* @param array|object $args { * @param array|object $args {
* Optional. Array or object of arguments to serialize for the Plugin Info API. * Optional. Array or object of arguments to serialize for the Plugin Info API.
* *
@ -91,7 +90,6 @@
* @type bool $banners Whether to return the banner images links. Default false. * @type bool $banners Whether to return the banner images links. Default false.
* @type bool $icons Whether to return the icon links. Default false. * @type bool $icons Whether to return the icon links. Default false.
* @type bool $active_installs Whether to return the number of active installations. Default false. * @type bool $active_installs Whether to return the number of active installations. Default false.
* @type bool $group Whether to return the assigned group. Default false.
* @type bool $contributors Whether to return the list of contributors. Default false. * @type bool $contributors Whether to return the list of contributors. Default false.
* } * }
* } * }
@ -136,7 +134,7 @@ function plugins_api( $action, $args = array() ) {
* Returning a non-false value will effectively short-circuit the WordPress.org API request. * Returning a non-false value will effectively short-circuit the WordPress.org API request.
* *
* If `$action` is 'query_plugins' or 'plugin_information', an object MUST be passed. * If `$action` is 'query_plugins' or 'plugin_information', an object MUST be passed.
* If `$action` is 'hot_tags' or 'hot_categories', an array should be passed. * If `$action` is 'hot_tags', an array should be passed.
* *
* @since 2.7.0 * @since 2.7.0
* *

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '6.7-alpha-58872'; $wp_version = '6.7-alpha-58873';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.