Go to main content

If plugin




The if_plugin tag is a conditional tag and always used as an opening and closing pair, like this…

    …conditional statement…

The tag will execute the contained statements if the name attribute matches a currently installed and enabled plugin, and the current version number is equal to or greater than the version attribute assigned (if used).


Tag will accept the following attributes (case-sensitive) as well as the global attributes :

Plugin name as defined on the Plugins panel.
Minimum plugin version number.
Default: unset.


Example 1: Check plugin exists before using a tag

<txp:if_plugin name="com_connect" version="4.6">
    <txp:com_connect to="recipient@example.com" />

Applies the tag <txp:com_connect /> if the ‘com_connect’ plugin is installed, activated, and the version number is equal to or greater than 4.6. Version numbering supports semantic versioning, for example…


…means equal to or greater than version 4.6 (i.e. 4.6.1, 4.7, 5).


Version 4.3.0

ver attribute deprecated and renamed version.

If you notice any kind of problem with this page's construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)