diff --git a/readme.txt b/readme.txt index 8fc7c20..9f38719 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: check, checker, coding standards, theme, tool Requires at least: 4.7 Tested up to: 5.2.2 Requires PHP: 7.0 -Stable tag: 1.1.0 +Stable tag: 1.1.1 License: MIT License URI: https://opensource.org/licenses/MIT @@ -74,6 +74,9 @@ The latest upgrade mostly with development changes and some minor improvements i == Changelog == += 1.1.1 = +* Fixed bug in the screenshot ratio calculation + = 1.1.0 = * Added sniff codes that can be copied for easier whitelisting of the false issues * Added readme validator diff --git a/src/sniffs/screenshot/class-validator.php b/src/sniffs/screenshot/class-validator.php index a246dbc..7a11fc7 100644 --- a/src/sniffs/screenshot/class-validator.php +++ b/src/sniffs/screenshot/class-validator.php @@ -43,6 +43,7 @@ class Validator extends Validate_File { /** * Runs screenshot validators * + * @since 1.1.1 Minor bugfix update in calculation of screen image ratio. * @since 1.1.0 * * @param string $file File to validate. @@ -107,7 +108,7 @@ public function validate( $file ) { } // Aspect Ratio. - if ( $width / $height !== 0.75 ) { + if ( $height / $width !== 0.75 ) { $this->results[] = [ 'severity' => 'error', 'message' => esc_html__( 'Screenshot aspect ratio must be 4:3!', 'theme-sniffer' ), diff --git a/theme-sniffer.php b/theme-sniffer.php index 47f900b..cd33371 100644 --- a/theme-sniffer.php +++ b/theme-sniffer.php @@ -3,7 +3,7 @@ * Plugin Name: Theme Sniffer * Plugin URI: https://github.com/WPTRT/theme-sniffer * Description: Theme Sniffer plugin which uses PHP_CodeSniffer for automatic theme checking. - * Version: 1.1.0 + * Version: 1.1.1 * Author: WPTRT * Author URI: https://make.wordpress.org/themes/ * Text Domain: theme-sniffer