You are here

function browsersync_page_build in Browsersync 7

Implements hook_page_build().

Adds the Browsersync snippet to the bottom of the page.

File

./browsersync.module, line 125
Code for the Browsersync module.

Code

function browsersync_page_build(&$page) {
  if (browsersync_get_setting('enabled', FALSE) && user_access('use browsersync')) {
    $page['page_bottom']['browsersync'] = array(
      '#theme' => 'browsersync_snippet',
      '#host' => browsersync_get_setting('host', ''),
      '#port' => browsersync_get_setting('port', ''),
      '#weight' => 100,
    );
  }
}