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_submit().

Parameters

$themes: Array of theme names.

See also

system_themes_submit()

1 call to drush_theme_enable()
drush_pm_enable in commands/pm/pm.drush.inc
Command callback. Enable one or more projects.

File

commands/core/drupal/environment_5.inc, line 173
Specific functions for a drupal 5 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) {
  foreach ($themes as $theme) {
    system_initialize_theme_blocks($theme);
  }
  $placeholder = implode(',', array_fill(0, count($themes), "'%s'"));
  db_query("UPDATE {system} SET status = 1 WHERE type = 'theme' AND name IN (" . $placeholder . ")", $themes);
  menu_rebuild();
}