wpdatatables_filter_server_side_data

Contents

Description

TThis filter is applied to the JSON object with the data returned for an AJAX request for tables with server-side processing.

Usage

add_filter( 'wpdatatables_filter_server_side_data', 'filter_server_side_data', 10, 3 );

Parameters

  • $json string
    Json string.
  • $tableId integer
    ID of table from database.
  • $_GET array
    $_GET request.

Examples

// Callback function for the wpdatatables_filter_server_side_data filter hook
function filter_server_side_data( $json, $tableId, $_GET ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_server_side_data', 'filter_server_side_data', 10, 3);