Skip to content

Instantly share code, notes, and snippets.

@seothemes
Created February 20, 2020 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seothemes/3e31817793a52058de34a1fd07892553 to your computer and use it in GitHub Desktop.
Save seothemes/3e31817793a52058de34a1fd07892553 to your computer and use it in GitHub Desktop.
Auto install plugins with Genesis
<?php
add_action( 'after_switch_theme', 'startup_install_plugins' );
/**
* Install plugin dependencies.
*
* @since 1.2.0
*
* @return void
*/
function startup_install_plugins() {
$plugins = genesis_get_config( 'plugins' );
foreach ($plugins as $count => $plugin ) {
genesis_onboarding_install_dependencies( $plugins, $count );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment