Skip to content

Commit

Permalink
4.4.27
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbart committed Mar 15, 2021
1 parent 4ec9e42 commit aa5f615
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions core/helpers/class-feedback.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,7 @@ public static function get_feedback_count( $post_id = null )
*/
public static function after_vote( $post_id, $show_feedback = false )
{
$feedback_text = esc_html_x(
'Thank you very much. Please write us your opinion, so that we can improve ourselves.',
'form user note',
'helpful'
);
// $feedback_text = esc_html_x( 'Thank you very much. Please write us your opinion, so that we can improve ourselves.', 'form user note', 'helpful' );

$hide_feedback = get_post_meta( $post_id, 'helpful_hide_feedback_on_post', true );
$hide_feedback = ( 'on' === $hide_feedback ) ? true : false;
Expand Down Expand Up @@ -492,7 +488,11 @@ public static function after_vote( $post_id, $show_feedback = false )
$feedback_text = apply_filters( 'helpful_pre_feedback_message_voted', $feedback_text, $post_id );
}

if ( '' === trim( $feedback_text ) ) {
if ( isset( $feedback_text ) && '' === trim( $feedback_text ) ) {
$feedback_text = false;
}

if ( ! isset( $feedback_text ) ) {
$feedback_text = false;
}

Expand Down
2 changes: 1 addition & 1 deletion helpful.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Helpful
* Description: Add a fancy feedback form under your posts or post-types and ask your visitors a question. Give them the abbility to vote with yes or no.
* Version: 4.4.26
* Version: 4.4.27
* Author: Pixelbart
* Author URI: https://pixelbart.de
* Text Domain: helpful
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Tags: helpful, poll, feedback, reviews, vote, review, voting
Requires at least: 4.6
Tested up to: 5.7
Requires PHP: 5.6.20
Stable tag: 4.4.26
Stable tag: 4.4.27
License: MIT License
License URI: https://opensource.org/licenses/MIT

Expand Down
2 changes: 1 addition & 1 deletion templates/feedback.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php if ( ! defined( 'ABSPATH' ) ) exit; ?>

<?php if ( isset( $feedback_text ) ) : ?>
<?php if ( isset( $feedback_text ) && false !== $feedback_text ) : ?>
<div class="feedback-note">
<p><?php echo $feedback_text; ?></p>
</div>
Expand Down

0 comments on commit aa5f615

Please sign in to comment.