You are here

function magnific_popup_page_alter in Magnific Popup 7

Implements hook_page_alter().

File

./magnific_popup.module, line 112
magnific_popup/magnific_popup.module

Code

function magnific_popup_page_alter(&$page) {

  // Add Magnific Popup library to page.
  drupal_add_library('magnific_popup', 'magnific_popup_formatter', FALSE);

  // Add API-derived extension JavaScript to the page; we do this here instead
  // of another hook to prevent adding JS when it isn't necessary (i.e. when we
  // aren't actually displaying any Magnific Popup content on the page).
  _magnific_popup_add_api_js();
}