Opened 9 years ago
Last modified 7 weeks ago
#37297 reviewing enhancement
Deprecate get_blogaddress_by_id function
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | Future Release | Priority: | normal |
| Severity: | normal | Version: | 3.0 |
| Component: | Networks and Sites | Keywords: | has-patch has-unit-tests needs-refresh |
| Focuses: | multisite | Cc: |
Description
The get_blogaddress_by_id function is pretty old and should be replaced with get_home_url, as this is filtered.
Attachments (1)
Change History (20)
#3
@
9 years ago
- Keywords 4.7-early removed
- Milestone changed from Awaiting Review to 4.7
- Owner set to jeremyfelt
- Status changed from new to reviewing
Noting #26855 in here as well. Let's see if we can deprecate this early. :)
#4
@
9 years ago
Early is coming to a an end. (whatever early means). @jeremyfelt - Think this can go in, or do you need to do #26855 first?
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
#6
@
9 years ago
- Keywords needs-patch added; has-patch removed
- Owner jeremyfelt deleted
I spent some time with 37297.diff the other day and ran into some uncertainty.
As @thomaswm mentioned, get_home_url() is not appropriate solution for install_blog(). get_blogaddress_by_id() attempts to use the home option to determine the URL's scheme, but it will always be empty at this point. We then know it will be HTTP combined with the site's domain and path.
It does seem to be the right option for wpmu_welcome_notification(). I'd like this to be tested more though.
The use in wp-activate.php has already been removed via #26855.
This ticket was mentioned in Slack in #core by chriscct7. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by jeremyfelt. View the logs.
9 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
9 years ago
This ticket was mentioned in Slack in #core-multisite by flixos90. View the logs.
9 years ago
#11
@
9 years ago
- Milestone changed from 4.7 to Future Release
This needs further thought and should be tested earlier in a release cycle. Let's reconsider it in one of the next releases.
This ticket was mentioned in Slack in #core-multisite by spacedmonkey. View the logs.
8 months ago
This ticket was mentioned in PR #8659 on WordPress/wordpress-develop by @sukhendu2002.
7 months ago
#14
- Keywords has-patch has-unit-tests added; needs-patch removed
…me_url()
Trac ticket: https://core.trac.wordpress.org/ticket/37297
#16
@
5 months ago
- Keywords needs-refresh added
From the looks of it, this function is used a little on repo. https://wpdirectory.net/search/01JZ3XSV5RBHA3ZCSS9C2QDQ04.
We should consider if this needs to be deprecated.
Added needs refresh, as the patch is 9 years old. This will have to be committed / approved by someone else, as I am the original patch creator.
#17
@
4 months ago
- Keywords commit removed
Doing a bit of gardening and as this isn't actually ready for commit, removing that especially in light of comment 6
You cannot replace
get_blogaddress_by_idwithget_home_urlininstall_blog(), because thehomeoption hasn't been defined yet at that point. It is set in line 1360 in ms-functions.php.So, in
install_blog(), you'll have to do something like$site = get_site( $blog_id ); $url = 'http://' . $site->domain . $site->path;to get the value of
$url.