wpdatatables_filter_nested_json_final_array

Contents

Description

This filter is used to retrieve and modify the final array of data from a nested JSON response, allowing customization of how the data is processed based on the chosen root.

Usage

add_filter( 'wpdatatables_filter_nested_json_final_array', 'filter_nested_json_final_array', 10, 3 );

Parameters

  • $data array
    Array of values.
  • $filteredDataByChosenRoot array
    Array of values.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_nested_json_final_array filter hook
function filter_nested_json_final_array( $data, $filteredDataByChosenRoot, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_nested_json_final_array', 'filter_nested_json_final_array', 10, 3);