Make WordPress Core


Ignore:
Timestamp:
03/18/2022 04:37:23 PM (2 years ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r52929 r52950  
    509509        }
    510510
    511         echo $h_time;
     511        /**
     512         * Filters the published time of the post.
     513         *
     514         * @since 6.0.0
     515         *
     516         * @param string  $h_time      The published time.
     517         * @param WP_Post $post        Post object.
     518         * @param string  $column_name The column name.
     519         */
     520        echo apply_filters( 'media_date_column_time', $h_time, $post, 'date' );
    512521    }
    513522
Note: See TracChangeset for help on using the changeset viewer.