upgrader_pre_download

upgrader_pre_download

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

do_action('upgrader_pre_download') is found 1 times:

  • /wp-admin/includes/class-wp-upgrader.php line 320
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    * @param string      $package    The package file name.
     * @param WP_Upgrader $upgrader   The WP_Upgrader instance.
     * @param array       $hook_extra Extra arguments passed to hooked filters.
     */
    $reply = apply_filters( 'upgrader_pre_download', false, $package, $this, $hook_extra );
    if ( false !== $reply ) {
        return $reply;
    }
     
    if ( ! preg_match( '!^(http|https|ftp)://!i', $package ) && file_exists( $package ) ) { // Local file or remote?
        return $package; // Must be a local file.

See this hook used in plugins: