Skip to content

Instantly share code, notes, and snippets.

@sc0ttkclark
Last active December 8, 2021 03:23
Show Gist options
  • Save sc0ttkclark/a378d3f89b92ff0516b1b28080610bb2 to your computer and use it in GitHub Desktop.
Save sc0ttkclark/a378d3f89b92ff0516b1b28080610bb2 to your computer and use it in GitHub Desktop.
Pods Pro - TablePress Integration - Customize column labels
<?php
/**
* Customize the TablePress columns to use.
*
* @param array $columns The list of columns to be used.
* @param string $pod_name The pod name.
* @param Pods $pod The Pods object.
* @param array $params The Pods::find() parameters to be used.
* @param array $table The TablePress information.
* @param array $render_options The TablePress render options.
*
* @return array The list of columns to be used.
*/
my_custom_pods_pro_tablepress_data_columns( $columns, $pod_name, $pod, $params, $table, $render_options ) {
$columns['my_column'] = 'My custom label';
return $columns;
}
add_filter( 'pods_pro_tablepress_data_columns', 'my_custom_pods_pro_tablepress_data_columns', 10, 6 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment