[wp-trac] [WordPress Trac] #19420: get_blog_permalink() can cache either an HTTP or HTTPS link for the same post

WordPress Trac wp-trac at lists.automattic.com
Sat Dec 3 04:05:02 UTC 2011


#19420: get_blog_permalink() can cache either an HTTP or HTTPS link for the same
post
--------------------------+------------------------------
 Reporter:  mdawaffe      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Multisite     |     Version:  3.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by nacin):

 Replying to [comment:3 mdawaffe]:
 > Hence the filter :)

 Seems sane, but chances are, if you are browsing a site via SSL from the
 frontend, the best guess would be SSL for any other site on that network.
 That's also the current functionality of the code (assume a non-persistent
 cache).

 Stepping back, I don't really like that we switch_to_blog() to call
 get_permalink(). One, we do nothing to load the rewrite rules in a
 switch_to_blog(). Two, it would be much better if get_blog_permalink()
 could somehow leverage get_home_url(). That is then SSL by default but
 includes $blog_id in the filter.

 Sidenote, that get_home_url() for a different blog also already relies on
 `is_ssl() && ! is_admin()` should probably be considered further support
 using that for get_blog_permalink().

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19420#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list