wpdatatables_columns_not_in_source

Contents

Description

This filter is used to add columns that are no longer present in the source data.

Usage

add_filter( 'wpdatatables_columns_not_in_source', 'columns_not_in_source', 10, 4 );

Parameters

  • $columnsNotInSource array
    Array of values.
  • $table object
    WPDataTable object.
  • $tableId integer
    ID of table from database.
  • $columns array
    Array of values.

Examples

// Callback function for the wpdatatables_columns_not_in_source filter hook
function columns_not_in_source( $columnsNotInSource, $table, $tableId, $columns ) { 
      if ( $tableId == 1) { 
         // Your code
      } 
}

add_action( 'wpdatatables_columns_not_in_source', 'columns_not_in_source', 10, 4 );