wpdatatables_filter_style_table_block

Contents

Description

This filter is used to modify the generated CSS style block for a table.

Usage

add_filter( 'wpdatatables_filter_style_table_block', 'modify_style_table_block', 10, 2 );

Parameters

  • $styleBlockHtml string
    The HTML content of the style block for the wpDataTables table.
  • $tableID integer
    The ID of the table.

Examples

// Callback function for the wpdatatables_filter_style_table_block filter hook
function modify_style_table_block($styleBlockHtml, $tableID) { 
    if ($tableID == 1) { // Replace 1 with your table ID
        // Your code
    }
    return $styleBlockHtml;
}

add_filter( 'wpdatatables_filter_style_table_block', 'modify_style_table_block', 10, 2 );