Is it possible to change all images to load as HTTPS and not HTTP? Tried to find in plugin editor code, but no luck. Thanks.
1 Answers
Hello Joe,
Our plugin is using https://developer.wordpress.org/reference/functions/wp_upload_dir/ function to get the first part of the url for the image. Thus we’re use the site’s base url. If the site’s base url is https, the plugin’s images will also use https then.
The code for getting base url is located here: https://github.com/antongorodezkiy/pdf-light-viewer/blob/master/controllers/Plugin.php#L197
Our plugin is using https://developer.wordpress.org/reference/functions/wp_upload_dir/ function to get the first part of the url for the image. Thus we’re use the site’s base url. If the site’s base url is https, the plugin’s images will also use https then.
The code for getting base url is located here: https://github.com/antongorodezkiy/pdf-light-viewer/blob/master/controllers/Plugin.php#L197
Please login or Register to submit your answer