Skip to content

Commit

Permalink
4.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbart committed Feb 10, 2020
1 parent 6fee756 commit baf6642
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions core/classes/class-helpful-frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ public function save_vote()
if ( ! Helpful_Helper_Values::checkUser( $user_id, $post_id ) ) {
if ( 'pro' === $value ) {
Helpful_Helper_Values::insertPro( $user_id, $post_id );
$response = $this->after_vote( $value, $post_id );
$response = do_shortcode( $this->after_vote( $value, $post_id ) );
} else {
Helpful_Helper_Values::insertContra( $user_id, $post_id );
$response = $this->after_vote( $value, $post_id );
$response = do_shortcode( $this->after_vote( $value, $post_id ) );
}
}

Expand Down Expand Up @@ -197,11 +197,11 @@ public function save_feedback()
}

if ( 'pro' === $type ) {
echo get_option( 'helpful_after_pro' );
echo do_shortcode( get_option( 'helpful_after_pro' ) );
}

if ( 'contra' === $type ) {
echo get_option( 'helpful_after_contra' );
echo do_shortcode( get_option( 'helpful_after_contra' ) );
}

wp_die();
Expand All @@ -228,15 +228,15 @@ public function after_vote( string $type, int $post_id )
$feedback_text = get_option( 'helpful_feedback_message_pro' );

if ( ! get_option( 'helpful_feedback_after_pro' ) ) {
return get_option( 'helpful_after_pro' );
return do_shortcode( get_option( 'helpful_after_pro' ) );
}
}

if ( 'contra' === $type ) {
$feedback_text = get_option( 'helpful_feedback_message_contra' );

if ( ! get_option( 'helpful_feedback_after_contra' ) ) {
return get_option( 'helpful_after_contra' );
return do_shortcode( get_option( 'helpful_after_contra' ) );
}
}

Expand Down
2 changes: 2 additions & 0 deletions core/classes/class-helpful-shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public function add_to_content( $content )
$helpful['content'] = $helpful['exists_text'];
}

$helpful['content'] = do_shortcode( $helpful['content'] );

ob_start();

$default_template = HELPFUL_PATH . 'templates/helpful.php';
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.2.5
* Version: 4.2.6
* Author: Pixelbart
* Author URI: https://pixelbart.de
* Text Domain: helpful
Expand Down
6 changes: 5 additions & 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.4
Requires PHP: 5.6.20
Stable tag: 4.2.5
Stable tag: 4.2.6
License: MIT License
License URI: https://opensource.org/licenses/MIT

Expand Down Expand Up @@ -86,6 +86,10 @@ Switch to the Helpful settings and click on the System tab. There you will find

== Changelog ==

= 4.2.6 =
* Fixed a bug where the placement of shortcodes was not possible.
* Date: 10.02.2020

= 4.2.5 =
* Fixed a bug where the parameters for the shortcode were wrong.
* Date 06.02.2020
Expand Down

0 comments on commit baf6642

Please sign in to comment.