Upload theme from zip fixes. see #8652
git-svn-id: http://svn.automattic.com/wordpress/trunk@10650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
1d4574f9bf
commit
b193b920bf
|
@ -242,11 +242,11 @@ function install_themes_updated($page = 1) {
|
|||
}
|
||||
|
||||
add_action('install_themes_upload', 'install_themes_upload', 10, 1);
|
||||
function install_themes_upload() {
|
||||
function install_themes_upload($page = 1) {
|
||||
?>
|
||||
<h4><?php _e('Install a theme in .zip format') ?></h4>
|
||||
<p><?php _e('If you have a theme in a .zip format, You may install it by uploading it here.') ?></p>
|
||||
<form method="post" enctype="multipart/form-data" action="<?php echo admin_url('theme-install.php?tab=upload') ?>">
|
||||
<form method="post" enctype="multipart/form-data" action="<?php echo admin_url('theme-install.php?tab=do_upload') ?>">
|
||||
<?php wp_nonce_field( 'theme-upload') ?>
|
||||
<input type="file" name="themezip" />
|
||||
<input type="submit" class="button" value="<?php _e('Install Now') ?>" />
|
||||
|
@ -520,7 +520,7 @@ function install_theme_information() {
|
|||
}
|
||||
|
||||
|
||||
add_action('install_themes_upload', 'upload_theme');
|
||||
add_action('install_themes_do_upload', 'upload_theme');
|
||||
function upload_theme() {
|
||||
|
||||
if ( ! ( ( $uploads = wp_upload_dir() ) && false === $uploads['error'] ) )
|
||||
|
|
|
@ -35,7 +35,7 @@ $tabs['featured'] = __('Featured');
|
|||
$tabs['new'] = __('Newest');
|
||||
$tabs['updated'] = __('Recently Updated');
|
||||
|
||||
$nonmenu_tabs = array('install', 'theme-information', 'upload'); //Valid actions to perform which do not have a Menu item.
|
||||
$nonmenu_tabs = array('install', 'theme-information', 'do_upload'); //Valid actions to perform which do not have a Menu item.
|
||||
|
||||
$tabs = apply_filters('install_themes_tabs', $tabs );
|
||||
$nonmenu_tabs = apply_filters('install_themes_nonmenu_tabs', $nonmenu_tabs);
|
||||
|
|
Loading…
Reference in New Issue