TinyMCE: remove the numbers (2-6) after the headings in the drop-down. These are previews for the actual styling of headings in the editor.

See #27159.
Built from https://develop.svn.wordpress.org/trunk@38939


git-svn-id: http://core.svn.wordpress.org/trunk@38882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2016-10-26 01:42:48 +00:00
parent b4db9fbe3d
commit ed2e427b9d
5 changed files with 9 additions and 2 deletions

View File

@ -839,6 +839,7 @@ final class _WP_Editors {
'Formats' => _x( 'Formats', 'TinyMCE' ),
'Headings' => _x( 'Headings', 'TinyMCE' ),
'Heading' => _x( 'Heading', 'TinyMCE' ),
'Heading 1' => array( __( 'Heading 1' ), 'access1' ),
'Heading 2' => array( __( 'Heading 2' ), 'access2' ),
'Heading 3' => array( __( 'Heading 3' ), 'access3' ),

View File

@ -578,6 +578,12 @@ tinymce.PluginManager.add( 'wordpress', function( editor ) {
each( listbox.settings.values, function( item ) {
if ( item.text && labels.hasOwnProperty( item.text ) ) {
item.shortcut = '(' + labels[ item.text ] + ')';
// Drop the numbers after the labels for headings.
// TinyMCE makes previews for the h1-h6. It uses the same styles that are applied in the editor body.
if ( item.text.indexOf( 'Heading' ) !== -1 ) {
item.text = 'Heading';
}
}
} );
}

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.7-alpha-38938';
$wp_version = '4.7-alpha-38939';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.