From 89fe0ff804e7c6497ebacc8b341ac89974f6f255 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 21 May 2007 18:37:58 +0000 Subject: WP Merge to rev 5499, this is a big one! Test it before you put it live! Test only, not for production use yet git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@972 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/plugins.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'wp-admin/plugins.php') diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 68e1caf..a4edf30 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -19,11 +19,13 @@ if ( isset($_GET['action']) ) { wp_die(__('Plugin file does not exist.')); if (!in_array($plugin, $current)) { wp_redirect('plugins.php?error=true'); // we'll override this later if the plugin can be included without fatal error + ob_start(); @include(ABSPATH . PLUGINDIR . '/' . $plugin); $current[] = $plugin; sort($current); update_option('active_plugins', $current); do_action('activate_' . $plugin); + ob_end_clean(); } wp_redirect('plugins.php?activate=true'); // overrides the ?error=true one above } else if ('deactivate' == $_GET['action']) { @@ -33,6 +35,17 @@ if ( isset($_GET['action']) ) { update_option('active_plugins', $current); do_action('deactivate_' . trim( $_GET['plugin'] )); wp_redirect('plugins.php?deactivate=true'); + } elseif ($_GET['action'] == 'deactivate-all') { + check_admin_referer('deactivate-all'); + $current = get_option('active_plugins'); + + foreach ($current as $plugin) { + array_splice($current, array_search($plugin, $current), 1); + do_action('deactivate_' . $plugin); + } + + update_option('active_plugins', array()); + wp_redirect('plugins.php?deactivate-all=true'); } exit; } @@ -72,6 +85,8 @@ foreach ($check_plugins as $check_plugin) {

activated.') ?>

deactivated.') ?>

+ +

deactivated.'); ?>

@@ -139,6 +154,11 @@ if (empty($plugins)) { } ?> + +   + + +