Ticket #31104: 31104.2.patch
| File 31104.2.patch, 1.1 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/plugin.php
538 538 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 539 539 ob_start(); 540 540 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 ); 544 542 545 543 if ( ! $silent ) { 546 544 /** … … 611 609 } 612 610 613 611 /** 612 * Includes a plugin file 613 * 614 * @param string $plugin Plugin path to main plugin file with plugin data. 615 * @access private 616 */ 617 function _include_plugin_file( $plugin ) { 618 include_once( WP_PLUGIN_DIR . '/' . $plugin ); 619 } 620 621 /** 614 622 * Deactivate a single plugin or multiple plugins. 615 623 * 616 624 * The deactivation hook is disabled by the plugin upgrader by using the $silent