wpdatatables_filter_column_js_definition

Contents

Description

This filter is applied to the object that will be later passed to the front-end DataTables library in a JSON format with column properties. You can use it to assign some specific classes, or something else.

Usage

add_filter( 'wpdatatables_filter_column_js_definition', 'filter_column_js_definition', 10, 2 );

Parameters

  • $jsDef object
    Current object with column properties.
  • $columnHeader string
    Original header of a column.

Examples

// Callback function for the wpdatatables_filter_column_js_definition filter hook
function filter_column_js_definition( $jsDef, $columnHeader ) { 
     // Your code
    
}

add_action( 'wpdatatables_filter_column_js_definition', 'filter_column_js_definition', 10, 2 );