wpdatatables_columns_from_arr

Contents

Description

The action is triggered for each column when creating columns from an array. It allows developers to modify or extend the behavior of individual columns as they are generated based on their type and configuration.

Usage

add_action('wpdatatables_columns_from_arr', 'my_custom_column_handler', 10, 4);

Parameters

  • $table object
    The current table instance being processed.
  • $dataColumn WDTColumn
    The column object that was just created.
  • $wdtColumnTypes array
    Array of column types indexed by header keys.
  • $key string
    The column key.

Examples

function my_custom_column_handler($table, $dataColumn, $wdtColumnTypes, $key) {
    // Your code here
}
add_action('wpdatatables_columns_from_arr', 'my_custom_column_handler', 10, 4);