wpdatatables_filter_date_cell_before_formatting

Contents

Description

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

Usage

add_filter( 'wpdatatables_filter_date_cell_before_formatting', 'filter_date_cell_before_formatting', 10, 2 );

Parameters

  • $content string
    Timestamp value of the date cell value.
  • $tableId integer
    ID of table from database.

Examples

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

add_filter('wpdatatables_filter_date_cell_before_formatting', 'filter_date_cell_before_formatting', 10, 2);