wpdatatables_filter_update_column_array

Contents

Description

This filter is applied to the array which is inserted in the database (by $wpdb->update()) when the columns are first generated and saved for a new table.

Usage

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
add_filter( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2 );
add_filter( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2 );
add_filter( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2 );

Parameters

  • $columnConfig array
    Array of values.
  • $tableId integer
    ID of table from database.

Examples

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
// Callback function for the wpdatatables_filter_update_column_array filter hook
function filter_update_column_array( $columnConfig, $tableId ) {
// Check for specific table Id
if ( $tableId == 1) {
// Your code
}
}
add_action( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2);
// Callback function for the wpdatatables_filter_update_column_array filter hook function filter_update_column_array( $columnConfig, $tableId ) { // Check for specific table Id if ( $tableId == 1) { // Your code } } add_action( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2);
// Callback function for the wpdatatables_filter_update_column_array filter hook
function filter_update_column_array( $columnConfig, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_update_column_array', 'filter_update_column_array', 10, 2);