wpdatatables_filter_rows_metadata

Contents

Description

This filter is used to load the row configuration data directly from the database.

Usage

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

Parameters

  • $rows array
    The array structure of the rows.
  • $tableId integer
    ID of table from database.

Examples

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

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