mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 18:54:29 +00:00
Saving/restoring the user interface state, see #7654
git-svn-id: https://develop.svn.wordpress.org/trunk@8784 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -942,8 +942,8 @@ function user_can_richedit() {
|
||||
function wp_default_editor() {
|
||||
$r = user_can_richedit() ? 'tinymce' : 'html'; // defaults
|
||||
if ( $user = wp_get_current_user() ) { // look for cookie
|
||||
if ( isset($_COOKIE['wordpress_editor_' . $user->ID]) && in_array($_COOKIE['wordpress_editor_' . $user->ID], array('tinymce', 'html', 'test') ) )
|
||||
$r = $_COOKIE['wordpress_editor_' . $user->ID];
|
||||
$ed = get_user_setting('editor', 'tinymce');
|
||||
$r = ( in_array($ed, array('tinymce', 'html', 'test') ) ) ? $ed : $r;
|
||||
}
|
||||
return apply_filters( 'wp_default_editor', $r ); // filter
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user