Skip to content

Instantly share code, notes, and snippets.

@jreviews
Created November 14, 2019 00:17
Show Gist options
  • Save jreviews/de49ab6aa3dee3b875fdbbdd573f8a7c to your computer and use it in GitHub Desktop.
Save jreviews/de49ab6aa3dee3b875fdbbdd573f8a7c to your computer and use it in GitHub Desktop.
JReviews banner custom field PHP Format to output Claim and Write Review button
if ( defined('MVC_FRAMEWORK_ADMIN') ) return false;
$listingHelper = ClassRegistry::getClass('ListingHelperHelper');
$routesHelper = ClassRegistry::getClass('RoutesHelper');
ob_start();
$claim = $listingHelper->claim($entry);
$claimButton = ob_get_clean();
$reviewButton = $routesHelper->content(__t("Write review",true),$entry,['class'=>'jrButton jrSmall','rel'=>'nofollow'],'reviewForm');
return $claimButton . $reviewButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment