0

Anyone can tell which is the filter (if there is any) used for the date of an uploaded file. This can be useful to limit the upload for the users based on the time.

  • Media Library attachments create an entry in the posts table of the database just like any post or page. You should be able to query the database for the date field with standard mysql. – paper_robots Sep 17 '15 at 13:42
  • Just to be clear, you want to filter the attachments shown in the media library, so that only attachments within a certain time period are shown? Keep in mind that WordPress doesn't deal with files directly, it deals with posts of type attachment, which represent those files. – Tom J Nowell Sep 17 '15 at 13:56
  • $file_date = get_the_date( $file_id ) should do the work? – Amine Richer Sep 17 '15 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.