[wp-trac] [WordPress Trac] #37414: Use `get_network()` instead of global `$current_site`

WordPress Trac noreply at wordpress.org
Tue Sep 20 21:52:58 UTC 2016


#37414: Use `get_network()` instead of global `$current_site`
-------------------------------------+------------------------
 Reporter:  flixos90                 |       Owner:  flixos90
     Type:  enhancement              |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.7
Component:  Networks and Sites       |     Version:  4.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:  multisite
-------------------------------------+------------------------
Changes (by jeremyfelt):

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


Comment:

 [38388] has been reverted in [38636]. Due to this and possibly some other
 churn, [attachment:37414.diff] is having some trouble applying cleanly.

 I like the idea, especially from a naming perspective. This change would
 also provide the filter in places where it wasn't available before, which
 is probably good. It does mean that `apply_filters()` fires that many more
 times in a page view, though I have not studied to see if there's a real
 enough performance impact because of that.

 It could be good to do some profiling, but this seems like a nice change.

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


More information about the wp-trac mailing list