bag)) { $this->bag = get_option('mc4wp_flash_messages', array()); } } // empty flash bag private function reset() { $this->bag = array(); $this->dirty = true; } /** * Flash a message (shows on next pageload) * * @param $message * @param string $type */ public function flash($message, $type = 'success') { $this->load(); $this->bag[] = array( 'text' => $message, 'type' => $type, ); $this->dirty = true; } /** * Show queued flash messages */ public function show() { $this->load(); foreach ($this->bag as $message) { echo sprintf('
%s