wpdatatables_filter_column_options

Contents

Description

This filter is applied to the column options when a table is loaded.

Usage

add_filter( 'wpdatatables_filter_column_options', 'filter_column_options', 10, 3 );

Parameters

  • $columnOptions arrray
    This array contains all the current options for the columns, like order, data types, filtering types and options, link options, and more. You can modify these options based on your requirements.
  • $columnData object
    The object contains options for each column separately.
  • $tbl class WPDataTable
    The constructed WPDataTable class with all table-related options.

Examples

// Callback function for the wpdatatables_filter_column_options filter hook
function filter_column_options($columnOptions, $columnData, $tbl) {
    // Your code
}

add_filter( 'wpdatatables_filter_column_options', 'filter_column_options', 10, 3);