WordPress.org

Make WordPress Core

Changeset 19432


Ignore:
Timestamp:
11/23/2011 10:49:17 PM (6 years ago)
Author:
azaozz
Message:

Changes user_can_richedit() to default to true for logged out users, same as the default for logged in users, fixes #19320

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-editor.php

    r19420 r19432  
    3939            'teeny' => false, // output the minimal editor config used in Press This
    4040            'dfw' => false, // replace the default fullscreen with DFW (needs specific DOM elements and css)
    41             'tinymce' => null, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
     41            'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
    4242            'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
    4343        ) );
    4444
    45         if ( null === $set['tinymce'] )
    46             self::$this_tinymce = user_can_richedit();
    47         else
    48             self::$this_tinymce = (bool) $set['tinymce'];
    49 
     45        self::$this_tinymce = ( $set['tinymce'] && user_can_richedit() );
    5046        self::$this_quicktags = (bool) $set['quicktags'];
    5147
  • trunk/wp-includes/general-template.php

    r19420 r19432  
    17501750    global $wp_rich_edit, $is_gecko, $is_opera, $is_safari, $is_chrome, $is_iphone, $is_IE;
    17511751
    1752     if ( !isset( $wp_rich_edit) ) {
     1752    if ( !isset($wp_rich_edit) ) {
    17531753        $wp_rich_edit = false;
    17541754
    1755         if ( get_user_option( 'rich_editing' ) == 'true' ) {
     1755        if ( get_user_option( 'rich_editing' ) == 'true' || !is_user_logged_in() ) { // default to 'true' for logged out users
    17561756            if ( $is_safari ) {
    17571757                if ( !$is_iphone || ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 534 ) )
Note: See TracChangeset for help on using the changeset viewer.