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:
parent
c70ac59b6e
commit
83c377a8ef
|
@ -82,7 +82,7 @@ class WP_Editor {
|
||||||
if ( !empty($set['editor_css']) )
|
if ( !empty($set['editor_css']) )
|
||||||
echo $set['editor_css'] . "\n";
|
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 '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools">';
|
||||||
echo $buttons;
|
echo $buttons;
|
||||||
|
|
||||||
|
@ -475,9 +475,6 @@ class WP_Editor {
|
||||||
$qtInit = '{}';
|
$qtInit = '{}';
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset($this->mce_settings);
|
|
||||||
// $key = key($this->mce_settings);
|
|
||||||
|
|
||||||
$ref = array(
|
$ref = array(
|
||||||
'plugins' => implode( ',', $this->plugins ),
|
'plugins' => implode( ',', $this->plugins ),
|
||||||
'theme' => 'advanced',
|
'theme' => 'advanced',
|
||||||
|
|
|
@ -1739,7 +1739,7 @@ function user_can_richedit() {
|
||||||
!$is_iphone && // this includes all Safari mobile browsers
|
!$is_iphone && // this includes all Safari mobile browsers
|
||||||
( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) ||
|
( ( 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'] ) )
|
!preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) )
|
||||||
&& 'comment.php' != $pagenow ) {
|
) {
|
||||||
$wp_rich_edit = true;
|
$wp_rich_edit = true;
|
||||||
} else {
|
} else {
|
||||||
$wp_rich_edit = false;
|
$wp_rich_edit = false;
|
||||||
|
|
Loading…
Reference in New Issue