Skip to content

Commit

Permalink
4.4.52
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbart committed Sep 3, 2021
1 parent 6bff62e commit a2421bd
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/helpers/class-feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public static function insert_feedback()
{
global $wpdb;

$type = '';
$fields = [];
$pro = 0;
$contra = 0;
Expand Down Expand Up @@ -186,7 +185,6 @@ public static function insert_feedback()
}

$data = [
'type' => $type,
'time' => current_time('mysql'),
'user' => esc_attr($_REQUEST['user_id']),
'pro' => $pro,
Expand Down Expand Up @@ -234,9 +232,15 @@ public static function send_email($feedback)

$feedback['fields'] = maybe_unserialize($feedback['fields']);

$type = esc_html_x('positive', 'feedback type email', 'helpful');

if (1 === $feedback['contra']) {
$type = esc_html_x('negative', 'feedback type email', 'helpful');
}

/* tags */
$tags = [
'{type}' => (isset($feedback['type'])) ? $feedback['type'] : '',
'{type}' => $type,
'{name}' => (isset($feedback['fields']['name'])) ? $feedback['fields']['name'] : '',
'{email}' => (isset($feedback['fields']['email'])) ? $feedback['fields']['email'] : '',
'{message}' => $feedback['message'],
Expand Down

0 comments on commit a2421bd

Please sign in to comment.