25 | | * @param string $action |
26 | | * @param array|object $args Optional. Arguments to serialize for the Plugin Info API. |
27 | | * @return object plugins_api response object on success, WP_Error on failure. |
| 25 | * @param string $action API action to perform: 'query_plugins', 'plugin_information', |
| 26 | * 'hot_tags' or 'hot_categories'. |
| 27 | * @param array|object $args { |
| 28 | * Optional. Array or object of arguments to serialize for the Plugin Info API. |
| 29 | * |
| 30 | * @type string $slug The plugin slug. |
| 31 | * @type int $per_page Number of plugins per page. Default 24. |
| 32 | * @type int $number Number of tags or categories to be queried. |
| 33 | * @type string $locale Locale to provide context-sensitive results. Default is the value of get_locale(). |
| 34 | * @type bool $is_ssl Whether links should be returned with https or not. Default false. |
| 35 | * @type array $fields { |
| 36 | * Array of fields which should or should not be returned. |
| 37 | * |
| 38 | * @type bool $short_description Whether to return the plugin short description. Default true. |
| 39 | * @type bool $description Whether to return the plugin full description. Default false. |
| 40 | * @type bool $sections Whether to return the plugin readme sections: description, installation, |
| 41 | * FAQ, screenshots, other notes, and changelog. Default false. |
| 42 | * @type bool $tested Whether to return the 'Compatible up to' value. Default true. |
| 43 | * @type bool $requires Whether to return the required WordPress version. Default true. |
| 44 | * @type bool $rating Whether to return the rating in percent and total number of ratings. |
| 45 | * Default true. |
| 46 | * @type bool $ratings Whether to return the number of rating for each star (1-5). Default true. |
| 47 | * @type bool $downloaded Whether to return the download count. Default true. |
| 48 | * @type bool $downloadlink Whether to return the download link for the package. Default true. |
| 49 | * @type bool $last_updated Whether to return the date of the last update. Default true. |
| 50 | * @type bool $added Whether to return the date when the plugin was added to the wordpress.org |
| 51 | * repository. Default true. |
| 52 | * @type bool $tags Whether to return the assigned tags. Default true. |
| 53 | * @type bool $compatibility Whether to return the WordPress compatibility list. Default true. |
| 54 | * @type bool $homepage Whether to return the plugin homepage link. Default true. |
| 55 | * @type bool $versions Whether to return the list of all available versions. Default false. |
| 56 | * @type bool $donate_link Whether to return the donation link. Default true. |
| 57 | * @type bool $reviews Whether to return the plugin reviews. Default false. |
| 58 | * @type bool $banners Whether to return the banner images links. Default false. |
| 59 | * @type bool $icons Whether to return the icon links. Default false. |
| 60 | * @type bool $active_installs Whether to return the number of active installs. Default false. |
| 61 | * @type bool $group Whether to return the assigned group. Default false. |
| 62 | * @type bool $contributors Whether to return the list of contributors. Default false. |
| 63 | * } |
| 64 | * } |
| 65 | * @return object|WP_Error Response object on success, WP_Error on failure. See the |
| 66 | * {@link https://developer.wordpress.org/reference/functions/plugins_api/ function reference article} |
| 67 | * for more information on the make-up of possible return objects depending on the value of `$action`. |