The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Viper's Video Quicktags
[resolved] Configuring default settings on multisite blog (3 posts)

  1. mrenoch
    Posted 5 years ago #


    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?


  2. Alex Mills (Viper007Bond)
    Plugin Author

    Posted 5 years ago #

    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;
  3. mrenoch
    Posted 5 years ago #

    Works like a charm. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic