[wp-trac] [WordPress Trac] #35120: Insert attachment should not always https
WordPress Trac
noreply at wordpress.org
Wed Dec 16 13:08:18 UTC 2015
#35120: Insert attachment should not always https
----------------------------+-----------------------------
Reporter: hnle | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
In [35804], WP_CONTENT_URL began to reflect current url scheme.
so, Image url when insert from editor with https (and front is `http`)
will have `https`.
but some case like using Self-signed certificate, or like local-only ssl
admin, admin only ssl... ―― they are not recommended but some user using
it ―― the image cannot show in front (non-admin user:viewer)
If `wp_get_attachment_url`'s response filtered like below, it will well
but it need some conditional branching.
{{{#!php
<?php
add_filter('wp_get_attachment_url',function($url) {
return set_url_scheme($url ,'http');
});
}}}
[[Image(https://cldup.com/AZpugYdifI.png)]]
(p.s. is this a plugin territory?)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35120>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list