deRegisterHooks (function)

Last updated: Mon, Apr 17, 2023 7:24 am
Return to Knowledgebase

Purpose

Used to disable all hooks registered by a specific plugin.

Location

users/helpers/us_helpers.php

Parameters

# Parameter Data Type Required Description
1 $plugin_name string Yes A string representing the name of the plugin whose hooks should be disabled.

Returns

Data Type Description of Returned Data
nothing

Further Documentation:

The deRegisterHooks function in UserSpice is used to disable all hooks registered by a specific plugin. Here's the documentation for this function:


function deRegisterHooks($plugin_name)


Example Usage:

Suppose you have a plugin named "my_plugin" and you want to disable all hooks registered by it. You can call the deRegisterHooks function like this:


deRegisterHooks('my_plugin');


This will disable all hooks registered by the "my_plugin" plugin in the us_plugin_hooks table in the UserSpice database.