WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 10 months ago

#15921 closed enhancement (wontfix)

date column filter in media list table

Reported by: gonahkar Owned by: chriscct7
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Date/Time Keywords: needs-patch
Focuses: Cc:

Description

please add a filter for date column in media list table, like posts list table.

in wp-admin\includes\class-wp-media-list-table.php @ line:288
replace:

<td <?php echo $attributes ?>><?php echo $h_time ?></td>

with:

<td <?php echo $attributes ?>><?php echo apply_filters( 'media_date_column_time', $h_time); ?></td>

Attachments (1)

class-wp-media-list-table.php (13.4 KB) - added by gonahkar 8 years ago.
edited file

Download all attachments as: .zip

Change History (9)

@gonahkar
8 years ago

edited file

#1 @dd32
8 years ago

What is an example of the purpose of this filter?

#2 @gonahkar
8 years ago

Replying to dd32:

What is an example of the purpose of this filter?


We use Iranian calendar in wordpress and need date filters.

Last edited 8 years ago by gonahkar (previous) (diff)

#3 @dd32
8 years ago

  • Keywords 3.2-early added; media table removed
  • Milestone changed from Awaiting Review to Future Release

marking as a possibility for 3.2, We'd really have to review a lot of area's to make sure that the date can fit in all the possible spots, not just this particular spot.

#4 @scribu
8 years ago

  • Keywords needs-patch added; 3.2-early removed

#5 @chriscct7
5 years ago

As opposed to a date filter, couldn't this be passed into one of the internationalization date functions along the lines of date_i18n?

#6 @chriscct7
3 years ago

  • Owner set to chriscct7
  • Status changed from new to assigned

#7 @Rarst
10 months ago

I am not sure this needs such a custom filter in such a specific place.

By now the output of WP_Media_List_Table->column_date() is pretty elaborate and switches conditionally between relative and absolute output.

If there are some very specific output needs for this (that cannot be handled on WP localisation level) it is likely that they are better addressed by adding a custom column altogether.

#8 @Rarst
10 months ago

  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.