$value) { if ($key!='kpg_readwrite') { if ($kpg_readwrite) { add_filter('pre_update_option_'.$key,'kpg_global_set',10,2); add_filter('add_option_'.$key,'kpg_global_add',1,2); add_filter('delete_option_'.$key,'kpg_global_delete'); } add_filter('pre_option_'.$key,'kpg_global_get',1); } } } } kpg_global_setup(); // when plugin is loaded this get's done // get a list of options that you want globalized function kpg_global_control() { // I like the name of this function if (!function_exists('switch_to_blog')) { ?>

Global Options

This plugin is only works if your blog has been configured as a network (WPMU) blog.

Global Options

This plugin is working correctly. The options are only available from the Main Blog.

The following global options are set:

$value) { if ($key!='readonly') { echo "$key "; } } echo "

"; return; } /* echo "Current ops
";
	print_r($ops);
	echo "

"; */ // now update the options if they pressed the submit button if (array_key_exists('Submit',$_POST)) { echo "
Updating
"; // pressed submit $fops=$_POST['kpg_option']; $ops=array(); if (!empty($fops)) { // now load up the options foreach ($fops as $j=>$value) { $ops[$value]=$alloptions[$fops[$j]]; } } $kpg_readwrite=$_POST['kpg_readwrite']; if (empty($kpg_readwrite)) { $kpg_readwrite=false; } else { $kpg_readwrite=true; } $ops['kpg_readwrite']=$kpg_readwrite; update_option('kpg_global_options',$ops); /* echo "fixed ops
";
		print_r($ops);
		echo "

"; echo "form ops
";
		print_r($fops);
		echo "

"; */ } // just to make sure $ops=kpg_get_global_option('kpg_global_options'); $alloptions=wp_load_alloptions(); ?>
Globalize Options

/> Check if Blogs can change global settings (beware!)

Check off the options that you would like globalized.

$value) { if (!in_array($key,$noshow)) { $crow++; if ($crow>2) { $crow=0; if ($numlines>0) { echo ""; } else { echo ""; } $numlines++; } $v=$value; if (is_array(maybe_unserialize($value))) $v='--array--'; else if (strlen($v)>24) $v=substr($value,0,24).'...'; ?>
/> []