function drush_theme_enable

8.0.x environment_7.inc drush_theme_enable($themes)
8.0.x environment_6.inc drush_theme_enable($themes)
8.0.x environment.inc drush_theme_enable($themes)
6.x environment_6.inc drush_theme_enable($themes)
6.x environment.inc drush_theme_enable($themes)
6.x environment_7.inc drush_theme_enable($themes)
7.x environment_7.inc drush_theme_enable($themes)
7.x environment_6.inc drush_theme_enable($themes)
7.x environment.inc drush_theme_enable($themes)
3.x environment_7.inc drush_theme_enable($themes)
3.x environment_6.inc drush_theme_enable($themes)
3.x environment_5.inc drush_theme_enable($themes)
4.x environment_6.inc drush_theme_enable($themes)
4.x environment_5.inc drush_theme_enable($themes)
4.x environment.inc drush_theme_enable($themes)
5.x environment_6.inc drush_theme_enable($themes)
5.x environment.inc drush_theme_enable($themes)
master environment_7.inc drush_theme_enable($themes)
master environment.inc drush_theme_enable($themes)

Enable a list of themes.

This function is based on system_themes_form_submit().

Parameters

$themes: Array of theme names.

See also

system_themes_form_submit()

1 call to drush_theme_enable()
drush_pm_enable in commands/pm/pm.drush.inc
Command callback. Enable one or more extensions from downloaded projects. Note that the modules and themes to be enabled were evaluated during the pm-enable validate hook, above.

File

commands/core/drupal/environment_6.inc, line 253
Specific functions for a drupal 6 environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal drush is called from.

Code

function drush_theme_enable($themes) {
  drupal_clear_css_cache();
  foreach ($themes as $theme) {
    system_initialize_theme_blocks($theme);
  }
  db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name IN (" . db_placeholders($themes, 'text') . ")", $themes);
  list_themes(TRUE);
  menu_rebuild();
  module_invoke('locale', 'system_update', $themes);
}