wpdatatables_before_get_table_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_table_metadata', 'get_table_metadata', 10 );

Parameters

  • $tableId integer
    ID of the table

Examples

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

add_action( 'wpdatatables_before_get_table_metadata', 'get_table_metadata', 10 );