What hooks are available for the Q&A plugin?

I'm using the Q&A plugin. I am trying to tie in an external gamification system that will register points each time a behavior is performed. In this case, each time a user answers a question, asks a question, and votes on an answer I want to award these users points via my external gamification system. What would the hooks be for Q&A? For a similar listing of general hooks for WP, see http://codex.wordpress.org/Plugin_API/Action_Reference. This is what I'm looking for.

I'm using a Twenty Twelve theme. I realize I can set some points within the Q&A source files, but if I can connect the calls to my external gamification system, I can do a lot more. Thanks,

Tom

Other details: I'm using the Q&A plugin. I have the twenty twelve theme. I'm not receiving an error message. Re goals with this, I want to track points via another system.

  • aristath

    Hello there @tom_johnson and welcome to the WPMU-DEV Community!
    I couldn't find a list of hooks anywhere, so I just went on my terminal, cd'd to the plugin derectory and ran the following: 9I'm on Linux so that kind of stuff is easy)
    grep -R "do_action" .
    This way I got back a list of all the actions that are run in this plugin and that you can take advantage of.
    Here they are:
    TEMPLATES:

    single-question:
    'qa_before_content'
    'qa_before_question_meta'
    'qa_after_question_meta'
    'qa_before_answers'
    'qa_after_answers'
    'qa_before_edit_answer'
    'qa_after_edit_answer'
    'qa_after_content'

    edit-question:
    'qa_before_content'
    'qa_after_content'

    user-question:
    'qa_before_content'
    'qa_before_question_loop'
    'qa_before_question'
    'qa_before_question_stats'
    'qa_after_question_stats'
    'qa_before_question_summary'
    'qa_after_question_summary'
    'qa_after_question'
    'qa_after_question_loop'
    'qa_after_content'

    edit-answer:
    'qa_before_content'
    'qa_after_content'

    archive-question:
    'qa_before_content'
    'qa_before_question_loop'
    'qa_before_question'
    'qa_before_question_stats'
    'qa_after_question_stats'
    'qa_before_question_summary'
    'qa_after_question_summary'
    'qa_after_question'
    'qa_after_question_loop'
    'qa_after_content'

    ask-question:
    'qa_before_content'
    'qa_after_content'

    OTHER:
    edit:

    'qa_new_answer_published'
    'qa_new_question_published'

    admin:
    'handle_module_admin_requests'

    core:
    'qa_reported'

    widgets:
    'qa_reputation_widget_before'
    'qa_reputation_widget_after'

    template-tags:
    'qa_before_answer_content'
    'qa_before_answer_meta'
    'qa_after_answer_meta'

    navigation:
    'render_admin_navigation_tabs'
    'render_admin_navigation_subs'

    Most (if not all) of them are there to handle templating and make theming easier for developers.
    Hwever, you can introduce your own actions wherever you want in the plugin codebase by adding a line like the following:
    <?php do_action( 'my_custom_hook' ); ?>
    This way you'll be able to maximize the plugin's modularity and do whatever you want with it.

    I hope that helps!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.