WordPress plugin for activating other plugins

Hi iam developing a plugin to activated a couple of plugins. i.e: the plugin jetpack has six plugins and all gets activated on a single install,like wise i need to activate a group of plugins from acivating this plugin.

for example consider a plugin called ‘site plugin’ which has sub folders of other plugins.
when i activate ‘site plugin’ it should show options to activate other plugins in it.

Read More

I hope some one could help me.

Related posts

Leave a Reply

1 comment

  1. You’re main pluggin can use register_activation_hook and use the function you register thru the hook to activate you’re necesary pluggins.

    Smth along these lines :

        // get already activated plugins
        $plugins = get_option('active_plugins');
        $puginsToActiv = array('Plugin1', 'Plugin2', 'Plugin3');
        if($plugins)
        {
            $changed = false;
            foreach ($puginsTostActiv as $plugin)
            {
                if (!in_array($plugin, $plugins))
                {
                    $changed = true;
                    array_push($plugins,$plugin);
                }
            }
    
            if ( $changed )
                update_option('active_plugins',$plugins);
        }
    // code not tested