Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically activate plugins after installation #40

Closed
GaryJones opened this issue Oct 6, 2011 · 6 comments
Closed

Automatically activate plugins after installation #40

GaryJones opened this issue Oct 6, 2011 · 6 comments
Assignees
Milestone

Comments

@GaryJones
Copy link
Member

Although discussed often, there wasn't a ticket that addressed the automatic activation of a plugin after we'd installed it.

I'm tempted not to check for current_user_can( 'activate_plugins' ) when doing it - this would allow administrators to remove access to the plugins page (or that capability at least), and still allow users on a multisite to install and have activated the required plugins for that theme.

@ghost ghost assigned thomasgriffin Oct 6, 2011
@thomasgriffin
Copy link
Contributor

I'm all for it. Would be nice if we can pull it into the current UI of the Plugin_Installer_Skin class and plugins_api. So after the "Plugin installed successfully" message we could have a "Plugin activated successfully" message.

@thomasgriffin
Copy link
Contributor

Ok, the issue here with activate_plugin is that the plugin is not returning a valid header. I believe this has to do with the plugins cache, but placing wp_cache_flush() before activating the plugin (but after installing it) still is not allowing the plugin to automatically be activated after it is installed.

@thomasgriffin
Copy link
Contributor

Breakthrough!!

@thomasgriffin
Copy link
Contributor

You are going to like the new updates I'm going to push tomorrow :) It is a huge victory for this class - it truly makes it automatic. ;-)

@GaryJones
Copy link
Member Author

Re-opening, so that a few more improvements can be made to the solution - see the notes on the commit.

@thomasgriffin
Copy link
Contributor

I knew there were going to be issues. :) I finally made the breakthrough as I was about to go to bed, so I wanted to go ahead and push something so I wouldn't forget. I'll go in today and make those fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants