mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Ensure default editor is selected
git-svn-id: https://develop.svn.wordpress.org/trunk@9019 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1430,15 +1430,15 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button
|
||||
<?php if ( user_can_richedit() ) {
|
||||
$wp_default_editor = wp_default_editor(); ?>
|
||||
<div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('<?php echo $id; ?>')" /></div>
|
||||
<?php if ( 'tinymce' == $wp_default_editor ) {
|
||||
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
|
||||
<a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" class="active"><?php _e('Visual'); ?></a>
|
||||
<?php } elseif ( 'html' == $wp_default_editor ) {
|
||||
<?php if ( 'html' == $wp_default_editor ) {
|
||||
add_filter('the_editor_content', 'wp_htmledit_pre'); ?>
|
||||
<a id="edButtonHTML" class="active"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>');"><?php _e('Visual'); ?></a>
|
||||
<?php }
|
||||
<a id="edButtonHTML" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
|
||||
<?php } else {
|
||||
add_filter('the_editor_content', 'wp_richedit_pre'); ?>
|
||||
<a id="edButtonHTML" onclick="switchEditors.go('<?php echo $id; ?>', 'html');"><?php _e('HTML'); ?></a>
|
||||
<a id="edButtonPreview" class="active" onclick="switchEditors.go('<?php echo $id; ?>', 'tinymce');"><?php _e('Visual'); ?></a>
|
||||
<?php }
|
||||
}
|
||||
|
||||
/* if ( $media_buttons ) { ?>
|
||||
|
||||
Reference in New Issue
Block a user