How To Perform An Action Only If Certain Plugin Is Active In ClipBucket

Sometimes you want to treat users differently when certain plugin is installed but that plugin has no options to do so. If that is the case, you don’t need to worry because it is fairly easy to do this simple task in couple of lines of code.

Step 1:

Pick the plugin for which you want to do that action. Open plugin folder and then open plugin_name.php file which is the main file that holds details about plugin such as plugin name, author and so on. In that file spot the main function of that plugin. In most cases it is the function for which anchor is being registered.

Step 2:

Now open the file where you want to perfrom a certain action such as index.html for main page andwatch_videos.html for videos page.

Step 3:

Now perform your action like this.

{if function_exists('function_name_here')}
// here goes your action code

Step 4:

Save it and you are done. Now every time that plugin is installed and active, this action will fire away.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)