function contextual_page_build

Implements hook_page_build().

Adds the drupal.contextual-links library to the page for any user who has the 'access contextual links' permission.

See also

contextual_preprocess()

File

drupal/core/modules/contextual/contextual.module, line 63
Adds contextual links to perform actions related to elements on a page.

Code

function contextual_page_build(&$page) {
  if (!user_access('access contextual links')) {
    return;
  }
  $page['#attached']['library'][] = array(
    'contextual',
    'drupal.contextual-links',
  );
}