From 8d5e8564ea5fdd6cc921c9698c8282ce24436a10 Mon Sep 17 00:00:00 2001 From: Kevin Pliester Date: Thu, 5 Sep 2019 22:19:51 +0200 Subject: [PATCH] 4.0.22 --- core/classes/class-helpful-helper-stats.php | 14 +++++++------- helpful.php | 4 ++-- readme.txt | 6 +++++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/core/classes/class-helpful-helper-stats.php b/core/classes/class-helpful-helper-stats.php index 76a830c..4d9734e 100644 --- a/core/classes/class-helpful-helper-stats.php +++ b/core/classes/class-helpful-helper-stats.php @@ -350,7 +350,7 @@ public static function getStatsWeek( $year ) { if ( ! $results ) { return [ - 'status' => 'error', + 'status' => 'error', 'message' => __( 'No entries found', 'helpful' ), ]; } @@ -587,7 +587,7 @@ public static function getStatsYear( $year ) { 'backgroundColor' => self::$red, ], ], - 'labels' => $labels, + 'labels' => $labels, ], 'options' => [ 'scales' => [ @@ -752,7 +752,7 @@ public static function getStatsTotal() { ], 'labels' => [ __( 'Pro', 'helpful' ), - __( 'Contra', 'helpful' ) + __( 'Contra', 'helpful' ), ], ], 'options' => [ @@ -821,7 +821,7 @@ public static function getMostHelpful( $limit = null ) { 'time' => sprintf( /* translators: %s time difference */ __( 'Published %s ago', 'helpful' ), - human_time_diff( date_i18n( get_the_date( 'U', $post_id ) ), date_i18n( 'U' ) ) + human_time_diff( get_the_date( 'U', $post_id ), date_i18n( 'U' ) ) ), ]; endforeach; @@ -898,7 +898,7 @@ public static function getLeastHelpful( $limit = null ) { 'time' => sprintf( /* translators: %s time difference */ __( 'Published %s ago', 'helpful' ), - human_time_diff( date_i18n( get_the_date( 'U', $post_id ) ), date_i18n( 'U' ) ) + human_time_diff( get_the_date( 'U', $post_id ), date_i18n( 'U' ) ) ), ]; endforeach; @@ -958,7 +958,7 @@ public static function getRecentlyPro( $limit = null ) { 'time' => sprintf( /* translators: %s time difference */ __( 'Submitted %s ago', 'helpful' ), - human_time_diff( date_i18n( $timestamp ), date_i18n( 'U' ) ) + human_time_diff( $timestamp, date_i18n( 'U' ) ) ), ]; endforeach; @@ -1014,7 +1014,7 @@ public static function getRecentlyContra( $limit = null ) { 'time' => sprintf( /* translators: %s time difference */ __( 'Submitted %s ago', 'helpful' ), - human_time_diff( date_i18n( $timestamp ), date_i18n( 'U' ) ) + human_time_diff( $timestamp, date_i18n( 'U' ) ) ), ]; endforeach; diff --git a/helpful.php b/helpful.php index 4f87dbb..a0cb040 100644 --- a/helpful.php +++ b/helpful.php @@ -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.0.21 + * Version: 4.0.22 * Author: Pixelbart * Author URI: https://pixelbart.de * Text Domain: helpful @@ -17,7 +17,7 @@ define( 'HELPFUL_FILE', __FILE__ ); define( 'HELPFUL_PATH', plugin_dir_path( HELPFUL_FILE ) ); -define( 'HELPFUL_VERSION', '4.0.21' ); +define( 'HELPFUL_VERSION', '4.0.22' ); define( 'HELPFUL_PHP_MIN', '5.4.0' ); /* Include config */ diff --git a/readme.txt b/readme.txt index fc1d354..c66d1f8 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: helpful, poll, feedback, reviews, vote, review, voting Requires at least: 4.6 Tested up to: 5.2 Requires PHP: 5.4.0 -Stable tag: 4.0.21 +Stable tag: 4.0.22 License: MIT License License URI: https://opensource.org/licenses/MIT @@ -86,6 +86,10 @@ Switch to the Helpful settings and click on the System tab. There you will find == Changelog == += 4.0.22 = +* Fixed another bug in the Dashboard widget related to the date format. +* Date: 05.09.2019 + = 4.0.21 = * Fixed a bug in the dashboard widget where it was not clear for a function whether a variable was an integer or not. * The CSS class for the contra button is now `.helpful-contra` and no longer `.helpful-pro` (Thx to [derunterstrich](https://github.com/derunterstrich)).