function mmenu_theme_list in Mobile sliding menu 7.2
Same name and namespace in other branches
- 8 mmenu.module \mmenu_theme_list()
Gets a list of available mmenu themes.
Parameters
string $theme_name: A class name if you just want to get a particular mmenu theme. Leaves empty if you want to get all available mmenu themes.
Return value
array Particular mmenu theme if the 'theme_name' is given. All available mmenu themes otherwise.
2 calls to mmenu_theme_list()
- mmenu_add_css in ./
mmenu.module - Generates the mmenu css list and adds to Drupal.
- mmenu_admin_settings_form in ./
mmenu.admin.inc - Form constructor for the Mmenu settings form.
File
- ./
mmenu.module, line 509 - Primarily Drupal hooks and global API functions to manipulate mmenus.
Code
function mmenu_theme_list($theme_name = '') {
// Get mmenu themes from hook.
$themes = module_invoke_all('mmenu_theme');
// Invoke hook_mmenu_theme_alter().
// To allow all modules to alter the mmenu themes.
drupal_alter('mmenu_theme', $themes);
if (!empty($theme_name)) {
if (isset($themes[$theme_name])) {
return $themes[$theme_name];
}
else {
return array();
}
}
return $themes;
}