Ticket #32469: wp-editor-editor.patch
File wp-editor-editor.patch, 7.5 KB (added by , 10 years ago) |
---|
-
wp-includes/class-wp-editor.php
184 184 $wrap_class .= ' has-dfw'; 185 185 } 186 186 187 echo '<div id="wp-' . $editor_id . '-wrap" class="' . $wrap_class . '">';188 189 if ( self::$editor_buttons_css ) {190 wp_print_styles('editor-buttons');191 self::$editor_buttons_css = false;192 }193 194 if ( !empty($set['editor_css']) )195 echo $set['editor_css'] . "\n";196 197 187 if ( !empty($buttons) || $set['media_buttons'] ) { 198 echo '<div id="wp-' . $editor_id . '-editor-tools" class="wp-editor-tools hide-if-no-js">';199 200 188 if ( $set['media_buttons'] ) { 201 189 self::$has_medialib = true; 202 190 203 191 if ( !function_exists('media_buttons') ) 204 192 include(ABSPATH . 'wp-admin/includes/media.php'); 205 206 echo '<div id="wp-' . $editor_id . '-media-buttons" class="wp-media-buttons">';207 208 /**209 * Fires after the default media button(s) are displayed.210 *211 * @since 2.5.0212 *213 * @param string $editor_id Unique editor identifier, e.g. 'content'.214 */215 do_action( 'media_buttons', $editor_id );216 echo "</div>\n";217 193 } 218 219 echo '<div class="wp-editor-tabs">' . $buttons . "</div>\n";220 echo "</div>\n";221 194 } 222 195 223 196 /** … … 227 200 * 228 201 * @param string $output Editor's HTML markup. 229 202 */ 230 $the_editor = apply_filters( 'the_editor', '<div id="wp-' . $editor_id . '-editor-container" class="wp-editor-container">' . 231 '<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . $set['textarea_name'] . '" ' . 232 'id="' . $editor_id . '">%s</textarea></div>' ); 203 $the_editor = apply_filters( 204 'the_editor', 205 wp_view( 206 'wp-editor.editor-textarea', 207 compact( 'editor_id', 'editor_class', 'height', 'tabindex', 'autocomplete', 'set' ) 208 ) 209 ); 233 210 234 211 /** 235 212 * Filter the default editor content. … … 240 217 */ 241 218 $content = apply_filters( 'the_editor_content', $content ); 242 219 243 printf( $the_editor, $content ); 244 echo "\n</div>\n\n"; 220 echo wp_view('wp-editor.editor', array_merge( 221 compact( 222 'editor_id', 223 'wrap_class', 224 'buttons', 225 'set' 226 ), 227 array( 228 'editor_buttons_css' => self::$editor_buttons_css, 229 'content' => sprintf( $the_editor, $content ) 230 ) 231 )); 245 232 233 if ( self::$editor_buttons_css ) { 234 self::$editor_buttons_css = false; 235 } 236 246 237 self::editor_settings($editor_id, $set); 247 238 } 248 239 -
wp-includes/views/wp-editor/editor-textarea.php
1 <div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container"> 2 <textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40" 3 name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea> 4 </div> -
wp-includes/views/wp-editor/editor.php
1 <div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>"> 2 3 <?php 4 if ( $editor_buttons_css ) { 5 wp_print_styles('editor-buttons'); 6 } 7 8 if ( !empty($set['editor_css']) ) { 9 echo $set['editor_css'] . "\n"; 10 } 11 12 if ( !empty($buttons) || $set['media_buttons'] ) { 13 ?> 14 15 <div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">'; 16 <?php 17 if ( $set['media_buttons'] ) { 18 ?> 19 20 <div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">'; 21 <?php 22 /** 23 * Fires after the default media button(s) are displayed. 24 * 25 * @since 2.5.0 26 * 27 * @param string $editor_id Unique editor identifier, e.g. 'content'. 28 */ 29 do_action( 'media_buttons', $editor_id ); 30 ?> 31 32 </div> 33 <?php 34 } 35 ?> 36 37 <div class="wp-editor-tabs"><?php echo $buttons; ?></div> 38 </div> 39 <?php 40 } 41 ?> 42 43 <?php 44 echo $content; 45 ?> 46 47 </div> -
wp-includes/views/wp-editor/editor-textarea.php
1 <div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container"> 2 <textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40" 3 name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea> 4 </div> -
wp-includes/views/wp-editor/editor.php
1 <div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>"> 2 3 <?php 4 if ( $editor_buttons_css ) { 5 wp_print_styles('editor-buttons'); 6 } 7 8 if ( !empty($set['editor_css']) ) { 9 echo $set['editor_css'] . "\n"; 10 } 11 12 if ( !empty($buttons) || $set['media_buttons'] ) { 13 ?> 14 15 <div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">'; 16 <?php 17 if ( $set['media_buttons'] ) { 18 ?> 19 20 <div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">'; 21 <?php 22 /** 23 * Fires after the default media button(s) are displayed. 24 * 25 * @since 2.5.0 26 * 27 * @param string $editor_id Unique editor identifier, e.g. 'content'. 28 */ 29 do_action( 'media_buttons', $editor_id ); 30 ?> 31 32 </div> 33 <?php 34 } 35 ?> 36 37 <div class="wp-editor-tabs"><?php echo $buttons; ?></div> 38 </div> 39 <?php 40 } 41 ?> 42 43 <?php 44 echo $content; 45 ?> 46 47 </div> -
wp-includes/views/wp-editor/editor-textarea.php
1 <div id="wp-<?php echo $editor_id; ?>-editor-container" class="wp-editor-container"> 2 <textarea<?php echo $editor_class . $height . $tabindex . $autocomplete; ?> cols="40" 3 name="<?php echo $set['textarea_name']; ?>" id="<?php echo $editor_id; ?>">%s</textarea> 4 </div> -
wp-includes/views/wp-editor/editor.php
1 <div id="wp-<?php echo $editor_id; ?>-wrap" class="<?php echo $wrap_class; ?>"> 2 3 <?php 4 if ( $editor_buttons_css ) { 5 wp_print_styles('editor-buttons'); 6 } 7 8 if ( !empty($set['editor_css']) ) { 9 echo $set['editor_css'] . "\n"; 10 } 11 12 if ( !empty($buttons) || $set['media_buttons'] ) { 13 ?> 14 15 <div id="wp-<?php echo $editor_id; ?>-editor-tools" class="wp-editor-tools hide-if-no-js">'; 16 <?php 17 if ( $set['media_buttons'] ) { 18 ?> 19 20 <div id="wp-<?php echo $editor_id; ?>-media-buttons" class="wp-media-buttons">'; 21 <?php 22 /** 23 * Fires after the default media button(s) are displayed. 24 * 25 * @since 2.5.0 26 * 27 * @param string $editor_id Unique editor identifier, e.g. 'content'. 28 */ 29 do_action( 'media_buttons', $editor_id ); 30 ?> 31 32 </div> 33 <?php 34 } 35 ?> 36 37 <div class="wp-editor-tabs"><?php echo $buttons; ?></div> 38 </div> 39 <?php 40 } 41 ?> 42 43 <?php 44 echo $content; 45 ?> 46 47 </div>