WordPress.org

Make WordPress Core

Ticket #22378: 22378.2.diff

File 22378.2.diff, 575 bytes (added by rmccue, 6 years ago)

More consistent filter name

  • wp-admin/includes/class-wp-upgrader.php

    diff --git wp-admin/includes/class-wp-upgrader.php wp-admin/includes/class-wp-upgrader.php
    index ef8fb5f..f77c645 100644
    class WP_Upgrader { 
    107107
    108108        function download_package($package) {
    109109
     110                $reply = apply_filters('upgrader_pre_download', false, $package, $this);
     111                if ( false !== $reply )
     112                        return $reply;
     113
    110114                if ( ! preg_match('!^(http|https|ftp)://!i', $package) && file_exists($package) ) //Local file or remote?
    111115                        return $package; //must be a local file..
    112116