Make WordPress Core

Opened 3 months ago

Closed 2 months ago

Last modified 2 months ago

#60332 closed enhancement (fixed)

Edit docs for switch_to_blog()

Reported by: sabernhardt's profile sabernhardt Owned by: audrasjb's profile audrasjb
Milestone: 6.5 Priority: normal
Severity: normal Version: 4.9
Component: Networks and Sites Keywords: has-patch
Focuses: docs, multisite Cc:

Description

#41815 removed the list item for autoloaded options, leaving one list item for plugins.

I think the plugins note could be better as a sentence, without a list.

Attachments (1)

60332.patch (551 bytes) - added by sabernhardt 3 months ago.

Download all attachments as: .zip

Change History (8)

@sabernhardt
3 months ago

#1 @jeremyfelt
3 months ago

I think that makes sense, @sabernhardt. Maybe we can take this opportunity to expand the explanation a bit as well.

Something like: "PHP code loaded with the originally requested site (plugins, theme) does not switch."?

(I'm not attached to that at all, happy to work through ideas if it's useful.)

#2 @SergeyBiryukov
3 months ago

  • Milestone changed from Awaiting Review to 6.5

#3 @sabernhardt
3 months ago

Your suggestion is quite different than mine, and probably better (I do not know this function well enough to write a better description).

For a small edit, the sentence could be
"PHP code loaded with the originally requested site, such as code from a plugin or theme, does not switch."

#5 @audrasjb
3 months ago

  • Owner set to audrasjb
  • Status changed from new to accepted

Hi there, indeed the docblock can be improved
I added a PR with the last proposal

#6 @audrasjb
2 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 57596:

Networks and Sites: Improve switch_to_blog() docblock.

Follow-up to [41373].

Props sabernhardt, jeremyfelt, audrasjb.
Fixes #60332.
See #41815.

Note: See TracTickets for help on using tickets.