Slide 63
Slide 63 text
$ git add -p
diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php
index ef8fb5f..f77c645 100644
--- a/wp-admin/includes/class-wp-upgrader.php
+++ b/wp-admin/includes/class-wp-upgrader.php
@@ -107,6 +107,10 @@ class WP_Upgrader {
function download_package($package) {
+ $reply = apply_filters('upgrader_pre_download', false, $package, $this);
+ 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..
Stage this hunk [y,n,q,a,d,/,e,?]?