Installing the TGM Plugin Activation library is easy. Follow the instructions below:
functions.php(or other theme or plugin file) referencing the class file.
tgmpa_register, that registers the plugin and configurations.
For steps 3 and 4, it is strongly recommended you view, copy and paste the contents of the
example.php file which is included in the release package and amend to suit. The
example.php file is a model for how you should include the class in your theme.
Some important things to note:
require_oncecall, make sure to amend the path to the correct location within your theme/plugin.
sourceargument is optional. Otherwise it is required and should point to the absolute path for the plugin zips within your theme, or to a URL for zips elsewhere online.
versionargument for the plugin where the value of that argument is the version number of the new version included.
$configvariable holds an array of arguments that can be used to customize aspects of the class. If you define an absolute
default_pathfor bundled plugins, you do not need to specify the directory path for your bundled plugin within the
sourceargument. You will only need to specify the zip file name.
stringsarray in the
$configvariable if you want to change the text strings. Remove them to use the default TGMPA text strings and translations. If you do add your own text strings, make sure you change the text domain (
theme-slug) to the text domain of your theme or plugin if you didn’t download your package via the Custom TGMPA Generator.
Continue reading about the Configuration options.