StreetofWalls
Veteran
Just Getting Started
Member Likes (0)
I need to trigger some actions in response to certain forum activity. For example, when a use's answer gets accepted, I want to add an entry to the user's meta data. I would prefer not to hack the code such we can't apply future updates.

Responses (4)
Inactive (joined February 2012) Likes (0)
Hey @StreetofWalls
Welcome to the Community!
Let me pass this onto our developer, Hakan. He should be able to help you out here :)
Member (joined July 2012) Likes (0)
Great! I've been examining the plugin and I see a lot of do_action hooks before and after printing out questions/answers/etc. So far, I haven't found any that are connected to actions, such as a question getting accepted. Thanks for your help!
Developer (joined February 2012) Likes (0)
Hi,
As Q&A uses custom post types, you can mostly use standard WP actions.
In your case, a post meta update is done for the question of the related answer. You can have a look at votes.php file how plugin saves related post meta (_accepted_answer).
A sample code to be included inside functions.php of your theme:
This sample saves accepted answers separated with a comma.
I hope this helps.
Cheers,
Hakan
Support Kangaroo (joined March 2011) Likes (0)
Greetings StreetofWalls,
We have not heard back from you as to the status of this issue.
If you are still having an issue please let us know so that we may try to get you fixed up as soon as possible by choosing to check mark this ticket as unresolved below and posting any new errors or symptoms you are noticing.
This action will also bring your ticket up front back in plain view again within the ticket system.
Thank you for being a WPMU Dev Community Member!
Cheers, Joe
Become a member