wpdatatables_cell_filter_column_key

Contents

Description

This filter is used to modify the column key for a specific cell before it is returned.

Usage

add_filter( 'wpdatatables_cell_filter_column_key', 'cell_filter_column_key', 10, 5 );

Parameters

  • $columnKey string
    Column name.
  • $rowID integer
    ID of the cell row.
  • $columnID integer
    ID of the column.
  • $columnIDValue string
    Column value.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_cell_filter_column_key filter hook
function cell_filter_column_key ($columnKey, $rowID, $columnID, $columnIDValue, $tableID) {
    if ($tableID === 1) { // Replace 1 with your table ID
       //Your code
    }
 
}, 10, 5);

add_filter( 'wpdatatables_cell_filter_column_key', 'cell_filter_column_key', 10, 5);