[wp-trac] [WordPress Trac] #35407: set_url_scheme() called inconsistently on URLs passed to `preview_post_link` filter
WordPress Trac
noreply at wordpress.org
Mon Jan 11 19:44:04 UTC 2016
#35407: set_url_scheme() called inconsistently on URLs passed to
`preview_post_link` filter
-------------------------------+-----------------------
Reporter: danielbachhuber | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.5
Component: Posts, Post Types | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-------------------------------+-----------------------
It'd expect it to be consistently applied to URLs passed to
`preview_post_link`, instead of applied in some cases and not applied in
other cases.
In WordPress 4.4, `get_preview_post_link()` was introduced with an
optional third argument `$preview_link`. In the cases where the
`$preview_link` is supplied in the codebase, the permalink is primed with
`set_url_scheme()`. However, internally, `get_preview_post_link()` defines
the preview link without running it through `set_url_scheme()`.
Pragmatically, it appears only `edit-form-advanced.php` is affected by
this issue.
I discovered this issue while debugging a site where the admin is served
over SSL with a different domain. However, I don't feel wholly confident
in how WordPress generates URLs in this scenario.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35407>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list