WordPress.org

Make WordPress Core

Ticket #34035: 34035.2.patch

File 34035.2.patch, 3.3 KB (added by ocean90, 4 years ago)
  • src/wp-admin/includes/plugin-install.php

     
    2222 *
    2323 * @since 2.7.0
    2424 *
    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 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 slug of a plugin.
     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 get_locale().
     34 *     @type bool    $is_ssl   Whether  links should be returned with http or https. Default false.
     35 *     @type array   $fields   {
     36 *         Array of fields which should or should not be returned.
     37 *
     38 *         @type bool $short_description Short description. Default true.
     39 *         @type bool $description       Full description. Default false.
     40 *         @type bool $sections          Readme sections: description, installation, faq,
     41 *                                       screenshots, other notes, and changelog. Default false.
     42 *         @type bool $tested            Compatible up to value. Default true.
     43 *         @type bool $requires          Required WordPress version. Default true.
     44 *         @type bool $rating            Rating in percent and total number of ratings. Default true.
     45 *         @type bool $ratings           Rating for each star (1-5). Default true.
     46 *         @type bool $downloaded        Download count. Default true.
     47 *         @type bool $downloadlink      Download link for the package. Default true.
     48 *         @type bool $last_updated      Date of the last update. Default true.
     49 *         @type bool $added             Date when plugin was added to the wordpress.org repo. Default true.
     50 *         @type bool $tags              Assigned tags. Default true.
     51 *         @type bool $compatibility     WordPress compatibility list. Default true.
     52 *         @type bool $homepage          Link to plugin homepage. Default true.
     53 *         @type bool $versions          List of all versions. Default false.
     54 *         @type bool $donate_link       Donation link. Default true.
     55 *         @type bool $reviews           Plugin reviews. Default false.
     56 *         @type bool $banners           Links to banner images. Default false.
     57 *         @type bool $icons             Links to icons. Default false.
     58 *         @type bool $active_installs   Number of active installs. Default false.
     59 *         @type bool $group             Assigned group. Default false.
     60 *         @type bool $contributors      List of contributors. Default false.
     61 *     }
     62 * }
     63 * @return object|WP_Error Response object on success, WP_Error on failure.
    2864 */
    29 function plugins_api($action, $args = null) {
     65function plugins_api( $action, $args = array() ) {
    3066
    3167        if ( is_array( $args ) ) {
    3268                $args = (object) $args;