Index: trunk/wp-includes/theme.php
===================================================================
--- trunk/wp-includes/theme.php	(revision 15618)
+++ trunk/wp-includes/theme.php	(working copy)
@@ -1227,6 +1227,8 @@
  * Will switch theme to the fallback theme if current theme does not validate.
  * You can use the 'validate_current_theme' filter to return FALSE to
  * disable this functionality.
+ * You can use the 'validate_current_theme_requirements' to return WP_Error object
+ * if some prerequisite for the theme has not been met
  *
  * @since 1.5.0
  * @see WP_DEFAULT_THEME
@@ -1240,14 +1242,20 @@
 
 	if ( get_template() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/index.php') ) {
 		switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
-		return false;
+		return new WP_Error('cannot-activate_theme', __('The active theme is broken.  Reverting to the default theme.'));
 	}
 
 	if ( get_stylesheet() != WP_DEFAULT_THEME && !file_exists(get_template_directory() . '/style.css') ) {
 		switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME );
-		return false;
+		return new WP_Error('cannot-activate_theme', __('The active theme is broken.  Reverting to the default theme.'));
 	}
-
+	// add hook so that a theme can validate itself for prerequisites (php5, classes, plugins, etc.)
+	// Should return true if OK, or object of WP_Error if not with error
+	$result = apply_filters('validate_current_theme_requirements', true);
+	if( is_wp_error( $result ) ){
+		switch_theme( WP_DEFAULT_THEME, WP_DEFAULT_THEME);
+		return $result;
+	}
 	return true;
 }
 
Index: trunk/wp-admin/themes.php
===================================================================
--- trunk/wp-admin/themes.php	(revision 15618)
+++ trunk/wp-admin/themes.php	(working copy)
@@ -56,8 +56,8 @@
 }
 ?>
 
-<?php if ( ! validate_current_theme() ) : ?>
-<div id="message1" class="updated"><p><?php _e('The active theme is broken.  Reverting to the default theme.'); ?></p></div>
+<?php $result = validate_current_theme(); if( is_wp_error($result) ) : ?>
+<div id="message1" class="updated"><p><?php echo $result->get_error_message(); ?></p></div>
 <?php elseif ( isset($_GET['activated']) ) :
 		if ( isset($wp_registered_sidebars) && count( (array) $wp_registered_sidebars ) && current_user_can('edit_theme_options') ) { ?>
 <div id="message2" class="updated"><p><?php printf( __('New theme activated. This theme supports widgets, please visit the <a href="%s">widgets settings</a> screen to configure them.'), admin_url( 'widgets.php' ) ); ?></p></div><?php
