wpdatatables_cell_filter_query

Contents

Description

This filter is used to modify the custom query before it is executed.

Usage

add_filter( 'wpdatatables_cell_filter_query', 'cell_filter_query', 10, 6 );

Parameters

  • $customQuery string
    Query string.
  • $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_query filter hook
function cell_filter_query ($customQuery, $columnKey, $rowID, $columnID, $columnIDValue, $tableID) {
    if ($tableID === 1) { // Replace 1 with your table ID
       //Your code
    }
 
}, 10, 6);

add_filter( 'wpdatatables_cell_filter_query', 'cell_filter_query', 10, 6);