/** * Prepare the gadget content before getting template.php so that gadget functions can add css and js to the head * @return null */ static function PrepGadgetContent() { global $page; //not needed for admin pages if ($page->pagetype == 'admin_display') { return; } $gadget_info = gpOutput::WhichGadgets($page->gpLayout); foreach ($gadget_info as $gpOutCmd => $info) { if (!isset(self::$gadget_cache[$gpOutCmd])) { ob_start(); gpOutput::ExecArea($info); self::$gadget_cache[$gpOutCmd] = ob_get_clean(); } } }
/** * Prepare the gadget content before getting template.php so that gadget functions can add css and js to the head * @return null */ function PrepGadgetContent() { global $page, $GP_GADGET_CACHE; $gadget_info = gpOutput::WhichGadgets($page->gpLayout); foreach ($gadget_info as $gpOutCmd => $info) { if (!isset($GP_GADGET_CACHE[$gpOutCmd])) { ob_start(); gpOutput::ExecArea($info); $GP_GADGET_CACHE[$gpOutCmd] = ob_get_clean(); } } }