kimber Posted June 16, 2020 Share Posted June 16, 2020 Hi, I've been trying to find a tutorial that will tell me how to add a timestamp (Last updated: date and time) of a mp3 audio link or next tot he link in wordpress. I'm using "link to media file" type of audio link. The files are often overwritten so the timestamp needs to date each time the file replaced by our overwrite plugin. Anyways, while looking for tutorials I found https://developer.wordpress.org/reference/functions/wp_get_media_creation_timestamp/ but it really doesn't explain must to the reader. If this article suppose to tell me how to do something? If so, I sure can't figure out what. I have no probably editing the php files if I can find a tutorial but on this subject I can't. Thank you for your time Kimberly Link to comment Share on other sites More sharing options...
Ingolme Posted June 16, 2020 Share Posted June 16, 2020 That's not a tutorial, it is a reference page. References provide technical details about a function for somebody who already knows how to use functions. The reference expects your code to have access to a getID3 object, which does not appear in the reference manual, so it probably is an external resource. If you just want to know when a file was modified, PHP has a built in function filemtime() which returns a UNIX timestamp. the date() function can turn the UNIX timestamp into a meaningful string. 1 Link to comment Share on other sites More sharing options...
kimber Posted June 17, 2020 Author Share Posted June 17, 2020 21 hours ago, Ingolme said: That's not a tutorial, it is a reference page. References provide technical details about a function for somebody who already knows how to use functions. The reference expects your code to have access to a getID3 object, which does not appear in the reference manual, so it probably is an external resource. If you just want to know when a file was modified, PHP has a built in function filemtime() which returns a UNIX timestamp. the date() function can turn the UNIX timestamp into a meaningful string. Thanks, I will look at these links. I'm also looking at timeStamp Event Property to see if it can be used to create a Last Updated: Date and Time using html codes. The links before rebuilding the website are: (Last update on this website was 2015) The links come from a folder outside of wordpress. I have a plugin that can forward all mp3 to another folder in the same cpanel. <a href="http://sitename.com/programs/news011.mp3?ver=2.0">News011.mp3</a> File Link: News011.mp3Last Updated:Tue Jun 16, 2020 03:06:17 pm I can't figure out what this ?ver="2.0 means and thought maybe it a html code. I Sorry for the rambling. I'm really want to learn this so if there is an future issue with this, I can understand it. It a new client. Thanks for listening Kimberly Link to comment Share on other sites More sharing options...
Ingolme Posted June 17, 2020 Share Posted June 17, 2020 If you are loading the file from another website, you have no way to know when it was last modified. To find out the modification time of a file, it has to be on your server. The ?ver=2.0 probably is just there so that older versions of the file are not loaded from the browser cache. 1 Link to comment Share on other sites More sharing options...
kimber Posted June 17, 2020 Author Share Posted June 17, 2020 19 minutes ago, Ingolme said: If you are loading the file from another website, you have no way to know when it was last modified. To find out the modification time of a file, it has to be on your server. The ?ver=2.0 probably is just there so that older versions of the file are not loaded from the browser cache. Thank you for your time, I can put the file any place I want it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now