Exemplo n.º 1
0
 public static function display_forms_list($params = array(), $message = '', $errors = array(), $deprecated_errors = array())
 {
     FrmAppHelper::permission_check('frm_view_forms');
     if (!empty($deprecated_errors)) {
         $errors = $deprecated_errors;
         _deprecated_argument('errors', '2.0.8');
     }
     global $wpdb, $frm_vars;
     if (empty($params)) {
         $params = FrmForm::list_page_params();
     }
     $wp_list_table = new FrmFormsListHelper(compact('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) {
         wp_redirect(esc_url_raw(add_query_arg('paged', $total_pages)));
         die;
     }
     require FrmAppHelper::plugin_path() . '/classes/views/frm-forms/list.php';
 }
 public static function get_params()
 {
     _deprecated_function(__FUNCTION__, '2.0.9', 'FrmForm::list_page_params');
     return FrmForm::list_page_params();
 }