Enable RTE for new users. fixes #3485
git-svn-id: https://develop.svn.wordpress.org/trunk@4651 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0829b413b9
commit
0620ac2076
@ -462,6 +462,12 @@ function edit_user( $user_id = 0 ) {
|
|||||||
$user->aim = wp_specialchars( trim( $_POST['aim'] ));
|
$user->aim = wp_specialchars( trim( $_POST['aim'] ));
|
||||||
if ( isset( $_POST['yim'] ))
|
if ( isset( $_POST['yim'] ))
|
||||||
$user->yim = wp_specialchars( trim( $_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();
|
$errors = new WP_Error();
|
||||||
|
|
||||||
|
@ -17,12 +17,6 @@ if ( is_wp_error( $errors ) ) {
|
|||||||
exit;
|
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');
|
do_action('personal_options_update');
|
||||||
|
|
||||||
if ( 'profile' == $_POST['from'] )
|
if ( 'profile' == $_POST['from'] )
|
||||||
|
@ -79,6 +79,9 @@ function wp_insert_user($userdata) {
|
|||||||
$description = '';
|
$description = '';
|
||||||
$description = apply_filters('pre_user_description', $description);
|
$description = apply_filters('pre_user_description', $description);
|
||||||
|
|
||||||
|
if ( empty($rich_editing) )
|
||||||
|
$rich_editing = 'true';
|
||||||
|
|
||||||
if ( empty($user_registered) )
|
if ( empty($user_registered) )
|
||||||
$user_registered = gmdate('Y-m-d H:i:s');
|
$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, 'jabber', $jabber );
|
||||||
update_usermeta( $user_id, 'aim', $aim );
|
update_usermeta( $user_id, 'aim', $aim );
|
||||||
update_usermeta( $user_id, 'yim', $yim );
|
update_usermeta( $user_id, 'yim', $yim );
|
||||||
|
update_usermeta( $user_id, 'rich_editing', $rich_editing);
|
||||||
|
|
||||||
if ( $update && isset($role) ) {
|
if ( $update && isset($role) ) {
|
||||||
$user = new WP_User($user_id);
|
$user = new WP_User($user_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user