[wp-trac] [WordPress Trac] #27003: Introduce wp_get_network() and begin cleanup of multisite load

WordPress Trac noreply at wordpress.org
Thu Feb 27 19:53:52 UTC 2014


#27003: Introduce wp_get_network() and begin cleanup of multisite load
--------------------------------------------------+------------------------
 Reporter:  jeremyfelt                            |       Owner:
     Type:  enhancement                           |      Status:  new
 Priority:  normal                                |   Milestone:  3.9
Component:  Bootstrap/Load                        |     Version:  trunk
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-testing dev-feedback  |     Focuses:  multisite
--------------------------------------------------+------------------------

Comment (by nacin):

 Things before commit:

  * When testing this on WordPress.org I found a few issues related to the
 use of get_site_option() prior to setting $wpdb->siteid, so site_id = 0
 was getting queried. So we're now going to pass the network ID to
 wp_load_core_site_options() and wait to set the site_name property until
 after $wpdb is init'd.

  * If path segments are > 2, only the longest two are used. There needs to
 be a loop to query /a/b/c/d/, , /a/b/c/, /a/b/, /a/, and /.

  * get_site_by_path() needs unit tests.

 Hope to commit this in the next few hours or so, once I'm stationary and
 can fix inevitable WP.org breakage.

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


More information about the wp-trac mailing list