Enable RTE for new users. fixes #3485

git-svn-id: http://svn.automattic.com/wordpress/trunk@4651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2006-12-19 23:19:12 +00:00
parent e57369e689
commit 32cc2c3ef0
3 changed files with 10 additions and 6 deletions

View File

@ -462,6 +462,12 @@ function edit_user( $user_id = 0 ) {
$user->aim = wp_specialchars( trim( $_POST['aim'] ));
if ( isset( $_POST['yim'] ))
$user->yim = wp_specialchars( trim( $_POST['yim'] ));
if ( !$update )
$user->rich_editing = 'true'; // Default to true for new users.
else if ( isset( $_POST['rich_editing'] ) )
$user->rich_editing = $_POST['rich_editing'];
else
$user->rich_editing = 'false';
$errors = new WP_Error();

View File

@ -17,12 +17,6 @@ if ( is_wp_error( $errors ) ) {
exit;
}
if ( rich_edit_exists() ) {
if ( !isset( $_POST['rich_editing'] ) )
$_POST['rich_editing'] = 'false';
update_user_option( $current_user->id, 'rich_editing', $_POST['rich_editing'], true );
}
do_action('personal_options_update');
if ( 'profile' == $_POST['from'] )

View File

@ -79,6 +79,9 @@ function wp_insert_user($userdata) {
$description = '';
$description = apply_filters('pre_user_description', $description);
if ( empty($rich_editing) )
$rich_editing = 'true';
if ( empty($user_registered) )
$user_registered = gmdate('Y-m-d H:i:s');
@ -104,6 +107,7 @@ function wp_insert_user($userdata) {
update_usermeta( $user_id, 'jabber', $jabber );
update_usermeta( $user_id, 'aim', $aim );
update_usermeta( $user_id, 'yim', $yim );
update_usermeta( $user_id, 'rich_editing', $rich_editing);
if ( $update && isset($role) ) {
$user = new WP_User($user_id);