\OgreAlert\Settings::get('message_text_color'), 'background_color' => \OgreAlert\Settings::get('message_background_color'), 'transition_duration' => intval(\OgreAlert\Settings::get('message_transition_duration')), 'transition_animation' => \OgreAlert\Settings::get('message_transition_animation'), )); } static function display_alerts() { if (!\OgreAlert\Alert::has_active()) return; self::load_template('loop-start'); foreach (\OgreAlert\Alert::get_active() as $id) { self::load_template('alert', \OgreAlert\Priority::get($id), true, array('id' => $id)); } self::load_template('loop-end'); } private static function load_template($filename, $filepart = '', $echo = true, $vars = array()) { $path = \OgreAlert\Settings::get('path') . 'templates/' . $filename . '-' . $filepart . '.php'; if (!file_exists($path)) { $path = \OgreAlert\Settings::get('path') . 'templates/' . $filename . '.php'; if (!file_exists($path)) { if ($echo) { echo ''; return false; } else { return ''; } } } ob_start(); extract($vars); include($path); $html = ob_get_contents(); ob_end_clean(); if ($echo) { echo $html; return true; } else { return $html; } } } \OgreAlert\Display::load();