Difference between revisions of "JReviews WordPress action hooks for use in WordPress plugins"
From JReviews Documentation
Line 15: | Line 15: | ||
*jreviews_review_vote_no | *jreviews_review_vote_no | ||
+ | The first parameter is the object id. The second parameter is an array with useful info related to the object. For example, you can use this in your WordPress plugin to execute an action after a new review has been submitted. | ||
− | + | ||
+ | <source lang="php"> | ||
+ | function new_review($review_id, $data) { | ||
+ | // Your action logic goes here. The $data array contains more information about the listing and the review. | ||
+ | } | ||
+ | |||
+ | |||
+ | add_action( 'jreviews_review_new', 'new_review'); | ||
+ | </source> |
Revision as of 13:46, 14 October 2014
List of available actions
- jreviews_review_comment_delete
- jreviews_review_comment_new
- jreviews_favorite_add
- jreviews_favorite_remove
- jreviews_listing_delete
- jreviews_listing_new
- jreviews_media_like_yes
- jreviews_media_like_no
- jreviews_media_upload
- jreviews_review_delete
- jreviews_review_new
- jreviews_review_vote_yes
- jreviews_review_vote_no
The first parameter is the object id. The second parameter is an array with useful info related to the object. For example, you can use this in your WordPress plugin to execute an action after a new review has been submitted.
function new_review($review_id, $data) { // Your action logic goes here. The $data array contains more information about the listing and the review. } add_action( 'jreviews_review_new', 'new_review');