wpdatatables_before_create_row

Contents

Description

This action is triggered just before a new row is inserted into the database table. It allows developers you modify or validate the row data, log actions, or perform custom operations before the row is saved.

Usage

add_action('wpdatatables_before_create_row', 'my_before_create_row_handler', 10, 2);

Parameters

  • $tableID (int)
    The ID of the wpDataTable the row is being created in.
  • $rowData (stdClass)
    The array of data to be stored in the new row.

Examples

function my_before_create_row_handler($tableID, $rowData) {
    // Your code here
}
add_action('wpdatatables_before_create_row', 'my_before_create_row_handler', 10, 2);