WordPress.org

Plugin Directory

Changeset 616581 for theme-check


Ignore:
Timestamp:
10/23/12 22:51:23 (18 months ago)
Author:
Otto42
Message:

bigger screenshots are okay

File:
1 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/checks/screenshot.php

    r503927 r616581  
    1818                    // we have or screenshot! 
    1919                    $image = getimagesize( $other_key ); 
    20                     if ( $image[0] > 320 || $image[1] > 240 ) { 
    21                         $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum allowed size is 320x240px.', 'themecheck'), $image[0], $image[1]); 
     20                    if ( $image[0] > 640 || $image[1] > 480 ) { 
     21                        $this->error[] = sprintf(__('<span class="tc-lead tc-recommended">RECOMMENDED</span>: Screenshot is wrong size! Detected: <strong>%1$sx%2$spx</strong>. Maximum allowed size is 640x480px.', 'themecheck'), $image[0], $image[1]); 
     22                    } 
     23                    if ( $image[1] / $image[0] != 0.75 ) { 
     24                        $this->error[] = __('<span class="tc-lead tc-recommended">RECOMMENDED</span>: Screenshot dimensions are wrong! Ratio of width to height should be 4:3.', 'themecheck'); 
     25                    } 
     26                    if ( $image[0] != 600 || $image[1] != 450 ) { 
     27                        $this->error[] = __('<span class="tc-lead tc-recommended">RECOMMENDED</span>: Screenshot size should be 600x450, to account for HiDPI displays. Any 4:3 image size is acceptable, but 600x450 is preferred.', 'themecheck'); 
    2228                    } 
    2329                } 
Note: See TracChangeset for help on using the changeset viewer.