[wp-trac] [WordPress Trac] #25158: Use get_current_site() instead of the $current_site global when possible

WordPress Trac noreply at wordpress.org
Tue Aug 27 18:52:15 UTC 2013


#25158: Use get_current_site() instead of the $current_site global when possible
--------------------------+------------------------------
 Reporter:  jeremyfelt    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Multisite     |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by jeremyfelt):

 [attachment:25158.2.diff] makes use of a local `$current_site =
 get_current_site();` when it makes sense rather than calling
 `get_current_site()` each time. There are a couple places where I've left
 multiple function calls in place as there are situations where only one of
 them will be called depending on logic.

 Also removed an unused `$wpdb` global in `ms_site_check()`

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


More information about the wp-trac mailing list