[wp-trac] [WordPress Trac] #56458: Multisite Theme Details
WordPress Trac
noreply at wordpress.org
Fri Sep 30 14:39:06 UTC 2022
#56458: Multisite Theme Details
------------------------------+--------------------------------------------
Reporter: hopetommola | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Networks and | Version: 6.0.1
Sites |
Severity: normal | Resolution:
Keywords: | Focuses: ui, administration, multisite
------------------------------+--------------------------------------------
Comment (by bananastalktome):
@hopetommola I couldn't tell from your comment, but wanted to let you know
the solution I posted above does add a column to the /network/sites.php
page to include the Theme as a separate column.
That said, from looking at your code, I think the issue you're facing with
`get_bloginfo` is that you haven't called
`switch_to_blog($blog->blog_id);` first - the bloginfo is being retrieved
for the main network site (I believe). The
[https://developer.wordpress.org/reference/functions/get_blog_details/
get_blog_details()] function looks like it handles switching to the
provided blog for you, so it works without the need for an explicit
`switch_to_blog()` call first. Try adding
`switch_to_blog($blog->blog_id);` right after your foreach, and then
`restore_current_blog()` right before the end of the foreach.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56458#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list