wpdatatables_filter_column_metadata

Contents

Description

This filter is applied to the column data before it is returned to the front-end.

Usage

add_filter( 'wpdatatables_filter_column_metadata', 'filter_column_metadata', 10, 3 );

Parameters

  • $feColumn stdClass
    Class containing values loaded and decoded from the database column configuration.
  • $dbColumn stdClass
    Class of column configuration values from the database.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_column_metadata filter hook
function filter_column_metadata( $feColumn, $dbColumn, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   }
   return $feColumn;
}

add_action( 'wpdatatables_filter_column_metadata', 'filter_column_metadata', 10, 3 );