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.5.2

do_action('upgrader_pre_download') is found 1 times:

  • /wp-admin/includes/class-wp-upgrader.php line 318
    		 * @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: