[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 17:57:18 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):

 Replying to [comment:1 nacin]:
 > If a function is repeatedly calling get_current_site(), one option is to
 also assign get_current_site() to a local variable $current_site

 Yeah, I started down that road, but then went all in. There are a few
 places where that would likely make sense though.

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


More information about the wp-trac mailing list