function media_page_alter in D7 Media 7.4
Same name and namespace in other branches
- 7 media.module \media_page_alter()
- 7.2 media.module \media_page_alter()
- 7.3 media.module \media_page_alter()
Implements hook_page_alter().
This is used to use our alternate template when ?render=media-popup is passed in the URL.
File
- ./
media.module, line 334 - Media API
Code
function media_page_alter(&$page) {
if (isset($_GET['render']) && $_GET['render'] == 'media-popup') {
$page['#theme'] = 'media_dialog_page';
// Disable administration modules from adding output to the popup.
// @see http://drupal.org/node/914786
module_invoke_all('suppress', TRUE);
foreach (element_children($page) as $key) {
if ($key != 'content') {
unset($page[$key]);
}
}
}
}