wpdatatables_filter_column_before_save

Contents

Description

This filter is applied to the $column object (source/class.wpdatacolumn.php and its children) before it is saved to the database. $tableId is the table identifier from MySQL.

Usage

add_filter( 'wpdatatables_filter_column_before_save', 'filter_column_before_save', 10, 2 );

Parameters

  • $column object
    $column object (source/class.wpdatacolumn.php and its children).
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_column_before_save filter hook
function filter_column_before_save( $column, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_column_before_save', 'filter_column_before_save', 10, 2);