Make WordPress Core

Ticket #31104: 31104.2.patch

File 31104.2.patch, 1.1 KB (added by DrewAPicture, 11 years ago)

regenerated from root

  • src/wp-admin/includes/plugin.php

     
    538538                        wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), $redirect)); // we'll override this later if the plugin can be included without fatal error
    539539                ob_start();
    540540                wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
    541                 $_wp_plugin_file = $plugin;
    542                 include_once( WP_PLUGIN_DIR . '/' . $plugin );
    543                 $plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
     541                _include_plugin_file( $plugin );
    544542
    545543                if ( ! $silent ) {
    546544                        /**
     
    611609}
    612610
    613611/**
     612 * Includes a plugin file
     613 *
     614 * @param string $plugin Plugin path to main plugin file with plugin data.
     615 * @access private
     616 */
     617function _include_plugin_file( $plugin ) {
     618    include_once( WP_PLUGIN_DIR . '/' . $plugin );
     619}
     620
     621/**
    614622 * Deactivate a single plugin or multiple plugins.
    615623 *
    616624 * The deactivation hook is disabled by the plugin upgrader by using the $silent