You are here

function live_css_init in Live CSS 6

Same name and namespace in other branches
  1. 6.2 live_css.module \live_css_init()
  2. 7.2 live_css.module \live_css_init()
  3. 7 live_css.module \live_css_init()

Implements hook_init().

File

./live_css.module, line 28

Code

function live_css_init() {

  //check permissions
  if (user_access('edit css')) {
    drupal_add_link(array(
      'id' => 'bespin_base',
      'href' => '/' . drupal_get_path('module', 'live_css') . '/bespin/prebuilt/',
      'rel' => '',
    ));
    drupal_add_css(drupal_get_path('module', 'live_css') . '/bespin/prebuilt/BespinEmbedded.css', 'module', 'all', FALSE);
    drupal_add_js(drupal_get_path('module', 'live_css') . '/bespin/prebuilt/BespinEmbedded.js');
    drupal_add_js(drupal_get_path('module', 'live_css') . '/plugins.js');

    //load the list of stylesheets
    drupal_add_css(drupal_get_path('module', 'live_css') . '/css.css', 'module', 'all', FALSE);
    drupal_add_js(drupal_get_path('module', 'live_css') . '/css.js?1');
  }
}