Make WordPress Core

Ticket #17144: 17144.can_richedit.patch

File 17144.can_richedit.patch, 1.1 KB (added by ocean90, 12 years ago)
  • wp-includes/general-template.php

     
    17391739                        !$is_iphone && // this includes all Safari mobile browsers
    17401740                        ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
    17411741                                !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) )
    1742                                 && 'comment.php' != $pagenow ) {
     1742                ) {
    17431743                        $wp_rich_edit = true;
    17441744                } else {
    17451745                        $wp_rich_edit = false;
  • wp-includes/class-wp-editor.php

     
    8282                if ( !empty($set['editor_css']) )
    8383                        echo $set['editor_css'] . "\n";
    8484
    85                 if ( $this->can_richedit || $set['media_buttons'] ) {
     85                if ( ( ! empty( $buttons) && $this->can_richedit ) || $set['media_buttons'] ) {
    8686                        echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools">';
    8787                        echo $buttons;
    8888