Ticket #16395: theme.php.diff
File theme.php.diff, 2.2 KB (added by , 14 years ago) |
---|
-
wp-includes/theme.php
171 171 * 172 172 * The style.css file must contain theme name, theme URI, and description. The 173 173 * data can also contain author URI, author, template (parent template), 174 * version, status, and finally tags. Some of these are not used by WordPress175 * administration panels, but are used by theme directory web sites which list176 * the theme.174 * template version (parent template version), version, status, and finally 175 * tags. Some of these are not used by WordPress administration panels, but are 176 * used by theme directory web sites which list the theme. 177 177 * 178 178 * @since 1.5.0 179 179 * … … 189 189 'AuthorURI' => 'Author URI', 190 190 'Version' => 'Version', 191 191 'Template' => 'Template', 192 'Template_Version' => 'Template Version', 192 193 'Status' => 'Status', 193 194 'Tags' => 'Tags' 194 195 ); … … 219 220 $theme_data['AuthorURI'] = esc_url( $theme_data['AuthorURI'] ); 220 221 221 222 $theme_data['Template'] = wp_kses( $theme_data['Template'], $themes_allowed_tags ); 223 224 $theme_data['Template_Version'] = wp_kses( $theme_data['Template_Version'], $themes_allowed_tags ); 225 226 // if there is no template being used then there should not be a value for the template version. 227 if ( $theme_data['Template'] == '' ) 228 $theme_data['Template_Version'] = ''; 222 229 223 230 $theme_data['Version'] = wp_kses( $theme_data['Version'], $themes_allowed_tags ); 224 231 … … 291 298 $version = $theme_data['Version']; 292 299 $author = $theme_data['Author']; 293 300 $template = $theme_data['Template']; 301 $template_version = $theme_data['Template_Version']; 294 302 $stylesheet = dirname($theme_file); 295 303 296 304 $screenshot = false; … … 307 315 } 308 316 309 317 $parent_template = $template; 318 $parent_template_version = $template_version; 310 319 311 320 if ( empty($template) ) { 312 321 if ( file_exists("$theme_root/$stylesheet/index.php") ) … … 425 434 'Author URI' => $theme_data['AuthorURI'], 426 435 'Version' => $version, 427 436 'Template' => $template, 437 'Template Version' => $template_version, 428 438 'Stylesheet' => $stylesheet, 429 439 'Template Files' => $template_files, 430 440 'Stylesheet Files' => $stylesheet_files,