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
This commit is contained in:
davidbaumwald 2022-03-18 16:39:02 +00:00
parent fc469e56ca
commit df3dae33cc
2 changed files with 11 additions and 2 deletions

View File

@ -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' );
}
/**

View File

@ -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.