+function get_messages() {
+ if(!isset($GLOBALS['wfpl_messages'])) {
+ $messages = array();
+ } else {
+ $messages = $GLOBALS['wfpl_messages'];
+ unset($GLOBALS['wfpl_messages']);
+ }
+
+ if(function_exists('session_restore_messages')) {
+ $messages = array_merge(session_restore_messages(), $messages);
+ }
+
+ return $messages;
+}