You are here

function mobile_switch_get_themes in Mobile Switch 6

Same name and namespace in other branches
  1. 7.2 mobile_switch.module \mobile_switch_get_themes()
  2. 7 mobile_switch.module \mobile_switch_get_themes()

Helper function to determine the active themes.

See also

mobile_switch_settings_form()

mobile_switch.admin.inc

2 calls to mobile_switch_get_themes()
mobile_switch_form_alter in ./mobile_switch.module
Implementation of hook_form_alter().
mobile_switch_settings_form in includes/mobile_switch.admin.inc
Form constructor for the Basic settings form.

File

./mobile_switch.module, line 287
Simple theme switch for mobile devices, detected by browscap.

Code

function mobile_switch_get_themes() {
  $themes = array();
  foreach (list_themes() as $name => $value) {
    if ($value->status == 0) {
      continue;
    }
    $themes[$name] = preg_replace('/_/', ' ', ucfirst($value->name));
  }
  return $themes;
}