wpdatatables_filter_float_cell

Contents

Description

This filter is applied to the value of a float cell before it is passed to the front-end.

Usage

add_filter( 'wpdatatables_filter_float_cell', 'filter_float_cell', 10, 2 );

Parameters

  • $formattedValue float
    Float cell value.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_float_cell filter hook
function filter_float_cell( $formattedValue, $tableId ) { 
    if ($tableId == 14) {
        $formattedValue = str_replace(',','',$formattedValue);
    }
    return $formattedValue;
}

add_action( 'wpdatatables_filter_float_cell', 'filter_float_cell', 10, 2);