- <ul id="actions" class="actions">
-
- <li id="photo_button">
- Add: <?php if ( current_user_can('upload_files') ) { ?><a title="<?php _e('Insert an Image'); ?>" href="#">
-<img alt="<?php _e('Insert an Image'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-image.gif?ver=20100531' ) ); ?>"/></a>
- <?php } ?>
- </li>
- <li id="video_button">
- <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-video.gif?ver=20100531' ) ); ?>"/></a>
- </li>
- <?php if ( user_can_richedit() ) { ?>
- <li id="switcher">
- <?php wp_print_scripts( 'quicktags' ); ?>
- <?php add_filter('the_editor_content', 'wp_richedit_pre'); ?>
- <a id="edButtonHTML" onclick="switchEditors.go('content', 'html');"><?php _e('HTML'); ?></a>
- <a id="edButtonPreview" class="active" onclick="switchEditors.go('content', 'tinymce');"><?php _e('Visual'); ?></a>
- <div class="zerosize"><input accesskey="e" type="button" onclick="switchEditors.go('content')" /></div>
- </li>
- <?php } ?>
- </ul>
- <div id="quicktags"></div>
- <div class="editor-container">
- <textarea name="content" id="content" style="width:100%;" class="theEditor" rows="15"><?php
- if ( $selection )
- echo wp_richedit_pre($selection);
- if ( $url ) {
- echo '<p>';
- if ( $selection )
- _e('via ');
- printf( "<a href='%s'>%s</a>.</p>", esc_url( $url ), esc_html( $title ) );
- }
- ?></textarea>
- </div>
+ <?php
+
+ $editor_settings = array(
+ 'teeny' => true,
+ 'textarea_rows' => '15'
+ );
+
+ $content = '';
+ if ( $selection )
+ $content .= $selection;
+
+ if ( $url ) {
+ $content .= '<p>';
+
+ if ( $selection )
+ $content .= __('via ');
+
+ $content .= sprintf( "<a href='%s'>%s</a>.</p>", esc_url( $url ), esc_html( $title ) );
+ }
+
+ remove_action( 'media_buttons', 'media_buttons' );
+ add_action( 'media_buttons', 'press_this_media_buttons' );
+ function press_this_media_buttons() {
+ _e( 'Add:' );
+
+ if ( current_user_can('upload_files') ) {
+ ?>
+ <a id="photo_button" title="<?php esc_attr_e('Insert an Image'); ?>" href="#">
+ <img alt="<?php esc_attr_e('Insert an Image'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-image.gif?ver=20100531' ) ); ?>"/></a>
+ <?php
+ }
+ ?>
+ <a id="video_button" title="<?php esc_attr_e('Embed a Video'); ?>" href="#"><img alt="<?php esc_attr_e('Embed a Video'); ?>" src="<?php echo esc_url( admin_url( 'images/media-button-video.gif?ver=20100531' ) ); ?>"/></a>
+ <?php
+ }
+
+ wp_editor( $content, 'content', $editor_settings );
+
+ ?>