wpdatatables_before_generate_wp_based_query

Contents

Description

This filter is used to modify the table data before generating the WordPress-based query, enabling you to manipulate or further sanitize the query data before it is passed to the WP query constructor.

Usage

add_filter( 'wpdatatables_before_generate_wp_based_query', 'modify_table_data_before_wp_query', 10, 1 );

Parameters

  • $tableData array
    The sanitized table data array, containing connection details and other parameters for the query.

Examples

// Callback function for the wpdatatables_before_generate_wp_based_query filter hook
function modify_table_data_before_wp_query($tableData) {
    // Your code
    return $tableData;
}

add_filter( 'wpdatatables_before_generate_wp_based_query', 'modify_table_data_before_wp_query', 10, 1 );