Hi Joel,
Thank you very much š I actually thought about it a few times, and I did a lot of work with another developer on making my other plugin “Media Cleaner” compatible with ACF. It’s a tough job! š We could try to do it for Media File Renamer, the problem is that ACF encodes all its data, and the plugin wouldn’t be able to easily rename all those strings, it would need to parse every post, one by one, decode and check their data. So basically the Rename button would need a progress bar and a more complex asynchronous process. In the case of the bulk, that will also complicate many parts of the plugin too. So yes, I have this in mind, but hopefully, I will find a better way than this way, which is a bit too heavy.
Thanks for taking the time to write a very thorough response. I was afraid you might say something like that, but it makes sense. I wanted to follow up with another question. I see that you have filters, but do you have hooks so that I could write some code to update some specific ACF fields when a file is renamed? Thanks again!
Sorry for the late reply. That’s a copy/paste from my website, but here is some info:
If you have a developer working for you, then he/she will be able to understand how your install work, and to teach Media File Renamer how to update those references. You can use the mfrh_url_renamed (if you want to handle the new URL for this filename) or the mfrh_media_renamed (if you want to handle the filename on your server) actions. Have a look at the examples in the plugins/custom.php file in the plugin directory.
That’s exactly what I was looking for. Thanks Jordy!
If you write the code for it, please share it with me, I will add it to this custom file, we can also create a new thread and a gist (https://gist.github.com/) so that other users can participate, enhance and fix š Thank you!