Support » Plugin: Achievements for WordPress » How can i add more events

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Paul Gibbs


    Hi there; thanks!

    If you’re a PHP developer, and understand how WordPress actions and filters work, I can give you some pointers how to get started.

    Well hit it 🙂
    I need this like … air.
    Thx for being so quick 😀

    Plugin Author Paul Gibbs


    Achievement event types are basically WordPress actions. Specifically, identify a do_action() that occurs where you want an achievement event.

    Then, take a look in /includes/extensions/inviteanyone.php as an example. You’ll need to duplicate this class, rename all the functions etc, and load it as a custom plugin like this:

    function mg_achievements_init() {
      require 'the_class.php';
    add_action( 'dpa_init', 'mg_achievements_init' );

    In your class, in the constructor, you’ll see an array of strings assigned to $this->actions. That’s where you insert your custom action(s) that you found earlier.

    It should be as straightforward than that. If you want to capture post type-specific actions (i.e. draft_to_publish, or others like that), the wordpress.php is a good example.

    Plugin Author Paul Gibbs


    thx, i’ll get busy 🙂

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How can i add more events’ is closed to new replies.