Only accept url from sites that contain https

enter image description here

I need to do a validation, when the user will add an image that the url is not secure (it does not have https) it displays an error message and if it has https, the user can put the image on the page, however I do not know which hook do it.

I tried to do the hook wp_get_attachment_url, but I need the message to appear to the user when he clicks the “insert into page” button, is it possible?

if so which hook do I use?

Read more here:: Only accept url from sites that contain https

Leave a Reply

Your email address will not be published. Required fields are marked *