mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Two small tweaks before release
git-svn-id: http://svn.automattic.com/wordpress/trunk@2346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
86f0f9fa5c
commit
d720a8ef0a
@ -904,7 +904,7 @@ function get_file_description($file) {
|
|||||||
|
|
||||||
if ( isset($wp_file_descriptions[basename($file)] ) ) {
|
if ( isset($wp_file_descriptions[basename($file)] ) ) {
|
||||||
return $wp_file_descriptions[basename($file)];
|
return $wp_file_descriptions[basename($file)];
|
||||||
} else {
|
} elseif ( file_exists( ABSPATH . $file ) ) {
|
||||||
$template_data = implode('', file(ABSPATH . $file));
|
$template_data = implode('', file(ABSPATH . $file));
|
||||||
if ( preg_match("|Template Name:(.*)|i", $template_data, $name) )
|
if ( preg_match("|Template Name:(.*)|i", $template_data, $name) )
|
||||||
return $name[1];
|
return $name[1];
|
||||||
|
@ -543,6 +543,15 @@ function make_site_theme_from_oldschool($theme_name, $template) {
|
|||||||
else
|
else
|
||||||
$oldpath = ABSPATH;
|
$oldpath = ABSPATH;
|
||||||
|
|
||||||
|
if ($oldfile == 'index.php') { // Check to make sure it's not a new index
|
||||||
|
$index = implode('', file("$oldpath/$oldfile"));
|
||||||
|
if ( strstr( $index, 'WP_USE_THEMES' ) ) {
|
||||||
|
if (! @copy(ABSPATH . 'wp-content/themes/default/index.php', "$site_dir/$newfile"))
|
||||||
|
return false;
|
||||||
|
continue; // Don't copy anything
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile"))
|
if (! @copy("$oldpath/$oldfile", "$site_dir/$newfile"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -570,7 +579,7 @@ function make_site_theme_from_oldschool($theme_name, $template) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add a theme header.
|
// Add a theme header.
|
||||||
$header = "/*\nTheme Name: $theme_name\nTheme URI: " . get_option('siteurl') . "\nDescription: Your theme.\nVersion: 1\nAuthor: You\n*/\n";
|
$header = "/*\nTheme Name: $theme_name\nTheme URI: " . get_option('siteurl') . "\nDescription: A theme automatically created by the upgrade.\nVersion: 1.0\nAuthor: Moi\n*/\n";
|
||||||
|
|
||||||
$stylelines = file_get_contents("$site_dir/style.css");
|
$stylelines = file_get_contents("$site_dir/style.css");
|
||||||
if ($stylelines) {
|
if ($stylelines) {
|
||||||
|
Loading…
Reference in New Issue
Block a user