#33899 closed enhancement (maybelater)
Change get_current_site to get_current_network
Reported by: | spacedmonkey | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | |
Focuses: | multisite | Cc: |
Description
Related to on going ticket, renaming this function bring it into the line with new naming convention.
More detail: https://make.wordpress.org/core/2013/10/06/potential-roadmap-for-multisite/
Related: #29411 #28290
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
9 years ago
#4
@
9 years ago
Is doing type checking enough of a reason. Like checking to see if it is an instance of WP_Network? Maybe allowing it to return false like other get functions? It does change the functionality of the function...
#5
@
9 years ago
+1, but premature
We need a renaming roadmap proposal on Make Core here.
When a new function is introduced the old one should have a note that it will be deprecated in the future, now a wrapper for the new one, and recommend the new one to be used. That's a start, at least. But to do so we need a roadmap.
The get_current_blog_
functions must be included in this roadmap. My first thought on this was get_current_network_site()
and get_current_network_site_id()
. Another possibility is wp_get_current_site()
and wp_get_current_site_id()
, but I prefer the first mentioned.
Let the words "network_site" mean a site of a multisite network, as opposed to the old use of "site" meaning a network.
#6
@
8 years ago
- Keywords close added
It seems like get_network()
will be a pretty good replacement once #32504 makes that available.
Thanks for the ticket/patch, @spacedmonkey.
We should be wary of introducing a new function for the sole purpose of naming. I don't think
get_current_site()
is hurting anything at the moment, andget_current_network()
, without providing any new functionality, would result in some confusion as to why both exist. It can be frustrating to keep some of the naming as is while other pieces are changing, but we can leave things as is when we don't need anything new from them.