I just downloaded Broadcast MU Version 1.1.1. This great plugin allows you to have the same post on multiple blogs in your Wordpress MU environment.
If you install it, do not forget to deactivate ‘post revisions’. Your wp-config.php needs
define('WP_POST_REVISIONS', false);.
However, in edit mode and while submitting the post there are some errors and warnings like
Warning: Invalid argument supplied for foreach() in pathtoyourdomain/wp-content/mu-plugins/broadcast-mu.php on line 160
This error comes from the php engine. It is typical if you are using a non-array as an array.
Solution:
1) Search for ‘foreach ($_POST['blog'] as $key => $value) {‘
on line 160 you will find
foreach ($_POST['blog'] as $key => $value) {
$output[] = $key;
}
replace it with
if (is_array($_POST['blog']))
{
foreach ($_POST['blog'] as $key => $value) {
$output[] = $key;
}
}
2) Search for ‘$in = array_search($blog['userblog_id'], $output);’
you will find
foreach ($users_blogs as $blog) {
$in = array_search($blog['userblog_id'], $output);
if (is_int($in)) {
switch_to_blog($blog['userblog_id']);
if (current_user_can('publish_posts')) do_action('save_post', wp_insert_post($new_post));
}
}
replace it with
foreach ($users_blogs as $blog) {
if (is_array($output))
{
$in = array_search($blog['userblog_id'], $output);
if (is_int($in)) {
switch_to_blog($blog['userblog_id']);
if (current_user_can('publish_posts')) do_action('save_post', wp_insert_post($new_post));
}
}
}
Now the errors and warnings from Broadcast MU are away, hopefully.