Make WordPress Core


Ignore:
Timestamp:
08/31/2008 06:34:43 AM (16 years ago)
Author:
azaozz
Message:

Saving/restoring the user interface state, see #7654

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r8721 r8784  
    943943    $r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
    944944    if ( $user = wp_get_current_user() ) { // look for cookie
    945         if ( isset($_COOKIE['wordpress_editor_' . $user->ID]) && in_array($_COOKIE['wordpress_editor_' . $user->ID], array('tinymce', 'html', 'test') ) )
    946             $r = $_COOKIE['wordpress_editor_' . $user->ID];
     945        $ed = get_user_setting('editor', 'tinymce');
     946        $r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
    947947    }
    948948    return apply_filters( 'wp_default_editor', $r ); // filter
Note: See TracChangeset for help on using the changeset viewer.