Ticket #22378: 22378.3.diff
File 22378.3.diff, 888 bytes (added by , 11 years ago) |
---|
-
src/wp-admin/includes/class-wp-upgrader.php
108 108 109 109 function download_package($package) { 110 110 111 /** 112 * Filter whether to return the package. 113 * 114 * @since 3.7.0 115 * 116 * @param bool $reply Whether to bail without returning the package. Default is false. 117 * @param string $package The package file name. 118 * @param object $this The WP_Upgrader instance. 119 */ 120 $reply = apply_filters( 'upgrader_pre_download', false, $package, $this ); 121 if ( false !== $reply ) 122 return $reply; 123 111 124 if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote? 112 125 return $package; //must be a local file.. 113 126