JReviews WordPress action hooks for use in WordPress plugins

From JReviews Documentation
Revision as of 02:31, 16 October 2014 by Jreviews (Talk | contribs)

Jump to: navigation, search

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');