Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #174 from WPTRT/development
Browse files Browse the repository at this point in the history
Fix the screenshot validator issue
  • Loading branch information
dingo-d authored Jul 22, 2019
2 parents ba4f0d7 + 683c8ed commit e723132
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/sniffs/screenshot/class-validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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' ),
Expand Down
2 changes: 1 addition & 1 deletion theme-sniffer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e723132

Please sign in to comment.