Avoid stomping of the $plugin variable in activate_plugin().
fixes #28102. Built from https://develop.svn.wordpress.org/trunk@28644 git-svn-id: http://core.svn.wordpress.org/trunk@28462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
66bfea485a
commit
ee9d9133ac
|
@ -538,7 +538,9 @@ function activate_plugin( $plugin, $redirect = '', $network_wide = false, $silen
|
|||
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
|
||||
ob_start();
|
||||
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
$_wp_plugin_file = $plugin;
|
||||
include_once( WP_PLUGIN_DIR . '/' . $plugin );
|
||||
$plugin = $_wp_plugin_file; // Avoid stomping of the $plugin variable in a plugin.
|
||||
|
||||
if ( ! $silent ) {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue