You are here

function mmenu_effect_list in Mobile sliding menu 7.2

Same name and namespace in other branches
  1. 8 mmenu.module \mmenu_effect_list()
  2. 7 mmenu.module \mmenu_effect_list()

Gets a list of available mmenu effects.

Parameters

string $effect_name: A effect name if you just want to get a particular mmenu effect. Leaves empty if you want to get all available mmenu effects.

Return value

array Particular mmenu effect if the 'effect_name' is given. All available mmenu effects otherwise.

2 calls to mmenu_effect_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 539
Primarily Drupal hooks and global API functions to manipulate mmenus.

Code

function mmenu_effect_list($effect_name = '') {

  // Get mmenu effects from hook.
  $effects = module_invoke_all('mmenu_effect');

  // Invoke hook_mmenu_effect_alter().
  // To allow all modules to alter the mmenu effect.
  drupal_alter('mmenu_effect', $effects);
  if (!empty($effect_name)) {
    if (isset($effects[$effect_name])) {
      return $effects[$effect_name];
    }
    else {
      return array();
    }
  }
  return $effects;
}