You are here

function simplemenu_init in SimpleMenu 6

Same name and namespace in other branches
  1. 6.2 simplemenu.module \simplemenu_init()
  2. 7 simplemenu.module \simplemenu_init()

Implementation of hook_init().

File

./simplemenu.module, line 50
Creates a simplemenu.

Code

function simplemenu_init() {

  // do a simple access check here, since theme isn't available to check yet
  if (simplemenu_enabled()) {

    // we first run add menu because it could be completely empty in which
    // case we want to avoid sending any output
    if (_simplemenu_add_menu()) {
      _simplemenu_add_css();

      // basic CSS must be before _simplemenu_add_theme()
      _simplemenu_add_theme();
      _simplemenu_add_js();
    }
  }
}