Changeset 10872
- Timestamp:
- 04/06/2021 06:33:45 AM (5 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
r10807 r10872 207 207 208 208 // Let's check some theme headers, shall we? 209 210 if ( ! $this->theme_name = $this->theme->get( 'Name' ) ) { 209 $this->theme_name = $this->theme->get( 'Name' ); 210 211 // Determine the theme slug (ascii only for compatibility) based on the name of the theme in the stylesheet 212 $this->theme_slug = remove_accents( $this->theme_name ); 213 $this->theme_slug = preg_replace( '/%[a-f0-9]{2}/i', '', $this->theme_slug ); 214 $this->theme_slug = sanitize_title_with_dashes( $this->theme_slug ); 215 216 if ( ! $this->theme_name || ! $this->theme_slug ) { 211 217 $error = __( 'The theme has no name.', 'wporg-themes' ) . ' '; 212 218 … … 220 226 return $error; 221 227 } 222 223 // determine the theme slug based on the name of the theme in the stylesheet224 $this->theme_slug = sanitize_title_with_dashes( $this->theme_name );225 228 226 229 // Do not allow themes with WordPress and Theme in the theme name.
Note: See TracChangeset
for help on using the changeset viewer.