Changeset 13101
- Timestamp:
- 01/10/2024 02:13:55 AM (16 months ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-wporg-themes-upload.php
r13100 r13101 205 205 } 206 206 207 // Validate it's not too large. 208 if ( $size > wp_max_upload_size() ) { 209 return new WP_Error( 210 'file_too_big', 211 sprintf( 212 __( 'Maximum allowed file size: %s', 'wporg-themes' ), 213 esc_html( size_format( wp_max_upload_size() ) ) 214 ) 215 ); 216 } 217 207 218 // Validate that the file is a ZIP file before processing it. 208 219 $check = wp_check_filetype_and_ext( … … 288 299 289 300 $valid_upload = $this->validate_upload( $file_upload ); 290 if ( ! $valid_upload ) { 301 if ( is_wp_error( $valid_upload ) ) { 302 return $valid_upload; 303 } elseif ( ! $valid_upload ) { 291 304 return new WP_Error( 292 305 'invalid_input', -
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/upload.php
r13059 r13101 64 64 if ( 'pre_upload_terms' === $code ) { 65 65 $terms_notice = "<div class='notice notice-error notice-large'><ul>{$notice_content}</ul></div>"; 66 } elseif ( is_wp_error( $messages ) ) { 67 $notice = "<div class='notice notice-error notice-large'><ul>{$notice_content}</ul></div>"; 66 68 } else { 67 69 $notice = "<div class='notice notice-warning notice-large'><ul>{$notice_content}</ul></div>";
Note: See TracChangeset
for help on using the changeset viewer.