' . esc_html($error) . '

'; } } } public static function appendErrorsContent( $content ) { if (!self::$displayed && !empty(self::$current)) { $content = '
' . implode('
', self::$current) . '
' . $content; self::$displayed = true; } return $content; } public static function getSession() { return WaicReq::getVar('sesErrors', 'session'); } public static function clearSession() { WaicReq::clearVar('sesErrors', 'session'); } public static function get( $type = '' ) { $res = array(); if (!empty(self::$errors)) { if (empty($type)) { foreach (self::$errors as $e) { foreach ($e as $error) { $res[] = $error; } } } else { $res = self::$errors[$type]; } } return $res; } public static function haveErrors( $type = '' ) { if (empty($type)) { return self::$haveErrors; } else { return isset(self::$errors[$type]); } } }