Exemplo n.º 1
0
 /**
  * Before there is any output, add tabs and handle any posted options.
  *
  * @since 1.0.0
  */
 public function page_loaded()
 {
     $this->is_current_page = true;
     if (is_null($this->notices)) {
         $this->add_notices();
     }
     foreach ($this->notices as $notice) {
         $notice->process_dismissal();
     }
     if ($this->process_tabs()) {
         return;
     }
     if (!empty($_POST['error_alert'])) {
         if (!empty($_POST['delete_errors'])) {
             Prompt_Logging::delete_log();
         } else {
             update_user_meta(get_current_user_id(), self::DISMISS_ERRORS_META_KEY, time());
         }
         if (!empty($_POST['submit_errors'])) {
             $this->submit_errors();
             return;
         }
     }
     $this->form_handler();
     $this->reset_key();
 }