post_date_column_time

Filters the published time of the post.

Description

apply_filters( 'post_date_column_time', (string) $t_time, (WP_Post) $post, (string) $date, (string) $mode ); 

If $mode equals excerpt,, the published time and date are both displayed. If $mode equals list (default), the publish date is displayed, with the time and date together available as an abbreviation definition.

Parameters (4)

0. $t_time (string)
The published time.
1. $post (WP_Post)
Post object.
2. $date (string) => 'date'
The column name.
3. $mode (string)
The list display mode ('excerpt' or list).

Usage

To run the hook, copy the example below.
  1. $t_time = apply_filters( 'post_date_column_time', $t_time, $post, $date, $mode ); 
  2.  
  3. if ( !empty( $t_time ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the post_date_column_time callback 
  2. function filter_post_date_column_time( $t_time, $post, $date, $mode ) { 
  3. // make filter magic happen here... 
  4. return $t_time
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'post_date_column_time', 'filter_post_date_column_time', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'post_date_column_time', 'filter_post_date_column_time', 10, 4 ); 

Defined (2)

The filter is defined in the following location(s).

/wp-admin/includes/class-wp-posts-list-table.php  
  1. echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode ); 
  1. echo '<abbr title="' . $t_time . '">' . apply_filters( 'post_date_column_time', $h_time, $post, 'date', $mode ) . '</abbr>';