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

WordPress Trac noreply at wordpress.org
Fri Sep 6 15:36:26 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 nacin):

 Replying to [comment:4 SergeyBiryukov]:
 > I'd suggest doing the same in all the instances. It seems more future-
 proof in case more instances are added later in the same function.

 I think this is a judgment call; sometimes it may make sense, sometimes it
 is just an unnecessary variable. Really no different than when we were
 replacing $current_screen with get_current_screen() or $post with
 get_post().

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


More information about the wp-trac mailing list