wpdatatables_before_get_columns_metadata

Contents

Description

This action is executed before the table metadata is fetched from the database (table settings, link to the file, or the SQL query). You can use it to call a function you need or set a global variable.

Usage

add_action( 'wpdatatables_before_get_columns_metadata', 'before_get_columns_metadata' );

Parameters

  • $tableId integer
    ID of the table.

Examples

// Callback function for the wpdatatables_before_get_columns_metadata action hook
function before_get_columns_metadata( $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_before_get_columns_metadata', 'before_get_columns_metadata');