Integration of premium add-ons with plugins and themes

You can integrate premium add-ons of Shortcodes Ultimate plugin into your premium plugins and themes. Specific instructions for plugins and themes are given below. All integrations are made with TGM Plugin Activation Script. Before the integration of premium add-ons you should buy one license for unlimited number of sites for every plugin or theme. Integration of premium add-ons into free themes and plugins is forbidden.

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

If you want to integrate core-plugin into your plugin or theme please read "Integration of Shortcodes Ultimate core-plugin with plugins and themes" article.

Integration with premium plugins

First of all you should download TGMPA script and copy it to directory of your plugin. In this article we assume you've copied script file in the root of your 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

Then you should download and copy zip-archive with the necessary add-on to directory of your plugin. In this article we assume you've already copied zip- archive with add-on to the root of your plugin directory (without subfolders). Thus, the full path to zip-archive will look like:

/wp-content/plugins/your-plugin-name/shortcodes-ultimate-addon.zip

Use the code specified below in the code of your plugin:

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',
			'is_callable' => 'shortcodes_ultimate',
		),
		array(
			'name'    => 'Shortcodes Ultimate: Add-on',
			// example slug: 'shortcodes-ultimate-extra'
			'slug'    => 'shortcodes-ultimate-addon-slug',
			'version' => '1.5.0',
			'source'  => plugin_dir_path( __FILE__ ) . 'shortcodes-ultimate-addon.zip',
		),
	);

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

	tgmpa( $plugins, $config );

}

Download plugin example

Integration with premium themes

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

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

Then you should download and copy zip-archive with the necessary add-on to directory of your theme. In this article we assume you've already copied zip- archive with add-on to the root of your theme directory (without subfolders). Thus, the full path to zip-archive will look like:

/wp-content/themes/your-theme-name/shortcodes-ultimate-addon.zip

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',
		),
		array(
			'name'    => 'Shortcodes Ultimate: Add-on',
			// example slug: 'shortcodes-ultimate-extra'
			'slug'    => 'shortcodes-ultimate-addon-slug',
			'version' => '1.5.0',
			'source'  => get_stylesheet_directory() . '/shortcodes-ultimate-addon.zip',
		),
	);

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

	tgmpa( $plugins, $config );

}

Download theme example