Index: plugin.php
===================================================================
--- plugin.php	(revision 6386)
+++ plugin.php	(working copy)
@@ -28,7 +28,9 @@
 		$author = '<a href="' . trim( $author_uri[1] ) . '" title="'.__( 'Visit author homepage' ).'">' . trim( $author_name[1] ) . '</a>';
 	}
 
-	return array('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version);
+	$plugin_data = apply_filters( 'get_plugin_data', array('Name' => $name, 'Title' => $plugin, 'Description' => $description, 'Author' => $author, 'Version' => $version) );
+
+	return $plugin_data;
 }
 
 function get_plugins() {
@@ -99,10 +101,13 @@
 			wp_redirect(add_query_arg('_error_nonce', wp_create_nonce('plugin-activation-error_' . $plugin), 'plugins.php?error=true&plugin=' . $plugin)); // 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);
+			$can_activate = apply_filters( 'before_activate_' . $plugin, true );
+			if( $can_activate ) {
+				$current[] = $plugin;
+				sort($current);
+				update_option('active_plugins', $current);
+				do_action('activate_' . $plugin);
+			}
 			ob_end_clean();
 		}
 
