cyberhobo / wordpress-geo-mashup

Official repository for Geo Mashup, the plugin that makes WordPress into a GeoCMS. Documentation:
https://github.com/cyberhobo/wordpress-geo-mashup/wiki/Getting-Started
63 stars 15 forks source link

Custom default settings in multisite #497

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using geomashup so that users can add their location into their profiles 
for my multisites.. However, for each subsite added by users, geomashup needs 
to be set up.. As a superuser I want to set the settings so that the user only 
has to set his location in his profile rather than every user having to change 
the settings before being able to add a location into his profile..

Any idea how to manage this?

Original issue reported on code.google.com by sjoerdko...@gmail.com on 5 Sep 2011 at 5:16

GoogleCodeExporter commented 9 years ago
basically, I want to change the default settings: "Collect Location for Posts & 
Pages" to "Users"... 

Another strange thing I noticed was that several users' locations cannot be 
seen by superadministrator.. I thought this information should be saved 
somewhere..?

Original comment by sjoerdko...@gmail.com on 5 Sep 2011 at 6:47

GoogleCodeExporter commented 9 years ago
What feature would fix this? A set of site-wide default settings that can be 
overridden in individual sites? Do you know a plugin that does this I could use 
as an example?

You might be able to make a simple plugin in mu-plugins that forces the user 
setting with some code like this:

function prefix_geo_mashup_init() {
  global $geo_mashup_options;
  if ( 'true' != $geo_mashup_options->get( 'overall', 'located_object_name', 'user' ) ) {
    $geo_mashup_options->set_valid_options( array( 'overall' => array( 'located_object_name' => array( 'user' => 'true' ) ) ) );
    $geo_mashup_options->save();
  }
}
add_action( 'geo_mashup_init' );

Original comment by dylankk...@gmail.com on 13 Sep 2011 at 1:40

GoogleCodeExporter commented 9 years ago
@Dylan, 
> Do you know a plugin that does this I could use as an example?

Wordpress SEO by Yoast has a great example of Network wide settings, you choose 
a blog id to defult options - I think would work.

BTW Wordpress SEO is another fantastic plugin.. 

Original comment by bco...@gmail.com on 18 Sep 2011 at 11:16

beatelite commented 8 years ago

I second this. It's the only thing keeping me from using it at this point. i hate having to manage the admin screen for every single site on the network. I'd rather do it once and let them override it on an individual basis.