[wp-trac] [WordPress Trac] #45594: Action 'switch_blog' duplicated $new_blog param
WordPress Trac
noreply at wordpress.org
Wed Aug 14 14:29:02 UTC 2019
#45594: Action 'switch_blog' duplicated $new_blog param
-------------------------------------+-----------------------------
Reporter: ChriCo | Owner: SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.3
Component: Networks and Sites | Version: 5.0
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses: multisite
-------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"45794" 45794]:
{{{
#!CommitTicketReference repository="" revision="45794"
Networks and Sites: Improve documentation and variable naming in
`switch_to_blog()` and `restore_current_blog()`.
In `switch_to_blog()`:
* Rename `$blog_id` to `$prev_blog_id` for clarity.
* Rename `$new_blog` to `$new_blog_id` for consistency.
* Pass `$prev_blog_id` as a second parameter to `switch_blog` action,
instead of the duplicated `$new_blog_id`. This only clarifies
documentation and does not affect functionality, since the values are
equal in the context where the DocBlock is located.
In `restore_current_blog()`:
* Rename `$blog` to `$new_blog_id` for clarity.
* Rename `$blog_id` to `$prev_blog_id` for clarity.
Props ChriCo, jeremyfelt, SergeyBiryukov.
Fixes #45594.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45594#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list