Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Customise the rendered HTML of the review.
- * In this example, we are modifying the review response HTML.
- * Paste this in your active theme's functions.php file.
- *
- * @param array $fields
- * @param \GeminiLabs\SiteReviews\Review $review
- * @return void
- */
- add_filter( 'site-reviews/review/build/after', function( $fields, $review ) {
- if( !empty( $review->response )) {
- // Here we are only changing the response heading:
- $customHtml = '<h3>We Said:</h3>';
- $fields['response'] = preg_replace( '(<p><strong>Response(.+)</strong></p>)', $customHtml, $fields['response'] );
- }
- return $fields;
- }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement