Making WordPress.org

Changeset 1321


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.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory
Files:
3 edited

Legend:

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

    r1315 r1321  
    1414     * @return string
    1515     */
    16     public function screen_shot_url() {
     16    public function screenshot_url() {
    1717        $screen  = 'screenshot.png';
    1818        $version = $this->latest_version();
    1919
    20         if ( ! empty( $this->wp_post->_screen_shot[ $version ] ) ) {
    21             $screen = $this->wp_post->_screen_shot[ $version ];
     20        if ( ! empty( $this->wp_post->_screenshot[ $version ] ) ) {
     21            $screen = $this->wp_post->_screenshot[ $version ];
    2222        }
    2323
  • 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
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r1320 r1321  
    271271    if ( 'repopackage' == $post->post_type ) {
    272272        $theme = new WPORG_Themes_Repo_Package( $post );
    273         $src   = add_query_arg( array( 'w' => $size, 'strip' => 'all' ), $theme->screen_shot_url() );
     273        $src   = add_query_arg( array( 'w' => $size, 'strip' => 'all' ), $theme->screenshot_url() );
    274274
    275275        $html = '<img src="' . esc_url( $src ) . '"/>';
Note: See TracChangeset for help on using the changeset viewer.