post_date_column_time
Filter HookDescription
Filters the published, scheduled, or unpublished time of the post. The published time and date are both displayed now, which is equivalent to the previous 'excerpt' mode.Hook Information
File Location |
wp-admin/includes/class-wp-posts-list-table.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1254 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$t_time
|
The published time. |
WP_Post
|
$post
|
Post object. |
string
|
$column_name
|
The column name. |
string
|
$mode
|
The list display mode ('excerpt' or 'list'). |
Usage Examples
Basic Usage
<?php
// Hook into post_date_column_time
add_filter('post_date_column_time', 'my_custom_filter', 10, 4);
function my_custom_filter($t_time, $post, $column_name, $mode) {
// Your custom filtering logic here
return $t_time;
}
Source Code Context
wp-admin/includes/class-wp-posts-list-table.php:1254
- How this hook is used in WordPress core
<?php
1249 * @param string $t_time The published time.
1250 * @param WP_Post $post Post object.
1251 * @param string $column_name The column name.
1252 * @param string $mode The list display mode ('excerpt' or 'list').
1253 */
1254 echo apply_filters( 'post_date_column_time', $t_time, $post, 'date', $mode );
1255 }
1256
1257 /**
1258 * Handles the comments column output.
1259 *
PHP Documentation
<?php
/**
* Filters the published, scheduled, or unpublished time of the post.
*
* @since 2.5.1
* @since 5.5.0 Removed the difference between 'excerpt' and 'list' modes.
* The published time and date are both displayed now,
* which is equivalent to the previous 'excerpt' mode.
*
* @param string $t_time The published time.
* @param WP_Post $post Post object.
* @param string $column_name The column name.
* @param string $mode The list display mode ('excerpt' or 'list').
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-admin/includes/class-wp-posts-list-table.php
Related Hooks
Related hooks will be displayed here in future updates.