switch_to_blog should always be followed by restore_current_blog
-
In your code, whenever you call switch_to_blog( 123 ), always follow it by a call to restore_current_blog(), before switching again.
I suspect it is the above inconsistency that is breaking compatability with my Broadcast plugin.
- The topic ‘switch_to_blog should always be followed by restore_current_blog’ is closed to new replies.