Making WordPress.org


Ignore:
Timestamp:
02/25/2015 03:23:28 PM (10 years ago)
Author:
obenland
Message:

WP.org Themes: Continue with the misspelling, to avoid future confusion.

See #745.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php

    r1315 r1321  
    112112
    113113        // We need a screen shot. People love screen shots.
    114         if ( ! $this->has_screen_shot( $theme_files ) ) {
     114        if ( ! $this->has_screenshot( $theme_files ) ) {
    115115            return sprintf( __( 'The zip file must include a file named %1$s or %2$s.', 'wporg-themes' ), '<code>screenshot.png</code>', '<code>screenshot.jpg</code>' );
    116116        }
     
    302302     * @return bool
    303303     */
    304     public function has_screen_shot( $theme_files ) {
    305         $screen_shots = preg_grep( '/screenshot.(jpg|jpeg|png|gif)/', $theme_files );
    306         usort( $screen_shots, array( $this, 'sort_by_string_length' ) );
    307 
    308         $this->theme->screen_shot = array_pop( $screen_shots );
    309 
    310         return (bool) $this->theme->screen_shot;
     304    public function has_screenshot( $theme_files ) {
     305        $screenshots = preg_grep( '/screenshot.(jpg|jpeg|png|gif)/', $theme_files );
     306        usort( $screenshots, array( $this, 'sort_by_string_length' ) );
     307
     308        $this->theme->screenshot = array_pop( $screenshots );
     309
     310        return (bool) $this->theme->screenshot;
    311311    }
    312312
     
    452452[[TicketQuery(format=table, keywords=~theme-{$this->theme->get_stylesheet()}, col=id|summary|status|resolution|owner)]]
    453453
    454 [[Image(https://themes.svn.wordpress.org/{$this->theme->get_stylesheet()}/{$this->theme->display( 'Version' )}/{$this->theme->screen_shot}, width=640)]]
     454[[Image(https://themes.svn.wordpress.org/{$this->theme->get_stylesheet()}/{$this->theme->display( 'Version' )}/{$this->theme->screenshot}, width=640)]]
    455455TICKET;
    456456    }
     
    535535            '_upload_date' => $upload_date,
    536536            '_ticket_id'   => $ticket_id,
    537             '_screen_shot' => $this->theme->screen_shot,
     537            '_screenshot'  => $this->theme->screenshot,
    538538        );
    539539
Note: See TracChangeset for help on using the changeset viewer.