Make WordPress Core

Changeset 61406


Ignore:
Timestamp:
12/24/2025 05:06:43 PM (8 months ago)
Author:
johnbillion
Message:

Upgrade/Install: Correct and improve various docblocks relating to upgrades.

See #64224

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r61387 r61406  
    293293
    294294        /**
    295          * Downloads a package.
     295         * Downloads a package for a WordPress core, plugin, theme, or translation upgrade.
    296296         *
    297297         * @since 2.8.0
     
    299299         * @since 5.5.0 Added the `$hook_extra` parameter.
    300300         *
    301          * @param string $package          The URI of the package. If this is the full path to an
    302          *                                 existing local file, it will be returned untouched.
     301         * @param string $package          The URI of the package. May be a remote URL or local file path. If this is the full
     302         *                                 path to an existing local file, it will be returned untouched.
    303303         * @param bool   $check_signatures Whether to validate file signatures. Default false.
    304304         * @param array  $hook_extra       Extra arguments to pass to the filter hooks. Default empty array.
     
    307307        public function download_package( $package, $check_signatures = false, $hook_extra = array() ) {
    308308                /**
    309                  * Filters whether to return the package.
     309                 * Filters whether to download a package for a WordPress core, plugin, theme, or translation upgrade.
     310                 *
     311                 * Return a non-false value to short-circuit the download and return that value instead.
    310312                 *
    311313                 * @since 3.7.0
    312314                 * @since 5.5.0 Added the `$hook_extra` parameter.
    313315                 *
    314                  * @param bool        $reply      Whether to bail without returning the package.
    315                  *                                Default false.
    316                  * @param string      $package    The package file name.
    317                  * @param WP_Upgrader $upgrader   The WP_Upgrader instance.
    318                  * @param array       $hook_extra Extra arguments passed to hooked filters.
     316                 * @param false|string|WP_Error $reply      Whether to short-circuit the download, the path to the downloaded package,
     317                 *                                          or a WP_Error object. Default false.
     318                 * @param string                $package    The package URI. May be a remote URL or local file path.
     319                 * @param WP_Upgrader           $upgrader   The WP_Upgrader instance.
     320                 * @param array                 $hook_extra Extra arguments passed to hooked filters.
    319321                 */
    320322                $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
     
    520522                $args = wp_parse_args( $args, $defaults );
    521523
    522                 // These were previously extract()'d.
    523524                $source            = $args['source'];
    524525                $destination       = $args['destination'];
     
    593594                 * @since 4.4.0 The `$hook_extra` parameter became available.
    594595                 *
    595                  * @param string      $source        File source location.
    596                  * @param string      $remote_source Remote file source location.
    597                  * @param WP_Upgrader $upgrader      WP_Upgrader instance.
    598                  * @param array       $hook_extra    Extra arguments passed to hooked filters.
     596                 * @param string|WP_Error $source        File source location or a WP_Error object.
     597                 * @param string          $remote_source Remote file source location.
     598                 * @param WP_Upgrader     $upgrader      WP_Upgrader instance.
     599                 * @param array           $hook_extra    Extra arguments passed to hooked filters.
    599600                 */
    600601                $source = apply_filters( 'upgrader_source_selection', $source, $remote_source, $this, $args['hook_extra'] );
Note: See TracChangeset for help on using the changeset viewer.