public static function human_time_diff($from, $to = '')
 {
     _deprecated_function(__FUNCTION__, '2.0', 'FrmAppHelper::human_time_diff');
     return FrmAppHelper::human_time_diff($from, $to);
 }
 public static function display_list($message = '', $errors = array())
 {
     global $wpdb, $frm_vars;
     $form = FrmForm::get_current_form();
     $params = FrmForm::get_admin_params($form);
     if ($form) {
         $params['form'] = $form->id;
         $frm_vars['current_form'] = $form;
         if ('trash' == $form->status) {
             $delete_timestamp = time() - DAY_IN_SECONDS * EMPTY_TRASH_DAYS;
             $time_to_delete = FrmAppHelper::human_time_diff($delete_timestamp, isset($form->options['trash_time']) ? $form->options['trash_time'] : time());
             $errors['trash'] = sprintf(__('This form is in the trash and is scheduled to be deleted permanently in %s along with any entries.', 'formidable'), $time_to_delete);
             unset($time_to_delete, $delete_timestamp);
         }
     }
     $table_class = apply_filters('frm_entries_list_class', 'FrmEntriesListHelper');
     $wp_list_table = new $table_class(array('params' => $params));
     $pagenum = $wp_list_table->get_pagenum();
     $wp_list_table->prepare_items();
     $total_pages = $wp_list_table->get_pagination_arg('total_pages');
     if ($pagenum > $total_pages && $total_pages > 0) {
         $url = add_query_arg('paged', $total_pages);
         if (headers_sent()) {
             echo FrmAppHelper::js_redirect($url);
         } else {
             wp_redirect(esc_url_raw($url));
         }
         die;
     }
     if (empty($message) && isset($_GET['import-message'])) {
         $message = __('Your import is complete', 'formidable');
     }
     require FrmAppHelper::plugin_path() . '/classes/views/frm-entries/list.php';
 }
 public static function get_date_display_value($replace_with, $atts)
 {
     $defaults = array('format' => false);
     $atts = wp_parse_args($atts, $defaults);
     if (!isset($atts['time_ago'])) {
         if (strpos($replace_with, ',')) {
             $replace_with = explode(',', $replace_with);
         }
         if (is_array($replace_with)) {
             foreach ($replace_with as $k => $v) {
                 $replace_with[$k] = self::get_date($v, $atts['format']);
             }
         } else {
             $replace_with = self::get_date($replace_with, $atts['format']);
         }
         return $replace_with;
     }
     $replace_with = self::get_date($replace_with, 'Y-m-d H:i:s');
     $replace_with = FrmAppHelper::human_time_diff(strtotime($replace_with), strtotime(date_i18n('Y-m-d')));
     return $replace_with;
 }