wpdatatables_filter_string_cell_before_formatting

Contents

Description

This filter is applied to the value of a string cell before it is formatted and returned to the front-end.

Usage

add_filter( 'wpdatatables_filter_string_cell_before_formatting', 'filter_string_cell', 10, 2 );

Parameters

  • $content string
    String cell value before formatting it (executing do_shortcode if parsing shortcodes in strings is allowed).
  • $tableId integer
    ID of table from database.

Examples

// Callback function for the wpdatatables_filter_string_cell_before_formatting filter hook
function filter_string_cell( $content, $tableId ) { 
   // Check for specific table Id
   if ( $tableId == 1) { 
     // Your code
   }
   return $content;
}

add_filter( 'wpdatatables_filter_string_cell_before_formatting', 'filter_string_cell', 10, 2);