You are here

function video_page_alter in Video 7.2

Implements hook_page_alter().

This is used to use our alternate template when ?render=media-popup is passed in the URL.

File

./video.module, line 494
All module hooks implementation can be found in this file.

Code

function video_page_alter(&$page) {
  if (isset($_GET['render']) && $_GET['render'] == 'video-popup') {
    $page['#theme'] = 'video_dialog_page';

    // temporary fix while awaiting fix for 914786
    if (module_exists('admin_menu')) {
      admin_menu_suppress();
    }
    foreach (element_children($page) as $key) {
      if ($key != 'content') {
        unset($page[$key]);
      }
    }
  }
  if (arg(1) == 'embed' && arg(0) == 'video') {
    $page['#theme'] = 'video_dialog_page';

    // temporary fix while awaiting fix for 914786
    if (module_exists('admin_menu')) {
      admin_menu_suppress();
    }
    foreach (element_children($page) as $key) {
      if ($key != 'content') {
        unset($page[$key]);
      }
    }
  }
}