Skip to content

Commit

Permalink
Added Plugin Auto-install
Browse files Browse the repository at this point in the history
tgmpa_register
  • Loading branch information
simplethemes committed Feb 24, 2014
1 parent eb30456 commit cc07f09
Show file tree
Hide file tree
Showing 2 changed files with 2,126 additions and 0 deletions.
40 changes: 40 additions & 0 deletions smpl-skeleton/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,43 @@ function skeleton_scripts() {

}

/*-----------------------------------------------------------------------------------*/
/* TGM plugin activation
/*-----------------------------------------------------------------------------------*/

if ( ! function_exists( 'smpl_recommended_plugins' ) ) {

function smpl_recommended_plugins() {

$plugins = array(
array(
'name' => 'Regenerate Thumbnails',
'slug' => 'regenerate-thumbnails',
'required' => false,
'force_activation' => false,
'force_deactivation'=> false,
),
array(
'name' => 'WP-PageNavi',
'slug' => 'wp-pagenavi',
'required' => false,
'force_activation' => false,
'force_deactivation'=> false,
),
array(
'name' => 'Simple Shortcodes',
'slug' => 'smpl-shortcodes',
'required' => true,
'force_activation' => false,
'force_deactivation'=> false,
)
);
tgmpa( $plugins );
}
}
add_action( 'tgmpa_register', 'smpl_recommended_plugins' );



/** Tell WordPress to run skeleton_setup() when the 'after_setup_theme' hook is run. */

Expand Down Expand Up @@ -167,6 +204,9 @@ function skeleton_setup() {
'footer' => __( 'Footer Navigation', 'smpl' )
));

// Load TGM plugin activation
load_template( get_template_directory() . '/inc/class-tgm-plugin-activation.php' );

// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'smpl', get_template_directory() . '/languages' );

Expand Down
Loading

0 comments on commit cc07f09

Please sign in to comment.