[wp-trac] [WordPress Trac] #14172: Implement $scheme in site info in ms-sites edit site

WordPress Trac noreply at wordpress.org
Tue May 26 04:50:10 UTC 2015


#14172: Implement $scheme in site info in ms-sites edit site
--------------------------------------+------------------------
 Reporter:  firmdot                   |       Owner:
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  4.3
Component:  Networks and Sites        |     Version:  3.0
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |     Focuses:  multisite
--------------------------------------+------------------------
Changes (by jeremyfelt):

 * keywords:  needs-patch => needs-patch dev-feedback


Comment:

 Where does it make the most sense for scheme to live as part of a site's
 information?

 * A new `enum( 'http', 'https' )` field in `wp_blogs`?
 * An option? `get_option( 'scheme' );`

 I like the first, because it attaches the scheme directly to the site when
 we look things up during load. We can default to HTTP. The tough part is
 establishing the scheme for existing sites. The upgrade process could look
 at existing `siteurl`/`home` options to establish a good guess.
 `FORCE_SSL_` constants would overwrite any scheme data from the table. A
 `WP_Network()` object could fill its `scheme` property based on its main
 site's `WP_Site` object.

 An option wouldn't require a DB schema change, which is probably good for
 large networks. It would be more expensive to establish a site's scheme
 for `$current_blog` (or `WP_Site`) when using something like
 `switch_to_blog()`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/14172#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list