Skip to main content

Timeline for How can I trust switch_to_blog()?

Current License: CC BY-SA 3.0

6 events
when toggle format what by license comment
Jun 6, 2014 at 17:06 vote accept fuxia
Mar 18, 2014 at 20:37 comment added gmazzap Ah ok... I better read the query now, you get all the blog ids for a specific site id, at first read I thougt you get only one blog id at time (the one passed to function)... sure the array way is better. I'm sorry isn't possible +1 again :)
Mar 18, 2014 at 20:21 comment added fuxia @G.M. get_var() returns just one result. I have used get_col() now, and I made sure an empty result is not fetched again.
Mar 18, 2014 at 20:20 history edited fuxia CC BY-SA 3.0
Improved function.
Mar 18, 2014 at 14:07 comment added gmazzap why $wpdb->get_results + wp_list_pluck instead of only (int) $wpdb->get_var? however +1, and I think that something similar should be in core switch_to_blog...
Mar 18, 2014 at 4:14 history answered fuxia CC BY-SA 3.0