Skip Navigation

[Resolved] Check if Toolset plugin is installed and active

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user wanted to check if our toolset plugin is installed.

Solution:

Toolset isn't a single plugin but a group of plugins, so you are not able to check if Toolset is installed, however you can check if any of our plugins are installed.

To do this you will need to use the code below.

if ( is_plugin_active( 'types/wpcf.php' ) ) {
add_action( 'wp_before_admin_bar_render', 'my_custom_function' );
}

The above code checks if our Types plugin is active.

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Paul Marconi 4 years ago.

Assisted by: Shane.

Author
Posts
#1931957

Hi,

We would like to know how to detect if the Toolset plugin is installed and active. We would like to add in an action hook (in functions.php) if this plugin is installed and active.

Below is my example for Yoast seo to detect if the plugin is active.
Would like to know if it's similar to the code below and what should be inside the is_plugin_active('what is inside here ') parentheses.

My code for yoast seo:
if ( is_plugin_active( 'wordpress-seo/wp-seo.php' ) ) {
add_action( 'wp_before_admin_bar_render', 'my_custom_function' );
}

Thank you, Rose

#1932299

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Thank you for getting in touch.

Toolset consists of several plugins, which plugin from our Toolset package do you want to check if it is active? However generally the code would be this for our Types plugin.

if ( is_plugin_active( 'types/wpcf.php' ) ) {
add_action( 'wp_before_admin_bar_render', 'my_custom_function' );
}

Thanks,
Shane

#1934147

Thank you Shane!

Mainly for Types and View plugins. Is the top one you provided for 'Toolset Types'?

Thanks!

#1934167

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

Yes this is for Types,

For views it would be.


if ( is_plugin_active( 'wp-views/wp-views.php' ) ) {
add_action( 'wp_before_admin_bar_render', 'my_custom_function' );
}

Thanks,
Shane

#1935555

My issue is resolved now. Thank you!