Add an "Export Pods Table" action to the TablePress menu #6
@ -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.17
|
||||
Version: 0.3.0
|
||||
Author: Glen Whitney
|
||||
Author URI: http://studioinfinity.org/
|
||||
*/
|
||||
@ -170,7 +170,7 @@ function playground_expand_pod( $table, $render_options) {
|
||||
while ($pod->fetch()) {
|
||||
$nrow = array();
|
||||
$nrow[] = $pod->field('id');
|
||||
$nrow[] = $pod->field('post_date');
|
||||
$nrow[] = $pod->display('post_date');
|
||||
$nrow[] = $pod->field('title');
|
||||
$nrow[] = get_the_author_meta('display_name', $pod->field('author'));
|
||||
$nrow[] = $pod->field('permalink');
|
||||
|
@ -174,14 +174,18 @@ class TablePress_ExportPods_View extends TablePress_View {
|
||||
<th class="column-1" scope="row"><label for="tables-export-pod-where"><?php _e( 'Pod "where" clause', 'tablepress'); ?>:</label></th>
|
||||
<td class="column-2">
|
||||
<input id="tables-export-pod-where" name="export[pod_where]" value="" />
|
||||
<span id="tables-export-pod-where-description" class="description hide-if-js"><?php _e( '(Text passed to pod_where() to filter Pod records.)', 'tablepress' ); ?></span>
|
||||
<span id="tables-export-pod-where-description" class="description">
|
||||
<?php _e( '(Optional Pod "where" parameter to filter results.)', 'tablepress' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="column-1" scope="row"><label for="tables-export-pod-dump"><?php _e( 'Dump Pod?', 'tablepress'); ?>:</label></th>
|
||||
<th class="column-1" scope="row"><label for="tables-export-pod-dump"><?php _e( 'Dump Pod?', 'tablepress'); ?></label></th>
|
||||
<td class="column-2">
|
||||
<input type="checkbox" id="tables-export-pod-dump" name="export[pod_dump]" />
|
||||
<span id="tables-export-pod-dump-description" class="description hide-if-js"><?php _e( '(If checked, ignores the table and simply dumps all Pod records.)', 'tablepress' ); ?></span>
|
||||
<span id="tables-export-pod-dump-description" class="description">
|
||||
<?php _e( '(If checked, ignores the table and dumps all Pod fields.)', 'tablepress' ); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
Loading…
Reference in New Issue
Block a user