X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..88550bc3400cc7c035ff590ecb007c7938041ded:/wp-admin/includes/upgrade.php diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 02dfe093..15a1097f 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -30,7 +30,7 @@ if ( !function_exists('wp_install') ) : * @param string $user_name User's username. * @param string $user_email User's email. * @param bool $public Whether blog is public. - * @param null $deprecated Optional. Not used. + * @param string $deprecated Optional. Not used. * @param string $user_password Optional. User's chosen password. Will default to a random password. * @param string $language Optional. Language chosen. * @return array Array keys 'url', 'user_id', 'password', 'password_message'. @@ -234,7 +234,7 @@ As a new WordPress user, you should go to your dashboard to d update_option( 'widget_archives', array ( 2 => array ( 'title' => '', 'count' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); update_option( 'widget_categories', array ( 2 => array ( 'title' => '', 'count' => 0, 'hierarchical' => 0, 'dropdown' => 0 ), '_multiwidget' => 1 ) ); update_option( 'widget_meta', array ( 2 => array ( 'title' => '' ), '_multiwidget' => 1 ) ); - update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'sidebar-2' => array (), 'sidebar-3' => array (), 'array_version' => 3 ) ); + update_option( 'sidebars_widgets', array ( 'wp_inactive_widgets' => array (), 'sidebar-1' => array ( 0 => 'search-2', 1 => 'recent-posts-2', 2 => 'recent-comments-2', 3 => 'archives-2', 4 => 'categories-2', 5 => 'meta-2', ), 'array_version' => 3 ) ); if ( ! is_multisite() ) update_user_meta( $user_id, 'show_welcome_panel', 1 ); @@ -277,7 +277,8 @@ function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) { $user = new WP_User( $user_id ); $email = $user->user_email; $name = $user->user_login; - $message = sprintf(__("Your new WordPress site has been successfully set up at: + $login_url = wp_login_url(); + $message = sprintf( __( "Your new WordPress site has been successfully set up at: %1\$s @@ -285,12 +286,13 @@ You can log in to the administrator account with the following information: Username: %2\$s Password: %3\$s +Log in here: %4\$s We hope you enjoy your new site. Thanks! --The WordPress Team https://wordpress.org/ -"), $blog_url, $name, $password); +"), $blog_url, $name, $password, $login_url ); @wp_mail($email, __('New WordPress Site'), $message); } @@ -1530,7 +1532,7 @@ function maybe_add_column($table_name, $column_name, $create_ddl) { * * @since 1.2.0 * - * @return array List of options. + * @return stdClass List of options. */ function get_alloptions_110() { global $wpdb; @@ -1612,9 +1614,9 @@ function deslash($content) { * * @since 1.5.0 * - * @param unknown_type $queries - * @param unknown_type $execute - * @return unknown + * @param string $queries + * @param bool $execute + * @return array */ function dbDelta( $queries = '', $execute = true ) { global $wpdb; @@ -1888,9 +1890,9 @@ function make_db_current_silent( $tables = 'all' ) { * * @since 1.5.0 * - * @param unknown_type $theme_name - * @param unknown_type $template - * @return unknown + * @param string $theme_name + * @param string $template + * @return bool */ function make_site_theme_from_oldschool($theme_name, $template) { $home_path = get_home_path(); @@ -1971,9 +1973,9 @@ function make_site_theme_from_oldschool($theme_name, $template) { * * @since 1.5.0 * - * @param unknown_type $theme_name - * @param unknown_type $template - * @return unknown + * @param string $theme_name + * @param string $template + * @return null|false */ function make_site_theme_from_default($theme_name, $template) { $site_dir = WP_CONTENT_DIR . "/themes/$template"; @@ -2037,7 +2039,7 @@ function make_site_theme_from_default($theme_name, $template) { * * @since 1.5.0 * - * @return unknown + * @return false|string */ function make_site_theme() { // Name the theme after the blog. @@ -2188,6 +2190,11 @@ function pre_schema_upgrade() { $wpdb->query( "ALTER TABLE $wpdb->blogs CHANGE COLUMN archived archived tinyint(2) NOT NULL default 0" ); } } + + if ( $wp_current_db_version < 30133 ) { + // dbDelta() can recreate but can't drop the index. + $wpdb->query( "ALTER TABLE $wpdb->terms DROP INDEX slug" ); + } } /**