refactor: try to redirect exportpods to export
This commit is contained in:
parent
e5b5ecaae6
commit
e530e6dbc4
@ -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'] ) ) {
|
||||
@ -325,3 +328,4 @@ function playground_handle_exportpods () {
|
||||
echo $download_data;
|
||||
exit;
|
||||
}
|
||||
*/
|
||||
|
@ -162,9 +162,9 @@ class TablePress_ExportPods_View extends TablePress_View {
|
||||
<select id="tables-export-pod-name" name="export[pod_name]">
|
||||
<?php
|
||||
foreach ( $data['pods'] as $pod) {
|
||||
$pod_name = $pod['name];
|
||||
$pod_name = $pod['name'];
|
||||
$selected = selected( $pod_name, $data['pod_name'], false );
|
||||
echo "<option{$selected} value=\"{$pod_name}\"?{$pod_name}</option>";
|
||||
echo "<option{$selected} value=\"{$pod_name}\">{$pod_name}</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user