• Resolved mrenoch

    (@mrenoch)


    Hi,

    I am running vvq in a multisite wordpress (3.0+) and I want to customize the default settings that are applied to new blogs upon creation.

    For other plugins I have wanted to customize (without changing their code directly) I have been able to add an action to the wpmu_new_blog event (add_action('wpmu_new_blog',... );), switch to the new blog (switch_to_blog($blog_id);), and update the option (update_option('vvq_options', ...);)

    This doesn’t seem to be working for me with vvq. I think its because of the way vvq is initialized, but I am not sure.

    Can anyone recommend a technique for me to customize the default settings, that are applied to new blogs upon creation?

    Is there an event I can latch onto that will be fired after this plugin is initialized? Or, should I alter the global default settings singleton directly?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor viper007bond

    (@viper007bond)

    The default options are run through a filter called vvq_defaultsettings. Use it. ??

    add_filter( 'vvq_defaultsettings', 'mrenoch_vvq_defaults' );
    
    function mrenoch_vvq_defaults( $defaults ) {
    	$defaults['youtube']['autoplay'] = 1;
    
    	return $defaults;
    }
    Thread Starter mrenoch

    (@mrenoch)

    Works like a charm. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Viper's Video Quicktags] Configuring default settings on multisite blog’ is closed to new replies.