[wp-trac] [WordPress Trac] #31428: Switch_to_blog() no longer works in Customize using Multisite.

WordPress Trac noreply at wordpress.org
Mon Feb 23 20:44:22 UTC 2015


#31428: Switch_to_blog() no longer works in Customize using Multisite.
-------------------------------+------------------------------
 Reporter:  csschris           |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Customize          |     Version:  4.1.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  multisite
-------------------------------+------------------------------

Comment (by csschris):

 Replying to [comment:3 westonruter]:
 > > Code that uses `switch_to_blog()` no longer gets run in customize
 view.
 >
 > Please share this code.

 eg code could be

 switch_to_blog(1);
 echo bloginfo('name');
 restore_current_blog();

 //shows current blog name not the blogname for site with id of 1

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31428#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list