wpdatatables_filter_table_cssClassArray

Contents

Description

This filter is applied to the array of CSS classes that a table has.

Usage

add_filter( 'wpdatatables_filter_table_cssClassArray', 'filter_table_cssClassArray', 10, 2 );

Parameters

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

Examples

// Callback function for the wpdatatables_filter_table_cssClassArray filter hook
function filter_table_cssClassArray( $classes, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_table_cssClassArray', 'filter_table_cssClassArray', 10, 2);