WP_Editor: don't show empty div if no editor-buttons and media-buttons are shown, props ocean90, see #17144

git-svn-id: http://svn.automattic.com/wordpress/trunk@18519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-08-07 17:03:18 +00:00
parent c70ac59b6e
commit 83c377a8ef
2 changed files with 2 additions and 5 deletions

View File

@ -82,7 +82,7 @@ class WP_Editor {
if ( !empty($set['editor_css']) )
echo $set['editor_css'] . "\n";
if ( $this->can_richedit || $set['media_buttons'] ) {
if ( !empty($buttons) || $set['media_buttons'] ) {
echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools">';
echo $buttons;
@ -475,9 +475,6 @@ class WP_Editor {
$qtInit = '{}';
}
// reset($this->mce_settings);
// $key = key($this->mce_settings);
$ref = array(
'plugins' => implode( ',', $this->plugins ),
'theme' => 'advanced',

View File

@ -1739,7 +1739,7 @@ function user_can_richedit() {
!$is_iphone && // this includes all Safari mobile browsers
( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
!preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) )
&& 'comment.php' != $pagenow ) {
) {
$wp_rich_edit = true;
} else {
$wp_rich_edit = false;