WordPress.org

Plugin Directory

Changeset 416449


Ignore:
Timestamp:
07/28/11 15:03:11 (3 years ago)
Author:
pross
Message:

Screenshot previews added, with dimensions and filesize

File:
1 edited

Legend:

Unmodified
Added
Removed
  • theme-check/trunk/main.php

    r359920 r416449  
    3939        echo '<h2>' . __( 'Theme Info', 'themecheck' ) . ': </h2>'; 
    4040        echo '<div class="theme-info">'; 
     41        if (file_exists( trailingslashit( WP_CONTENT_DIR . '/themes' ) . trailingslashit( basename( $theme ) ) . 'screenshot.png' ) ) { 
     42            $image = getimagesize( $theme . '/screenshot.png' ); 
     43        echo '<div style="float:right" class="theme-info"><img style="max-height:180px;" src="' . trailingslashit( WP_CONTENT_URL . '/themes' ) . trailingslashit( basename( $theme ) ) . 'screenshot.png" />'; 
     44         
     45        echo '<br /><div style="text-align:center">' . $image[0] . 'x' . $image[1] . ' ' . round( filesize( $theme . '/screenshot.png' )/1024 ) . 'k</div></div>'; 
     46         
     47 
     48 
     49        } 
    4150        echo ( !empty( $data[ 'Title' ] ) ) ? '<p><label>' . __( 'Title', 'themecheck' ) . '</label><span class="info">' . $data[ 'Title' ] . '</span></p>' : ''; 
    4251        echo ( !empty( $data[ 'Version' ] ) ) ? '<p><label>' . __( 'Version', 'themecheck' ) . '</label><span class="info">' . $data[ 'Version' ] . '</span></p>' : ''; 
     
    6069            } 
    6170         } 
    62         echo '</div><!-- .theme-info-->'; 
     71        echo '</div><!-- .theme-info-->'; 
     72         
    6373        $plugins = get_plugins( '/theme-check' ); 
    6474        $version = explode( '.', $plugins['theme-check.php']['Version'] ); 
     
    104114function tc_success() { 
    105115    _e( '<div class="tc-success"><p>Now your theme has passed the basic tests you need to check it properly using the test data before you upload to the WordPress Themes Directory.</p>', 'themecheck' ); 
     116    echo '<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><input type="hidden" name="cmd" value="_s-xclick" /><input type="hidden" name="hosted_button_id" value="2V7F4QYMWMBL6" /><input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" /><img alt="" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1" /></form>'; 
    106117    _e( '<p>Make sure to review the guidelines at <a href="http://codex.wordpress.org/Theme_Review">Theme Review</a> before uploading a Theme.</p>', 'themecheck' ); 
    107118    _e( '<h3>Codex Links</h3>', 'themecheck' ); 
Note: See TracChangeset for help on using the changeset viewer.