public static function get_current_form($form_id = 0) { _deprecated_function(__FUNCTION__, '2.0.9', 'FrmForm::get_current_form'); return FrmForm::get_current_form($form_id); }
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'; }