Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbpress plugin: register_activation_hook

  • @federicotallone

    Member

    Hello,

    I’m developing a bbpress plugin and I have a task to execute on plugin activation.

    I’ve seen that the bb_register_activation_hook functions is deprecated, while i can found the definition of the wp function: register_activation_hook.

    however when i use this function inside a plugin, the function cannot be found.

    What do I have to do?

    here is the code:

    <?php

    /*

    Plugin Name:XXX

    Description:XXX

    Version 1.0

    */

    register_activation_hook(__FILE__, ‘mp_activation’);

    register_deactivation_hook(__FILE__, ‘mp_deactivation’);

    function mp_activation() {

    }

    function mp_deactivation() {

    }

    ?>

Viewing 1 replies (of 1 total)
  • @kawauso

    Member

    By the looks of it, it’s an action that’s called as bb_deactivate_plugin_$plugin, so the action hook’s name is specific to the plugin. The $plugin value is shown in the URL for activating a specific plugin.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar