Ticket #30187: class-wp-editor.php.diff
| File class-wp-editor.php.diff, 3.4 KB (added by , 11 years ago) |
|---|
-
src/wp-includes/class-wp-editor.php
50 50 * @type string $editor_css Intended for extra styles for both Visual and Text editors. 51 51 * Should include <style> tags, and can use "scoped". Default empty. 52 52 * @type string $editor_class Extra classes to add to the editor textarea elemen. Default empty. 53 * @type bool $theme_styles Whether to add theme editor styles. Default true. 53 54 * @type bool $teeny Whether to output the minimal editor config. Examples include 54 55 * Press This and the Comment editor. Default false. 55 56 * @type bool $dfw Whether to replace the default fullscreen with "Distraction Free … … 86 87 'tabfocus_elements' => ':prev,:next', 87 88 'editor_css' => '', 88 89 'editor_class' => '', 90 'theme_styles' => true, 89 91 'teeny' => false, 90 92 'dfw' => false, 91 93 'tinymce' => true, … … 177 179 $switch_class = 'tmce-active'; 178 180 } 179 181 180 $buttons .= '< button type="button" id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</button>\n";181 $buttons .= '< button type="button" id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</button>\n";182 $buttons .= '<a id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</a>\n"; 183 $buttons .= '<a id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</a>\n"; 182 184 } 183 185 184 186 $wrap_class = 'wp-core-ui wp-editor-wrap ' . $switch_class; … … 489 491 'entities' => '38,amp,60,lt,62,gt', 490 492 'entity_encoding' => 'raw', 491 493 'keep_styles' => false, 492 'cache_suffix' => 'wp-mce-' . $GLOBALS['tinymce_version'],493 494 494 495 // Limit the preview styles in the menu/toolbar 495 496 'preview_styles' => 'font-family font-size font-weight font-style text-decoration text-transform', … … 513 514 self::$baseurl . '/skins/wordpress/wp-content.css?' . $version 514 515 ); 515 516 516 $editor_styles = get_editor_stylesheets(); 517 if ( ! empty( $editor_styles ) ) { 518 foreach ( $editor_styles as $style ) { 519 $mce_css[] = $style; 517 if ( $set['theme_styles'] ) { 518 $editor_styles = get_editor_stylesheets(); 519 if ( ! empty( $editor_styles ) ) { 520 foreach ( $editor_styles as $style ) { 521 $mce_css[] = $style; 522 } 520 523 } 521 524 } 525 522 526 523 527 /** 524 528 * Filter the comma-delimited list of stylesheets to load in TinyMCE. … … 601 605 } 602 606 } 603 607 604 $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );605 606 608 if ( !empty($set['tinymce']['body_class']) ) { 607 609 $body_class .= ' ' . $set['tinymce']['body_class']; 608 610 unset($set['tinymce']['body_class']); … … 1433 1435 </div> 1434 1436 <?php 1435 1437 } 1436 } 1438 } 1439 No newline at end of file