Changes user_can_richedit() to default to true for logged out users, same as the default for logged in users, fixes #19320
git-svn-id: https://develop.svn.wordpress.org/trunk@19432 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d18820448a
commit
ae2743d972
@ -38,15 +38,11 @@ final class _WP_Editors {
|
||||
'editor_class' => '', // add extra class(es) to the editor textarea
|
||||
'teeny' => false, // output the minimal editor config used in Press This
|
||||
'dfw' => false, // replace the default fullscreen with DFW (needs specific DOM elements and css)
|
||||
'tinymce' => null, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
|
||||
'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
|
||||
'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
|
||||
) );
|
||||
|
||||
if ( null === $set['tinymce'] )
|
||||
self::$this_tinymce = user_can_richedit();
|
||||
else
|
||||
self::$this_tinymce = (bool) $set['tinymce'];
|
||||
|
||||
self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() );
|
||||
self::$this_quicktags = (bool) $set['quicktags'];
|
||||
|
||||
if ( self::$this_tinymce )
|
||||
|
@ -1749,10 +1749,10 @@ function rich_edit_exists() {
|
||||
function user_can_richedit() {
|
||||
global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_iphone, $is_IE;
|
||||
|
||||
if ( !isset( $wp_rich_edit) ) {
|
||||
if ( !isset($wp_rich_edit) ) {
|
||||
$wp_rich_edit = false;
|
||||
|
||||
if ( get_user_option( 'rich_editing' ) == 'true' ) {
|
||||
if ( get_user_option( 'rich_editing' ) == 'true' || !is_user_logged_in() ) { // default to 'true' for logged out users
|
||||
if ( $is_safari ) {
|
||||
if ( !$is_iphone || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 534 ) )
|
||||
$wp_rich_edit = true;
|
||||
|
Loading…
Reference in New Issue
Block a user