This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

TGM Plugin Activation

  • Creator
  • #14234
    Andre Goersch

    I was curious as to how does Jumpstart displayed notifications asking us to install other plugins, and I found out that it uses the TGM Plugin Activation library. I’m not very familiar with it, but it seems that it could be quite helpful.

    My main question is: if I want to use this with my child theme, with additional plugins being required/recommended, do I need to add the library from scratch, or is there a simple way to just reuse the one added for JumpStart itself? Could you post an example code of how to use it?


Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #14250
    Jason Bobich

    Hello Andre,

    See the themeblvd_tgm_register() function in /framework/admin/plugins/plugins.php. You’ll see there’s an array of plugins that get passed into the TGM class, and of course we’ve put a filter on it. The filter is called “themeblvd_plugins” —

    You’re just modifying that array with the filter. Here’s an example of how you might add a plugin:

    function my_plugins( $plugins ) {
    	$plugins[] = array(
    		'name'		=> 'Example Plugin',
    		'slug'		=> 'example', // This needs to match slug on
    		'required'	=> false
    	return $plugins;
    add_filter( 'themeblvd_plugins', 'my_plugins' );
    Andre Goersch

    That works perfectly. Thanks.

    Another nice piece of information that would be great to have on the official docs. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.