Skip to content

Commit

Permalink
4.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelbart committed Sep 21, 2020
1 parent dd03886 commit 94cc1c8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
10 changes: 10 additions & 0 deletions core/helpers/class-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ public static function get_pro( $post_id = null, $percentages = false )
{
if ( is_null( $post_id ) ) {
global $post;

if ( ! isset( $post->ID ) ) {
return 0;
}

$post_id = $post->ID;
}

Expand Down Expand Up @@ -125,6 +130,11 @@ public static function get_contra( $post_id = null, $percentages = false )
{
if ( is_null( $post_id ) ) {
global $post, $wpdb;

if ( ! isset( $post->ID ) ) {
return 0;
}

$post_id = $post->ID;
}

Expand Down
5 changes: 5 additions & 0 deletions core/helpers/class-values.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ public static function get_defaults()
public static function convert_tags( $string, $post_id )
{
$post = get_post( $post_id );

if ( ! isset( $post->ID ) ) {
return $string;
}

$pro = Stats::get_pro( $post->ID );
$contra = Stats::get_contra( $post->ID );

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.3
* Version: 4.4.4
* 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.6
Requires PHP: 5.6.20
Stable tag: 4.4.3
Stable tag: 4.4.4
License: MIT License
License URI: https://opensource.org/licenses/MIT

Expand Down

0 comments on commit 94cc1c8

Please sign in to comment.