diff --git a/wp-admin/includes/schema.php b/wp-admin/includes/schema.php
index a129f63bbc..363e3763a7 100644
--- a/wp-admin/includes/schema.php
+++ b/wp-admin/includes/schema.php
@@ -612,6 +612,7 @@ function populate_roles_300() {
$role->add_cap( 'add_users' );
$role->add_cap( 'promote_users' );
$role->add_cap( 'edit_theme_options' );
+ $role->add_cap( 'delete_themes' );
}
}
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index 4c2c7b36ed..b6a16d8bf3 100644
--- a/wp-admin/includes/upgrade.php
+++ b/wp-admin/includes/upgrade.php
@@ -440,7 +440,7 @@ function upgrade_all() {
if ( $wp_current_db_version < 11958 )
upgrade_290();
- if ( $wp_current_db_version < 14726 )
+ if ( $wp_current_db_version < 14984 )
upgrade_300();
maybe_disable_automattic_widgets();
@@ -1108,11 +1108,11 @@ function upgrade_290() {
function upgrade_300() {
global $wp_current_db_version, $wpdb;
- if ( $wp_current_db_version < 14139 ) {
+ if ( $wp_current_db_version < 14984 )
populate_roles_300();
- if ( is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false )
- add_site_option( 'siteurl', '' );
- }
+
+ if ( $wp_current_db_version < 14139 && is_multisite() && is_main_site() && ! defined( 'MULTISITE' ) && get_site_option( 'siteurl' ) === false )
+ add_site_option( 'siteurl', '' );
// 3.0-alpha nav menu postmeta changes. can be removed before release. // r13802
if ( $wp_current_db_version >= 13226 && $wp_current_db_version < 13974 )
diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index 028550ec57..b2d91496b4 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -20,7 +20,7 @@ if ( current_user_can('switch_themes') && isset($_GET['action']) ) {
exit;
} else if ( 'delete' == $_GET['action'] ) {
check_admin_referer('delete-theme_' . $_GET['template']);
- if ( !current_user_can('update_themes') )
+ if ( !current_user_can('delete_themes') )
wp_die( __( 'Cheatin’ uh?' ) );
delete_theme($_GET['template']);
wp_redirect('themes.php?deleted=true');
@@ -193,8 +193,8 @@ foreach ( $cols as $col => $theme_name ) {
$actions = array();
$actions[] = '' . __('Activate') . '';
$actions[] = '' . __('Preview') . '';
- if ( current_user_can('update_themes') )
- $actions[] = '' . __('Delete') . '';
+ if ( current_user_can('delete_themes') )
+ $actions[] = '' . __('Delete') . '';
$actions = apply_filters('theme_action_links', $actions, $themes[$theme_name]);
$actions = implode ( ' | ', $actions );
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 4e72301d18..838590502c 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -15,7 +15,7 @@ $wp_version = '3.0-beta2-14960';
*
* @global int $wp_db_version
*/
-$wp_db_version = 14726;
+$wp_db_version = 14984;
/**
* Holds the TinyMCE version