#37553 closed enhancement (fixed)
Deprecate `wp_get_network()`
Reported by: | flixos90 | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.7 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Networks and Sites | Keywords: | has-patch has-dev-note |
Focuses: | multisite | Cc: |
Description
Now with get_network()
in, the old function wp_get_network()
should be deprecated as discussed earlier.
Attachments (2)
Change History (10)
#1
@
8 years ago
- Keywords has-patch added; needs-patch removed
Thanks for your observation flixos90, patch file added
#2
follow-up:
↓ 3
@
8 years ago
Thanks for the patch @PieWP! We would also need to add the deprecation to the PHPDoc of the function.
And then we get to the tricky part: ms-deprecated.php
is loaded after Multisite bootstrap processes, however this function is currently available at that point. What do we do here? Just leave it there and still deprecate it? Adjust the order of files loaded? Or introduce a new file for this kind of deprecated multisite functions (like ms-load-deprecated.php
)?
#3
in reply to:
↑ 2
@
8 years ago
- Milestone changed from Future Release to 4.7
- Type changed from defect (bug) to enhancement
Replying to flixos90:
And then we get to the tricky part:
ms-deprecated.php
is loaded after Multisite bootstrap processes, however this function is currently available at that point. What do we do here? Just leave it there and still deprecate it?
We're good to leave it in ms-load.php
, we can move it to the bottom of the file.
This is kind of fun because the introduction of wp_get_network()
itself in #27003 led to the deprecation of get_current_site_name()
. I guess this is progress... :)
See https://core.trac.wordpress.org/ticket/27003#comment:44 for a good summary.
#4
@
8 years ago
- Keywords commit added
- Owner set to jeremyfelt
- Status changed from new to reviewing
In 37553.diff, wp_get_network()
is now deprecated and moved to the bottom of ms-load.php
.
#5
follow-up:
↓ 6
@
8 years ago
Should there be a comment about why the function is located here rather than with the other deprecated functions?
#6
in reply to:
↑ 5
@
8 years ago
Replying to jorbin:
Should there be a comment about why the function is located here rather than with the other deprecated functions?
I don't think we need to do that on each function. It may be worth adding a comment above the first deprecated function in this file, get_current_site_name()
, to indicate that any deprecated functions from ms-load.php
should go here, but that would probably be another ticket.
#8
@
4 years ago
- Keywords has-dev-note added; commit removed
Linking the dev note that was published here for reference: https://make.wordpress.org/core/2016/11/04/multisite-focused-changes-in-4-7/
Added deprecation notice