wpdatatables_cell_data_rows_filter

Contents

Description

This filter is used to modify the data rows before they are returned.

Usage

add_filter( 'wpdatatables_cell_data_rows_filter', 'cell_data_rows_filter', 10, 6 );

Parameters

  • $dataRows array
    Array of values.
  • $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_data_rows_filter filter hook
function cell_data_rows_filter ($dataRows, $columnKey, $rowID, $columnID, $columnIDValue, $tableID) {
    if ($tableID === 1) { // Replace 1 with your table ID
       //Your code
    }
 
}, 10, 6);

add_filter( 'wpdatatables_cell_data_rows_filter', 'cell_data_rows_filter', 10, 6);