wpdatatables_filter_style_block

Contents

Description

This filter is applied to the HTML block that is generated based on the settings that users provide in the plugin settings admin page.

Usage

add_filter( 'wpdatatables_filter_style_block', 'filter_style_block', 10, 2 );

Parameters

  • $styleBlockHtml
    default HTML content.
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_style_block filter hook
function filter_style_block( $styleBlockHtml, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   } 
}

add_action( 'wpdatatables_filter_style_block', 'filter_style_block', 10, 2);