wpdatatables_excel_filter_table_template

Contents

Description

This filter is used to modify the table’s HTML wrapper for Excel tables before it is returned. It allows you to customize the final wrapper structure based on specific requirements for Excel output.

Usage

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_filter( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );
add_filter( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );
add_filter( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );

Parameters

  • $returnData string
    String of data.
  • $tableId integer
    ID of table from database.

Examples

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// Callback function for the wpdatatables_excel_filter_table_template hook
function excel_filter_table_template( $returnData, $tableId ) {
if ( $tableId == 1) {
// Your code
}
}
add_action( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );
// Callback function for the wpdatatables_excel_filter_table_template hook function excel_filter_table_template( $returnData, $tableId ) { if ( $tableId == 1) { // Your code } } add_action( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );
// Callback function for the wpdatatables_excel_filter_table_template hook
function excel_filter_table_template( $returnData, $tableId ) {

if ( $tableId == 1) {
// Your code
}

}

add_action( 'wpdatatables_excel_filter_table_template', 'excel_filter_table_template', 10, 2 );