From c7edd7fff9f68aaee7c8c619b21d9fd6c3a6c865 Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Fri, 18 Mar 2022 16:37:23 +0000 Subject: [PATCH] Administration: Add a `media_date_column_time` filter to the media list table date column. Similar to the existing `post_date_column_time` filter in the posts list table, this change adds a new hook to filter the "Date" column output in the media list view. Props ivanlutrov, lopo, audrasjb. Fixes #42942. git-svn-id: https://develop.svn.wordpress.org/trunk@52950 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-media-list-table.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index e1fa4058cc..4ab4134dfc 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -508,7 +508,16 @@ class WP_Media_List_Table extends WP_List_Table { } } - echo $h_time; + /** + * Filters the published time of the post. + * + * @since 6.0.0 + * + * @param string $h_time The published time. + * @param WP_Post $post Post object. + * @param string $column_name The column name. + */ + echo apply_filters( 'media_date_column_time', $h_time, $post, 'date' ); } /**