wpdatatables_filter_init_table_data

Contents

Description

This filter is applied to the table data when trying to generate/validate the WPDataTable configuration.

Usage

add_filter( 'wpdatatables_filter_init_table_data', 'filter_init_table_data', 10, 2 );

Parameters

  • $tableData stdClass
    Class containing the current configured table data, such as its content, type, placeholders, etc.
  • $connection string
    Database connection used to generate the table.

Examples

// Callback function for the wpdatatables_filter_init_table_data filter hook
function filter_init_table_data( $tableData, $connection ) { 
   // Your code
   return $tableData;
}

add_action( 'wpdatatables_filter_init_table_data', 'filter_init_table_data', 10, 2 );