function context_ui_page_alter

cis7 context_ui.module context_ui_page_alter(&$page)
cle7 context_ui.module context_ui_page_alter(&$page)
elmsmedia7 context_ui.module context_ui_page_alter(&$page)
icor7 context_ui.module context_ui_page_alter(&$page)
meedjum_blog7 context_ui.module context_ui_page_alter(&$page)
mooc7 context_ui.module context_ui_page_alter(&$page)

Implementation of hook_page_alter().

If we have the dialog enabled and active build the dialog and add to the page

File

sites/all/modules/ulmus/context/context_ui/context_ui.module, line 341

Code

function context_ui_page_alter(&$page) {
  $contexts = context_active_contexts();
  if (context_ui_dialog_is_enabled() && context_isset('context_ui', 'context_ui_editor_present')) {
    $contexts = context_active_contexts();
    $form = drupal_get_form('context_ui_editor', $contexts);

    $path = drupal_get_path('module', 'context_ui');
    drupal_add_library('system', 'ui.dialog');
    drupal_add_js($path . '/context_ui_dialog.js', array('type' => 'file', 'weight' => 50));
    drupal_add_css($path . '/context_ui_dialog.css');

    //figure out which region to put it in - allow it to be configured for themes using different regions
    $placement = variable_get('context_ui_editor_block_region', 'content');
    $page[$placement]['context_ui_editor'] = array(
      0 => array(
        '#type' => 'markup',
        '#markup' => '<div style="display:none;" id="context_ui_dialog-context-ui">' . drupal_render($form) . '<!--[if IE 8 ]><div id="context_ui_dialog-shadow"></div><![endif]--></div>',
      ),
    );
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.