markjgwilliam
Forum Replies Created
-
Forum: Plugins
In reply to: [Site Reviews] Include assigned post in email reply?Thanks so much !!
Forum: Plugins
In reply to: [Site Reviews] Include assigned post in email reply?Hi – I am asked to enter a password when clicking on the link just provided?
Forum: Plugins
In reply to: [Site Reviews] Include assigned post in email reply?<?php /** * Send an email notification to the review author after responding to a review * This snippet assumes that your review form includes the email field * Paste this code in your theme's functions.php file. * @param \GeminiLabs\SiteReviews\Review $review * @param string $response * @return void */ add_action('site-reviews/review/responded', function ($review, $response) { $hasResponse = !empty($review->response(1)); $hasResponseUserId = !empty(get_post_meta($review->ID, '_response_by', true)); if (empty($response) || $hasResponse || $hasResponseUserId) { return; // only send an email if the response is not empty and there is no previous response } $posturl = $review->assigned_posts($review->ID); //return URL of post $wbpermalink = '<html><Head></Head><Body>Letting you know we have posted a reply to your review at<a href="' .$posturl. '"My Website</Body></html>';//MG $email = glsr('Modules\Email')->compose([ 'to' => $review->email, 'subject' => '[My Website] We have responded to your review!', //'message' => $response, 'message' => $wbpermalink, 'headers' => 'Content-Type: text/html; charset="UTF-8"', //MG ]); $email->send(); }, 10, 2); ?>
Forum: Plugins
In reply to: [Site Reviews] Include assigned post in email reply?Sure, here we go. I think what you are saying is I would need to pass in the ID of the post, to get the URL? The code in question: $posturl = $review->assigned_posts($review->ID); //return URL of post
<?php
/**
* Send an email notification to the review author after responding to a review
* This snippet assumes that your review form includes the email field
* Paste this code in your theme’s functions.php file.
* @param \GeminiLabs\SiteReviews\Review $review
* @param string $response
* @return void
*/
add_action(‘site-reviews/review/responded’, function ($review, $response) {
$hasResponse = !empty($review->response(1));
$hasResponseUserId = !empty(get_post_meta($review->ID, ‘_response_by’, true));
if (empty($response) || $hasResponse || $hasResponseUserId) {
return; // only send an email if the response is not empty and there is no previous response
}$posturl = $review->assigned_posts($review->ID); //return URL of post
$wbpermalink = ‘<html><Head></Head><Body>Letting you know we have posted a reply to your review at</html>’;//MG
$email = glsr(‘Modules\Email’)->compose([
‘to’ => $review->email,
‘subject’ => ‘[My Website] We have responded to your review!’,
//’message’ => $response,
‘message’ => $wbpermalink,‘headers’ => ‘Content-Type: text/html; charset=”UTF-8″‘, //MG
]);
$email->send();
}, 10, 2);?>
Forum: Plugins
In reply to: [Site Reviews] Include assigned post in email reply?Hi – thanks for the response. So for a given review I understand there would only ever be one assigned post (certainly I cant see a scenario in my case where there would be more). I’ve tried using the above code snippet to retrieve the URL of the post the review was added to, however no joy! Code below, any ideas please? Cheers M.
/**
* Send an email notification to the review author after responding to a review
* This snippet assumes that your review form includes the email field
* Paste this code in your theme’s functions.php file.
* @param \GeminiLabs\SiteReviews\Review $review
* @param string $response
* @return void
*/
add_action(‘site-reviews/review/responded’, function ($review, $response) {
$hasResponse = !empty($review->response(1));
$hasResponseUserId = !empty(get_post_meta($review->ID, ‘_response_by’, true));
if (empty($response) || $hasResponse || $hasResponseUserId) {
return; // only send an email if the response is not empty and there is no previous response
}$posturl = $review->assigned_posts();
$wbpermalink = ‘<html><Head></Head><Body>Letting you know we have posted a reply to your review at</html>’;//MG
$email = glsr(‘Modules\Email’)->compose([
‘to’ => $review->email,
‘subject’ => ‘[My Website] We have responded to your review!’,
//’message’ => $response,
‘message’ => $wbpermalink,‘headers’ => ‘Content-Type: text/html; charset=”UTF-8″‘, //MG
]);
$email->send();
}, 10, 2);`Forum: Plugins
In reply to: [Site Reviews] No option to respond?Thankyou so much, great service as usual. Donation completed.
cheers
M.Forum: Plugins
In reply to: [Site Reviews] Display site review on one lineThankyou and much appreciated. Mark.
Forum: Fixing WordPress
In reply to: WP Visual Editor Broken: Uncaught TypeError: e.on is not a functionExact same issue as described above! Anyone?
Actually I just set pt-cv-content and pv-cv-title to max-width: 300px and that did the trick (except for the portrait image which defaults to 200px).
Cheers
MarkHello – firstly thanks for the response! OK – so the image is not the problem, its 800px wide – reduced to 300px for the thumbnail. When I inspect the page, pt-cv-content and pv-cv-title are actually 358px, and the image is 300px wide – see https://www.wildblighty.com on desktop view (same on mobile). If I set the image to 100% as per your suggestion the image pixelates as the width increase to 358px. Any further ideas here?