From df3dae33cce14da33e134ab1cc782f079532548c Mon Sep 17 00:00:00 2001 From: davidbaumwald Date: Fri, 18 Mar 2022 16:39:02 +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. Built from https://develop.svn.wordpress.org/trunk@52950 git-svn-id: http://core.svn.wordpress.org/trunk@52539 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-media-list-table.php | 11 ++++++++++- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index e1fa4058cc..4ab4134dfc 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/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' ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index c052b673fd..96dcbc33a7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52949'; +$wp_version = '6.0-alpha-52950'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.