Changeset 1321 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php
- Timestamp:
- 02/25/2015 03:23:28 PM (10 years ago)
- 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 112 112 113 113 // We need a screen shot. People love screen shots. 114 if ( ! $this->has_screen _shot( $theme_files ) ) {114 if ( ! $this->has_screenshot( $theme_files ) ) { 115 115 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>' ); 116 116 } … … 302 302 * @return bool 303 303 */ 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; 311 311 } 312 312 … … 452 452 [[TicketQuery(format=table, keywords=~theme-{$this->theme->get_stylesheet()}, col=id|summary|status|resolution|owner)]] 453 453 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)]] 455 455 TICKET; 456 456 } … … 535 535 '_upload_date' => $upload_date, 536 536 '_ticket_id' => $ticket_id, 537 '_screen _shot' => $this->theme->screen_shot,537 '_screenshot' => $this->theme->screenshot, 538 538 ); 539 539
Note: See TracChangeset
for help on using the changeset viewer.