pixelgrade / pixtypes

pix_builder
1 stars 3 forks source link

Use plugin_dir_url instead of magic url building to use relative type according to the current page (http or https) #16

Closed mvrueden closed 8 years ago

mvrueden commented 9 years ago

I am using the LENS theme from pixelgrade: http://themeforest.net/item/lens-an-enjoyable-photography-wordpress-theme/5713452. I configured my wordpress instance to force SSL for the login and admin page. The overall page does not use SSL (and I do not want it to!)

If wordpress is configured as described above, the gallery detail page fails to load: the gallery images do not show up. Google Chrome prints errors on the console "Mixed Content". The broken page is: wp-admin/post.php?post=121&action=edit I digged into the code and the fix I provide fixes the issue. However I am not a php expert nor do I know anything about wordpress plugin development.

This only works in combination with pull request https://github.com/pixelgrade/pixproof/pull/16 (The pixproof plugin also seems to lack the ability to serve resources correctly).

Please also note, that not all Mixed Content problems are gone. I was only able to fix Errors, I still get warnings for each image in the gallery: Mixed Content: The page at 'https://example.com/wp-admin/post.php?post=42&action=edit' was loaded over HTTPS, but requested an insecure image 'http://example.com/wp-content/uploads/2014/11/image-300x225.jpg'. This content should also be served over HTTPS.

andreilupu commented 8 years ago

see pixelgrade/pixproof/pull/16