Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #27196, comment 36


Ignore:
Timestamp:
05/19/2018 08:51:11 PM (6 years ago)
Author:
DavidAnderson
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27196, comment 36

    initial v1  
    44<?php
    55add_filter('upgrader_source_selection', 'my_upgrader_source_selection', 10, 4);
    6 function my_upgrader_source_selection($source, $remote_source, $upgrader_object, $hook_extra) {
     6function my_upgrader_source_selection($source, $remote_source, $upgrader_object, $hook_extra = array()) {
    77
    88        if (!is_array($hook_extra) || empty($hook_extra['type']) || 'plugin' !== $hook_extra['type'] || empty($hook_extra['action']) || 'install' !== $hook_extra['action'] || empty($source) || 'updraftplus' !== basename(untrailingslashit($source)) || !class_exists('ReflectionObject')) return $source;