Hooks
Hooks allow you to modify and extend the functionality of JReviews without having to modify existing code.
Below you can find a growing list of existing action and filter hooks. Before you get started with hooks, make sure to read the developers documentation, and specifically the section on using hooks.
Asset Manager
-
jreviews:admin_route_matched:{:name}Route-specific action that fires when a JReviews admin route is matched. The route name has dots converted to underscores (e.g., 'listings.index' becomes 'listings_index'). Useful for conditionally loading admin assets or performing actions based on the current admin route.
-
jreviews:route_matched:{:name}Route-specific action that fires when a JReviews frontend route is matched. The route name has dots converted to underscores (e.g., 'listing.detail' becomes 'listing_detail'). Useful for conditionally loading assets or performing actions based on the current route.
Claims
-
jreviews:permission:listing.claimFilters whether a user has permission to claim a listing.code examples
-
jreviews:listing_claim_form.validationFires during listing claim form validation. Use `$validator->after()` callback to add custom validation rules to the claim submission.
-
jreviews:listing_claim_form.bottomFires at the bottom of the listing claim modal form. Use for adding custom fields or content. Output is captured via output buffering.
Comment Discussion Permissions
-
jreviews:permission:comment_discussion.createFilters whether a user has permission to create a new discussion post on a review.
-
jreviews:permission:comment_discussion.updateFilters whether a user has permission to update/edit a discussion post.
-
jreviews:permission:comment_discussion.allows_html_in_comment_discussionFilters whether HTML content is allowed in review discussion posts.
-
jreviews:permission:comment_discussion.autopublishFilters whether a user's discussion posts should be automatically published without moderation.code examples
-
jreviews:permission:comment_discussion.deleteFilters whether a user has permission to delete a discussion post.
Comment Permissions
-
jreviews:permission:comment.createFilters whether a user has permission to create a comment (either user comment or editorial comment).
-
jreviews:permission:comment.create_user_commentFilters whether a user has permission to submit a user review/comment.
-
jreviews:permission:comment.create_editorial_commentFilters whether a user has permission to submit an editorial/editor review.
-
jreviews:permission:comment.update_user_commentFilters whether a user has permission to update a comment (user or editorial).
-
jreviews:permission:comment.update_editorial_commentFilters whether a user has permission to update a comment (user or editorial).
-
jreviews:permission:comment.updateFilters whether a user has permission to update a comment (user or editorial).
-
jreviews:permission:comment.voteFilters whether a user has permission to vote (helpful/not helpful) on a comment.
-
jreviews:permission:comment.see_vote_widgetFilters whether the voting widget should be displayed for a comment.
-
jreviews:permission:comment.allows_html_in_commentFilters whether HTML content is allowed in comment text.
-
jreviews:permission:comment.autopublishFilters whether a user's comments should be automatically published without moderation.
-
jreviews:permission:comment.deleteFilters whether a user has permission to delete a comment.
-
jreviews:permission:comment.access_upload_formFilters whether a user has permission to access the media upload form for comments.
-
jreviews:permission:comment.media.autopublishFilters whether a user's media uploads to comments should be automatically published without moderation.
-
jreviews:permission:comment.manage_mediaFilters whether a user has permission to manage (edit, delete, publish) comment media.
-
jreviews:permission:comment.upload_mediaFilters whether a user has permission to upload media to comments by specifying the allowed media type.
-
jreviews:permission:comment.url_media_uploadFilters whether a user has permission to upload media to comments by providing a URL.
-
jreviews:permission:comment.link_videoFilters whether a user has permission to link videos from external sites (YouTube, Vimeo, etc.) to comments.
Custom Fields
-
jreviews:listing_form.custom_fieldsFilters the collection of custom fields displayed in the listing submission/edit form, allowing add-ons to show or hide specific fields based on custom logic (e.g., pricing plans, user roles, listing state).code examples
-
jreviews:listing_form.custom_fields:{:name}Filters the collection of custom fields displayed in the listing submission/edit form, allowing add-ons to show or hide specific fields based on custom logic (e.g., pricing plans, user roles, listing state).code examples
-
jreviews:custom_field.output:{:name}Field-specific filter that fires for individual custom fields after the generic filter. Allows modifying output, hiding fields, or customizing display for specific fields. Returning false or null hides the field.code examples
Events Calendar
Field Permissions
-
jreviews:permission:field.readFilters whether a user has permission to view a custom field's output in listing or review detail pages.code examples
-
jreviews:permission:field.writeFilters whether a user has permission to see and edit a custom field in listing/review submit and edit forms.code examples
-
jreviews:permission:field.searchFilters whether a user has permission to use a custom field as a search filter in advanced search forms.
Inquiries
-
jreviews:permission:listing.inquireFilters whether a user has permission to send an inquiry about a listing.
-
jreviews:listing_inquiry_form.validationFires during listing inquiry form validation. Use `$validator->after()` callback to add custom validation rules to the inquiry submission.
-
jreviews:listing_inquiry_form.bottomFires at the bottom of the listing inquiry modal form. Use for adding custom fields or content. Output is captured via output buffering.
Listing Detail
Listing Permissions
-
jreviews:permission:listing.createFilters whether a user has permission to create a new listing. Return false to deny permission.code examples
-
jreviews:permission:listing.updateFilters whether a user has permission to update/edit an existing listing. Return false to deny permission.
-
jreviews:permission:listing.preview_draftFilters whether a user has permission to preview a draft listing before it's published. Return false to deny permission.
-
jreviews:permission:listing.update_listing_mediaFilters whether a user has permission to update/edit media for an existing listing. Return false to deny permission.code examples
-
jreviews:permission:listing.set_listing_titleFilters whether a user has permission to manually set a listing title. When automated title format is configured, this controls if the user can override it.
-
jreviews:permission:listing.set_listing_title_aliasFilters whether a user has permission to manually set a listing title alias (URL slug). Typically restricted to editors and admin users.
-
jreviews:permission:listing.set_listing_publication_dateFilters whether a user has permission to manually set a listing publication date. Controls when the listing becomes publicly visible.
-
jreviews:permission:listing.set_listing_expiration_dateFilters whether a user has permission to manually set a listing expiration date. Controls when the listing automatically becomes unpublished.
-
jreviews:permission:listing.allows_html_in_summary_descriptionFilters whether a user has permission to include HTML in listing summary and description fields. Controls access to WYSIWYG editor.
-
jreviews:permission:listing.modify_metadata_fieldsFilters whether a user has permission to modify SEO metadata fields (meta description and keywords) for listings.
-
jreviews:permission:listing.autopublishFilters whether a user's listing should be automatically published or require moderation. Fires for both new listings and edits to existing listings.
-
jreviews:permission:listing.deleteFilters whether a user has permission to delete a listing. Typically restricted to editors and listing owners.
-
jreviews:permission:listing.publishFilters whether a user has permission to change a listing's published status. Controls access to publish/unpublish actions.
-
jreviews:permission:listing.featureFilters whether a user has permission to mark listings as featured. Controls access to the feature/unfeature action.
-
jreviews:permission:listing.set_main_mediaFilters whether a user has permission to toggle the listing main media.
-
jreviews:permission:listing.manage_mediaFilters whether a user has permission to manage (edit, delete, publish) listing media.
-
jreviews:permission:listing.upload_mediaFilters whether a user has permission to upload media to listings by specifying the allowed media type.
-
jreviews:permission:listing.url_media_uploadFilters whether a user has permission to upload media to listings by providing a URL.
-
jreviews:permission:listing.link_videoFilters whether a user has permission to link videos from external sites (YouTube, Vimeo, etc.).
-
jreviews:permission:listing.media.autopublishFilters whether a user's media uploads should be automatically published without moderation.
-
jreviews:permission:listing.favoriteFilters whether a user has permission to use the favorites feature.
Listing Resources
-
listingresources:permission:resource.createAllows filtering whether a user can create a resource for a listing. Resources allow adding downloadable files, documents, videos, or links to listings.
-
listingresources:permission:resource.updateAllows filtering whether a user can update an existing resource. By default, editors and resource owners in allowed groups can update.
-
listingresources:permission:resource.deleteAllows filtering whether a user can delete a resource. By default, editors and resource owners in allowed groups can delete.
-
listingresources:permission:resource.autopublishAllows filtering whether a user's resources are automatically published or require moderation. By default based on the moderate_resource configuration setting.
-
listingresources:resource_form.bottomAllows adding custom HTML content at the bottom of the ListingResources resource form (create/edit). Use output buffering with `ob_start()` to capture content. Useful for adding custom fields, messages, or form elements.
-
listingresources:resource_form.validationFires during ListingResources resource form validation (resource creation/editing). Use `$validator->after()` callback to add custom validation rules beyond the default field validations.
Listings
-
jreviews:listing_form.validationAllows adding custom validation rules to the listing submission form validator.code examples
-
jreviews:listing.create_complete_viewAllows addons to return custom HTML or a callable for the listing creation completion view. If a value is returned, it replaces the default success message. Useful for addons that need custom post-creation workflows or messaging.
-
jreviews:listing.update_complete_viewAllows addons to return custom HTML or a callable for the listing update completion view. If a value is returned, it replaces the default success message. Useful for addons that need custom post-update workflows or messaging.
-
jreviews:listing.data_before_saveAllows filtering and modifying listing data array before it's saved to database. Useful for automated data processing, calculations, and field dependencies.code examples
-
jreviews:listing.below-fields
-
jreviews:listing.below-description
-
jreviews:listing.below-bottommedia
-
jreviews:listing.below-editorreviews
-
jreviews:listing.below-userreviews
-
jreviews:listing.bypass-render.wordpress
-
jreviews:listing.bypass-render.joomla@package JReviews
Media
-
jreviews:validation_rules:listing.url_media_uploadFilters validation rules when users upload media files from remote URLs to listings. Allows adding custom validation rules beyond the default file type, size, and URL format checks.
-
jreviews:validation_rules:comment.url_media_uploadFilters validation rules when users upload media files from remote URLs to comments. Allows adding custom validation rules beyond the default file type, size, and URL format checks.
-
jreviews:validation_rules:listing.temporary_media_uploadFilters validation rules when users upload media files (images, videos, audio, documents) to listings. Allows adding custom validation rules beyond the default file type and size checks.
-
jreviews:validation_rules:comment.temporary_media_uploadFilters validation rules when users upload media files (images, videos, audio, documents) to comments. Allows adding custom validation rules beyond the default file type and size checks.
-
jreviews:listing_uploader.bottomFires at the bottom of the dedicated listing media uploader form. Use for adding custom fields or content.
-
jreviews:media.data_before_saveAllows filtering and modifying media data array before it's saved to database. Useful for automated media processing and metadata manipulation.code examples
Media Permissions
-
jreviews:permission:media.downloadFilters whether a user has permission to download a media file.
-
jreviews:permission:media.publishFilters whether a user has permission to publish media (make it visible to the public).
-
jreviews:permission:media.deleteFilters whether a user has permission to delete media.
-
jreviews:permission:media.set_main_mediaFilters whether a user has permission to set a media item as the main listing image.
-
jreviews:permission:media.set_media_functionFilters whether a user has permission to set media function as cover photo or logo.
Meta Tags
-
jreviews:page_meta:{:name}Filters the content of specific page meta tags (title, description, keywords, canonical_url, og: , twitter: , etc.). This hook fires for each meta tag type individually, allowing targeted customization based on the meta tag name. Use this when you need to modify a specific meta tag rather than applying logic to all tags.code examples
-
jreviews:page_meta:canonical_url
MyLists
-
mylists:permission:list.create_user_listFilters whether a user has permission to create a user list (MyList) for a specific listing.
-
mylists:permission:list.updateFilters whether a user has permission to update/edit a MyList (user list or site list).
-
mylists:permission:list.deleteFilters whether a user has permission to delete a MyList (user list or site list).
-
mylists:permission:list.manage_listingsFilters whether a user has permission to add or remove listings from a MyList.
-
mylists:permission:list.publishFilters whether a user has permission to publish a user list (make it visible to the public).
-
mylists:permission:list.make_privateFilters whether a user has permission to make a MyList private (visible only to the owner).
-
mylists:permission:list.autopublishFilters whether a user's MyLists should be automatically published without moderation.
-
mylists:list_form.validationFires during MyList form validation (user list creation/editing). Use `$validator->after()` callback to add custom validation rules.
-
mylists:list_form.bottom
Other
-
jreviews-cp:layouts.listFilters the available listing list layout options shown in Control Panel dropdowns. Allows addons to add custom layout options.
-
jreviews:listing:before_render
-
jreviews:validation_rules:listing.link_video_uploadFilters validation rules when users link videos from external platforms (YouTube, Vimeo, etc.) to listings. Allows adding custom validation rules beyond the default checks.
-
jreviews:validation_rules:comment.link_video_uploadFilters validation rules when users link videos from external platforms (YouTube, Vimeo, etc.) to comments. Allows adding custom validation rules beyond the default checks.
-
jreviews:comment_form.before_field:
-
jreviews:comment_form.after_field:
-
jreviews:comment_form.before_comment
-
jreviews:comment_form.bottom
-
jreviews:listing_form.top
-
jreviews:listing_form.before_field:
-
jreviews:listing_form.after_field:
-
jreviews:listing_form.bottom
-
jreviews-cp:browse-listings.after-category
-
jreviews:category.bypass-render.joomlaRe-write JReviews category URLs to native Joomla category URLs
-
import:listing.data_before_saveFilters listing data during CSV import before saving to database. Custom fields are in $data['fields'] as arrays (converted from asterisk format). Standard fields are at root level. Must return data with same structure.
Owner Replies
-
jreviews:permission:comment.reply_as_ownerFilters whether a user has permission to reply to a comment as the listing owner.
-
jreviews:permission:comment.owner_reply.autopublishFilters whether a user's owner replies should be automatically published without moderation.
-
jreviews:comment_owner_reply_form.validationFires during owner reply form validation. Use `$validator->after()` callback to add custom validation rules.
-
jreviews:comment_owner_reply_form.bottomFires at the bottom of owner reply modal form. Use for adding custom fields or content.
Reports
-
jreviews:permission:media.reportFilters whether a user has permission to report media as inappropriate.
-
jreviews:permission:media.likeFilters whether a user has permission to like/favorite media.
-
jreviews:permission:comment.reportFilters whether a user has permission to report a comment as inappropriate.
-
jreviews:permission:comment.see_comments_fieldFilters whether the comments/review text field should be visible in forms.
-
jreviews:comment_report_form.validationFires during comment report form validation. Use `$validator->after()` callback to add custom validation rules.
-
jreviews:comment_report_form.bottomFires at the bottom of comment report modal form. Use for adding custom fields or content.
-
jreviews:media_report_form.validationFires during media report form validation. Use `$validator->after()` callback to add custom validation rules.
-
jreviews:media_report_form.bottomFires at the bottom of media report modal form. Use for adding custom fields or content.