Make WordPress Core

Ticket #22802: make-plugins-symlinkable.diff

File make-plugins-symlinkable.diff, 1.3 KB (added by MikeSchinkel, 11 years ago)

Make Plugins Symlinkable.

  • wp-admin/includes/plugin.php

     
    859859                update_option('uninstall_plugins', $uninstallable_plugins);
    860860                unset($uninstallable_plugins);
    861861
    862                 include WP_PLUGIN_DIR . '/' . $file;
     862    global $uninstall_plugin_file;
     863    $uninstall_plugin_file = WP_PLUGIN_DIR . '/' . $file;
     864    include( $uninstall_plugin_file );
     865    unset( $uninstall_plugin_file );
    863866
    864867                add_action( 'uninstall_' . $file, $callable );
    865868                do_action( 'uninstall_' . $file );
  • wp-admin/plugins.php

     
    144144                        @ini_set('display_errors', true); //Ensure that Fatal errors are displayed.
    145145                        // Go back to "sandbox" scope so we get the same errors as before
    146146                        function plugin_sandbox_scrape( $plugin ) {
    147                                 include( WP_PLUGIN_DIR . '/' . $plugin );
     147        global $activate_plugin_file;
     148        $activate_plugin_file = WP_PLUGIN_DIR . '/' . $plugin;
     149                                include( $activate_plugin_file );
     150                                unset( $activate_plugin_file );
    148151                        }
    149152                        plugin_sandbox_scrape( $plugin );
    150153                        do_action('activate_' . $plugin);