Closed dingo-d closed 8 years ago
Not sure I understand what you're asking. You can use the 'is_automatic' or 'force_activation' configuration settings to auto activate plugins once installed. See http://tgmpluginactivation.com/configuration/
is_automatic
only makes the pop up: the theme requires this plugin
appear. I haven't tried setting force_activation
to true
. Will try that.
I am asking because I'd like to automate the plugin activation process in less steps.
EDIT
I've set the force_activation => true
, but it also just makes the pop up appear.
CLARIFICATION
I'd like to execute automatic plugin install say on after_setup_theme
hook.
@dingo-d Both the options I pointed to do more than that.
Your original question was about auto-activation, which can be done with the options I mentioned.
Your current question seems to be about auto-installing. This is not supported by TGMPA by design. See #242 #279.
Also realize that if you adjust something in TGMPA, this may affect other plugins/themes too. WP will use the first instance of the TGMPA class it encounters and bundle the input from various plugins/themes using it into one installation page, so you may end up inadvertently installing plugins for other plugins/themes using TGMPA, not just your own.
Yeah, that would be kind of problematic :\ I guess I'll have to find another way of achieving this. Well thanks for the answers :)
Is it possible to create a 'one click' plugin install with TGM plugin? Does it have some kind of hook I can use to automatically execute the activation of required plugins for my theme?
Can I use
tgmpa_load_bulk_installer()
for this?