Last active
December 8, 2021 03:23
-
-
Save sc0ttkclark/a378d3f89b92ff0516b1b28080610bb2 to your computer and use it in GitHub Desktop.
Pods Pro - TablePress Integration - Customize column labels
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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