Ticket #9336: missing_theme_lines.9336.diff
File missing_theme_lines.9336.diff, 1.6 KB (added by , 16 years ago) |
---|
-
wp-includes/theme.php
179 179 180 180 $theme_data = implode( '', file( $theme_file ) ); 181 181 $theme_data = str_replace ( '\r', '\n', $theme_data ); 182 preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ); 183 preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ); 184 preg_match( '|Description:(.*)$|mi', $theme_data, $description ); 182 if ( preg_match( '|Theme Name:(.*)$|mi', $theme_data, $theme_name ) ) 183 $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags ); 184 else 185 $name = $theme = ''; 185 186 187 if ( preg_match( '|Theme URI:(.*)$|mi', $theme_data, $theme_uri ) ) 188 $theme_uri = clean_url( trim( $theme_uri[1] ) ); 189 else 190 $theme_uri = ''; 191 192 if ( preg_match( '|Description:(.*)$|mi', $theme_data, $description ) ) 193 $description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) ); 194 else 195 $description = ''; 196 186 197 if ( preg_match( '|Author URI:(.*)$|mi', $theme_data, $author_uri ) ) 187 198 $author_uri = clean_url( trim( $author_uri[1]) ); 188 199 else … … 208 219 else 209 220 $tags = array(); 210 221 211 $name = $theme = wp_kses( trim( $theme_name[1] ), $themes_allowed_tags );212 $theme_uri = clean_url( trim( $theme_uri[1] ) );213 $description = wptexturize( wp_kses( trim( $description[1] ), $themes_allowed_tags ) );214 215 222 if ( preg_match( '|Author:(.*)$|mi', $theme_data, $author_name ) ) { 216 223 if ( empty( $author_uri ) ) { 217 224 $author = wp_kses( trim( $author_name[1] ), $themes_allowed_tags );