From 4a73e0551f603118363946dbdae05a3cf19b8527 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Mon, 8 Feb 2021 16:30:57 -0800 Subject: [PATCH] feat: add pod_where and pod_dump options --- tablepress-pods.php | 9 +++++++-- view-exportpods.php | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/tablepress-pods.php b/tablepress-pods.php index aa4c820..77f3190 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.16 +Version: 0.2.17 Author: Glen Whitney Author URI: http://studioinfinity.org/ */ @@ -204,7 +204,12 @@ function playground_handle_exportpods () { $_REQUEST['_wpnonce'] = wp_create_nonce( TablePress::nonce( 'export' ) ); /* Set up the filter using the pod params */ - $r_opts = array('pod_name' => $export['pod_name']); + $r_opts = array('pod_name' => $export['pod_name'], + 'pod_where' => $export['pod_where'] + ); + if ( isset( $export['pod_dump'] ) ) { + $r_opts['pod_dump'] = true; + } $filter = function( $data, $tab, $fmt, $delim ) use ($r_opts) { $newtab = playground_expand_pod($tab, $r_opts); $exporter = TablePress::load_class( 'TablePress_Export', 'class-export.php', 'classes' ); diff --git a/view-exportpods.php b/view-exportpods.php index 19dd267..0282f19 100644 --- a/view-exportpods.php +++ b/view-exportpods.php @@ -170,6 +170,20 @@ class TablePress_ExportPods_View extends TablePress_View { + + + + + + + + + + + + + +