wphooks.info - upgrader_pre_install

upgrader_pre_install

(trunk - 5.1-alpha-44286)

The hook occurs in the following file:

wp-admin/includes/class-wp-upgrader.php:
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
		 *
		 * Returning a truthy value, or one that could be evaluated as a WP_Error
		 * will effectively short-circuit the installation, returning that value
		 * instead.
		 *
		 * @since 2.8.0
		 *
		 * @param bool|WP_Error $response   Response.
		 * @param array         $hook_extra Extra arguments passed to hooked filters.
		 */
		$res = apply_filters( 'upgrader_pre_install', true, $args['hook_extra'] );

		if ( is_wp_error( $res ) ) {
			return $res;
		}

		//Retain the Original source and destinations
		$remote_source     = $args['source'];
		$local_destination = $destination;