wpdatatables_cell_filter_row_id

Contents

Description

This filter is used to modify the row ID for a specific cell before it is returned.

Usage

add_filter( 'wpdatatables_cell_filter_row_id', 'cell_filter_row_id', 10, 5 );

Parameters

  • $rowID integer
    ID of the cell row.
  • $columnKey string
    Column name.
  • $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_row_id filter hook
function cell_filter_row_id ($rowID, $columnKey, $columnID, $columnIDValue, $tableID) {
    if ($tableID === 1) { // Replace 1 with your table ID
       //Your code
    }
 
}, 10, 5);

add_filter( 'wpdatatables_cell_filter_row_id', 'cell_filter_row_id', 10, 5);