[wp-trac] [WordPress Trac] #40513: switch_to_blog should accept a WP_site as param
WordPress Trac
noreply at wordpress.org
Sun Jun 25 22:20:50 UTC 2017
#40513: switch_to_blog should accept a WP_site as param
--------------------------------+------------------------------
Reporter: spacedmonkey | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and Sites | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+------------------------------
Changes (by DrewAPicture):
* keywords: has-patch 2nd-opinion => has-patch
Comment:
Hi, sorry missed the ping. Yeah, I'd probably just simplify it down to
`$site` or `$new_site`. Separately, I think I'd probably recommend doing
the `get_site()` call inside of `switch_to_blog()` as it can already
accept an object or int – and it would follow with core style on similar
usage, such as with how `get_post()` is used inside of functions all the
time.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/40513#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list