wpdatatables_cell_output_filter

Contents

Description

This filter is used to modify the final cell output before it is returned.

Usage

add_filter( 'wpdatatables_cell_output_filter', 'cell_output_filter', 10, 7 );

Parameters

  • $cellValueOutput string
    String cell value output.
  • $cellValue mixed
  • $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_output_filter filter hook
function cell_output_filter ($cellValueOutput, $cellValue, $columnKey, $rowID, $columnID, $columnIDValue, $tableID) {
    if ($tableID === 1) { // Replace 1 with your table ID
       //Your code
    }
 
}, 10, 7);

add_filter( 'wpdatatables_cell_output_filter', 'cell_output_filter', 10, 7);