I had a project where every single media library image URL needed to be filtered, backend and front end. As far as I’ve found these were the filters for every area:
The myplugin_filter_html_image_urls() function peals out images with regex from areas where it’s not just the URL being sent. This function may require verification of the current domain incase bad practices of using external images is being done.
Passing variables into WordPress hooks using an anonymous function I thought was impossible. I always worked around this and rewrote the logic. Today I found out anonymous functions support a use keyword, allowing passing:
So simple and easy. Shaves hours of troubleshooting.