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

How to bypass plugin setup UI? #68

Open
kadamwhite opened this issue Jul 14, 2014 · 1 comment
Open

How to bypass plugin setup UI? #68

kadamwhite opened this issue Jul 14, 2014 · 1 comment

Comments

@kadamwhite
Copy link

I'm setting up a VM for a client which installs and enables this plugin when running in a local development environment, and I would like to find a way to bypass having to have them select "Developing a plugin for a self-hosted install" and opting out of the other recommended add-ons. Is this possible? I can see where the code is written in admin_init but I haven't been able to find a way to suppress or pre-fill the options.

@mjangda
Copy link
Member

mjangda commented Jul 15, 2014

It's not super clean, but you could do something along the lines of (untested):

global $automattic_developer;
if ( ! get_option( $automattic_developer::OPTION ) ) {
    add_action( 'admin_init', function() {
        $automattic_developer->save_project_type( 'wporg' );
    }, 1 ); // early hook to run before the Developer plugin
}

PRs welcome to make this a bit cleaner to override :)

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

No branches or pull requests

2 participants