From e530e6dbc417dd1c3bc0c3a7f73faa6d3cfd3b44 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Mon, 8 Feb 2021 13:34:46 -0800 Subject: [PATCH] refactor: try to redirect exportpods to export --- tablepress-pods.php | 10 +++++++--- view-exportpods.php | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tablepress-pods.php b/tablepress-pods.php index b15bb6d..74828fc 100644 --- a/tablepress-pods.php +++ b/tablepress-pods.php @@ -3,7 +3,7 @@ Plugin Name: TablePress Extension: Pods tables Plugin URI: https://code.studioinfinity.org/glen/tablepress-pods Description: Custom Extension for TablePress to incorporate Pods information in tables -Version: 0.2.10 +Version: 0.2.11 Author: Glen Whitney Author URI: http://studioinfinity.org/ */ @@ -189,7 +189,7 @@ function playground_expand_pod( $table, $render_options) { } function playground_handle_exportpods () { - TablePress::check_nonce( 'export' ); + TablePress::check_nonce( 'exportpods' ); if ( ! current_user_can( 'tablepress_export_tables' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.', 'default' ), 403 ); @@ -201,6 +201,9 @@ function playground_handle_exportpods () { $export = wp_unslash( $_POST['export'] ); } + TablePress::redirect( array( 'action' => 'export', 'export' => $export ), true ); +} +/* $exporter = TablePress::load_class( 'TablePress_Export', 'class-export.php', 'classes' ); if ( empty( $export['tables'] ) ) { @@ -324,4 +327,5 @@ function playground_handle_exportpods () { flush(); echo $download_data; exit; -} + } +*/ diff --git a/view-exportpods.php b/view-exportpods.php index 5765d2e..19dd267 100644 --- a/view-exportpods.php +++ b/view-exportpods.php @@ -162,9 +162,9 @@ class TablePress_ExportPods_View extends TablePress_View {