Integration of Shortcodes Ultimate core-plugin with plugins and themes

You can integrate core-plugin Shortcodes Ultimate in both premium and free plugins and themes. Specific instructions for plugins and themes are given below. All integrations are made with TGM Plugin Activation Script.

You can download TGMPA script from official site. On this page you can find information on additional script settings.

If you want to integrate one of premium add-ons in your plugin or theme please read " Integration of premium add-ons with plugins and themes" article.

Integration with plugins

At first you should download TGMPA script and copy it to directory of your plugin. In this article we assume you've already copied script file to the root of plugin directory (without subfolders). Thus, the full path to script file will look like:

/wp-content/plugins/your-plugin-name/class-tgm-plugin-activation.php

Use the code specified below in your plugin code:

require_once plugin_dir_path( __FILE__ ) . 'class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'my_plugin_register_required_plugins' );

function my_plugin_register_required_plugins() {

	$plugins = array(
		array(
			'name'    => 'Shortcodes Ultimate',
			'slug'    => 'shortcodes-ultimate',
			'version' => '4.9.9',
		),
	);

	// http://tgmpluginactivation.com/configuration/#h-plugin-parameters
	$config = array(
		'id' => 'my_plugin',
	);

	tgmpa( $plugins, $config );

}

Download plugin example

Integration with themes

At first you should download TGMPA script and copy it to directory of your plugin. In this article we assume you've already copied script file to the root of plugin directory (without subfolders). Thus, the full path to script file will look like:

/wp-content/themes/your-theme-name/class-tgm-plugin-activation.php

Use the code specified below in functions.php file of your theme:

require_once get_stylesheet_directory() . '/class-tgm-plugin-activation.php';

add_action( 'tgmpa_register', 'my_theme_register_required_plugins' );

function my_theme_register_required_plugins() {

	$plugins = array(
		array(
			'name'        => 'Shortcodes Ultimate',
			'slug'        => 'shortcodes-ultimate',
			'version'     => '4.9.9',
			'is_callable' => 'shortcodes_ultimate',
		),
	);

	// http://tgmpluginactivation.com/configuration/#h-plugin-parameters
	$config = array(
		'id' => 'my_theme',
	);

	tgmpa( $plugins, $config );

}

Download theme example