diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 97cf9d3a23..ae9e04cb89 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -6,7 +6,7 @@ require_once(ABSPATH . 'wp-admin/includes/admin.php'); require_once(ABSPATH . 'wp-admin/includes/schema.php'); if ( !function_exists('wp_install') ) : -function wp_install($blog_title, $user_name, $user_email, $public, $deprecated='') { +function wp_install($blog_title, $user_name, $user_email, $public, $remote) { global $wp_rewrite; wp_check_mysql_version(); @@ -18,6 +18,9 @@ function wp_install($blog_title, $user_name, $user_email, $public, $deprecated=' update_option('blogname', $blog_title); update_option('admin_email', $user_email); update_option('blog_public', $public); + update_option('enable_app',$remote); + update_option('enable_xmlrpc',$remote); + $schema = ( isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on' ) ? 'https://' : 'http://'; if ( defined('WP_SITEURL') && '' != WP_SITEURL ) diff --git a/wp-admin/install.php b/wp-admin/install.php index ff232126e4..63d0b871e8 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -53,6 +53,10 @@ switch($step) { + + + + @@ -68,6 +72,7 @@ switch($step) { $weblog_title = stripslashes($_POST['weblog_title']); $admin_email = stripslashes($_POST['admin_email']); $public = (int) $_POST['blog_public']; + $remote = (int) $_POST['enable_remotepublishing']; // check e-mail address if (empty($admin_email)) { // TODO: poka-yoke @@ -78,7 +83,7 @@ switch($step) { } $wpdb->show_errors(); - $result = wp_install($weblog_title, 'admin', $admin_email, $public); + $result = wp_install($weblog_title, 'admin', $admin_email, $public, $remote); extract($result, EXTR_SKIP); ?>