Changeset 59696
- Timestamp:
- 01/23/2025 11:52:04 PM (8 weeks ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/link.js
r59120 r59696 163 163 wpLink.mceRefresh( url, text ); 164 164 } else { 165 // For the Texteditor the "Link text" field is always shown.165 // For the Code editor the "Link text" field is always shown. 166 166 if ( ! inputs.wrap.hasClass( 'has-text-field' ) ) { 167 167 inputs.wrap.addClass( 'has-text-field' ); -
trunk/src/js/_enqueues/wp/autosave.js
r50547 r59696 560 560 } else { 561 561 562 // Make sure the Texteditor is selected.562 // Make sure the Code editor is selected. 563 563 $( '#content-html' ).trigger( 'click' ); 564 564 $( '#content' ).trigger( 'focus' ); -
trunk/src/js/_enqueues/wp/editor/base.js
r59188 r59696 23 23 24 24 /** 25 * Handles onclick events for the Visual/ Texttabs.25 * Handles onclick events for the Visual/Code tabs. 26 26 * 27 27 * @since 4.3.0 … … 63 63 64 64 /** 65 * Switches the editor between Visual and Textmode.65 * Switches the editor between Visual and Code mode. 66 66 * 67 67 * @since 2.5.0 … … 839 839 } 840 840 841 // Restore the selection when the editor is initialized. Needed when the Texteditor is the default.841 // Restore the selection when the editor is initialized. Needed when the Code editor is the default. 842 842 $( document ).on( 'tinymce-editor-init.keep-scroll-position', function( event, editor ) { 843 843 if ( editor.$( '.mce_SELRES_start' ).length ) { … … 1204 1204 * Initialize TinyMCE and/or Quicktags. For use with wp_enqueue_editor() (PHP). 1205 1205 * 1206 * Intended for use with an existing textarea that will become the Texteditor tab.1206 * Intended for use with an existing textarea that will become the Code editor tab. 1207 1207 * The editor width will be the width of the textarea container, height will be adjustable. 1208 1208 * … … 1247 1247 } 1248 1248 1249 // Add wrap and the Visual| Texttabs.1249 // Add wrap and the Visual|Code tabs. 1250 1250 if ( settings.tinymce && settings.quicktags ) { 1251 1251 var $textarea = $( '#' + id ); … … 1294 1294 id: id + '-html', 1295 1295 'class': 'wp-switch-editor switch-html' 1296 }).text( window.tinymce.translate( ' Text' ) ) )1296 }).text( window.tinymce.translate( 'Code' ) ) ) 1297 1297 ).append( $editorContainer ) 1298 1298 ); -
trunk/src/wp-admin/edit-form-advanced.php
r59522 r59696 284 284 285 285 $title_and_editor = '<p>' . __( '<strong>Title</strong> — Enter a title for your post. After you enter a title, you’ll see the permalink below, which you can edit.' ) . '</p>'; 286 $title_and_editor .= '<p>' . __( '<strong>Post editor</strong> — Enter the text for your post. There are two modes of editing: Visual and Text. Choose the mode by clicking on the appropriate tab.' ) . '</p>';286 $title_and_editor .= '<p>' . __( '<strong>Post editor</strong> — Enter the text for your post. There are two modes of editing: Visual and Code. Choose the mode by clicking on the appropriate tab.' ) . '</p>'; 287 287 $title_and_editor .= '<p>' . __( 'Visual mode gives you an editor that is similar to a word processor. Click the Toolbar Toggle button to get a second row of controls.' ) . '</p>'; 288 $title_and_editor .= '<p>' . __( 'The Text mode allows you to enter HTML along with your post text. Note that <p> and <br> tags are converted to line breaks when switching to the Texteditor to make it less cluttered. When you type, a single line break can be used instead of typing <br>, and two line breaks instead of paragraph tags. The line breaks are converted back to tags automatically.' ) . '</p>';288 $title_and_editor .= '<p>' . __( 'The Code mode allows you to enter HTML along with your post text. Note that <p> and <br> tags are converted to line breaks when switching to the Code editor to make it less cluttered. When you type, a single line break can be used instead of typing <br>, and two line breaks instead of paragraph tags. The line breaks are converted back to tags automatically.' ) . '</p>'; 289 289 $title_and_editor .= '<p>' . __( 'You can insert media files by clicking the button above the post editor and following the directions. You can align or edit images using the inline formatting toolbar available in Visual mode.' ) . '</p>'; 290 290 $title_and_editor .= '<p>' . __( 'You can enable distraction-free writing mode using the icon to the right. This feature is not available for old browsers or devices with small screens, and requires that the full-height editor be enabled in Screen Options.' ) . '</p>'; … … 315 315 } elseif ( 'page' === $post_type ) { 316 316 $about_pages = '<p>' . __( 'Pages are similar to posts in that they have a title, body text, and associated metadata, but they are different in that they are not part of the chronological blog stream, kind of like permanent posts. Pages are not categorized or tagged, but can have a hierarchy. You can nest pages under other pages by making one the “Parent” of the other, creating a group of pages.' ) . '</p>' . 317 '<p>' . __( 'Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Textmodes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.' ) . '</p>';317 '<p>' . __( 'Creating a Page is very similar to creating a Post, and the screens can be customized in the same way using drag and drop, the Screen Options tab, and expanding/collapsing boxes as you choose. This screen also has the distraction-free writing space, available in both the Visual and Code modes via the Fullscreen buttons. The Page editor mostly works the same as the Post editor, but there are some Page-specific features in the Page Attributes box.' ) . '</p>'; 318 318 319 319 get_current_screen()->add_help_tab( -
trunk/src/wp-includes/class-wp-editor.php
r59188 r59696 55 55 * @type string $tabfocus_elements The previous and next element ID to move the focus to 56 56 * when pressing the Tab key in TinyMCE. Default ':prev,:next'. 57 * @type string $editor_css Intended for extra styles for both Visual and Texteditors.57 * @type string $editor_css Intended for extra styles for both Visual and Code editors. 58 58 * Should include `<style>` tags, and can use "scoped". Default empty. 59 59 * @type string $editor_class Extra classes to add to the editor textarea element. Default empty. … … 185 185 if ( self::$this_quicktags ) { 186 186 $default_editor = $set['default_editor'] ? $set['default_editor'] : wp_default_editor(); 187 // 'html' is used for the " Text" editor tab.187 // 'html' is used for the "Code" editor tab. 188 188 if ( 'html' !== $default_editor ) { 189 189 $default_editor = 'tinymce'; … … 195 195 ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Visual', 'Name for the Visual editor tab' ) . "</button>\n"; 196 196 $buttons .= '<button type="button" id="' . $editor_id_attr . '-html"' . $tmce_active . ' class="wp-switch-editor switch-html"' . 197 ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( ' Text', 'Name for the Text editor tab (formerly HTML)' ) . "</button>\n";197 ' data-wp-editor-id="' . $editor_id_attr . '">' . _x( 'Code', 'Name for the Code editor tab (formerly Text)' ) . "</button>\n"; 198 198 } else { 199 199 $default_editor = 'tinymce'; … … 273 273 ); 274 274 275 // Prepare the content for the Visual or Texteditor, only when TinyMCE is used (back-compat).275 // Prepare the content for the Visual or Code editor, only when TinyMCE is used (back-compat). 276 276 if ( self::$this_tinymce ) { 277 277 add_filter( 'the_editor_content', 'format_for_editor', 10, 2 ); … … 628 628 629 629 /** 630 * Filters the list of teenyMCE buttons ( Texttab).630 * Filters the list of teenyMCE buttons (Code tab). 631 631 * 632 632 * @since 2.7.0 … … 1397 1397 'Link options' => __( 'Link options' ), // Tooltip for the 'link options' button in the inline link dialog. 1398 1398 'Visual' => _x( 'Visual', 'Name for the Visual editor tab' ), // Editor switch tab label. 1399 ' Text' => _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ), // Editor switch tab label.1399 'Code' => _x( 'Code', 'Name for the Code editor tab (formerly Text)' ), // Editor switch tab label. 1400 1400 'Add Media' => array( __( 'Add Media' ), 'accessM' ), // Tooltip for the 'Add Media' button in the block editor Classic block. 1401 1401 -
trunk/src/wp-includes/general-template.php
r59692 r59696 3793 3793 * 3794 3794 * Works out which of the editors to display as the current editor for a 3795 * user. The 'html' setting is for the " Text" editor tab.3795 * user. The 'html' setting is for the "Code" editor tab. 3796 3796 * 3797 3797 * @since 2.5.0 -
trunk/src/wp-includes/widgets/class-wp-widget-text.php
r59120 r59696 558 558 <div class="wp-pointer-content"> 559 559 <h3><?php _e( 'Did you just paste HTML?' ); ?></h3> 560 <p><?php _e( 'Hey there, looks like you just pasted HTML into the “Visual” tab of the Text widget. You may want to paste your code into the “ Text” tab instead. Alternately, try out the new “Custom HTML” widget!' ); ?></p>560 <p><?php _e( 'Hey there, looks like you just pasted HTML into the “Visual” tab of the Text widget. You may want to paste your code into the “Code” tab instead. Alternately, try out the new “Custom HTML” widget!' ); ?></p> 561 561 <div class="wp-pointer-buttons"> 562 562 <a class="close" href="#"><?php _e( 'Dismiss' ); ?></a>
Note: See TracChangeset
for help on using the changeset viewer.