wpdatatables_extend_datacolumn_object

Contents

Description

This filter allows developers to extend or modify the column object during its creation process. It can be used to adjust column-specific properties or apply additional configurations to the column object.

Usage

add_filter( 'wpdatatables_extend_datacolumn_object', 'extend_datacolumn_object', 10, 2 );

Parameters

  • $dataColumn object
    The WDTColumn object being processed. This object can be modified to adjust column behavior or properties.
  • $dataColumnProperties array
    An associative array of properties for the column being processed, used to configure the column object.

Examples

// Callback function for the wpdatatables_extend_datacolumn_object filter hook
function extend_datacolumn_object($dataColumn, $dataColumnProperties) {
    // Your code, such as adding a custom value to the column object
    $dataColumn->customProperty = 'Custom Value';

    return $dataColumn;
}

add_filter( 'wpdatatables_extend_datacolumn_object', 'extend_datacolumn_object', 10, 2 );