[wp-hackers] map function to all sites?

Wei Hsu wei at hyperinkpress.com
Fri Jan 28 21:56:52 UTC 2011


Hi, I'm trying to map a function to apply to all the sites in my multisite
network. Is there a standard way of doing that?

For example, let's say I'm trying to change the theme for all my sites at
once. I'd love to be able to do something like:

foreach (all_sites() as $site) {
     $site->switch_theme('thesis_18', 'thesis_18');
$site->thesis_upgrade();
}

Thanks!

Wei


More information about the wp-hackers mailing list