WordPress.org

Make WordPress Core

Changeset 38939


Ignore:
Timestamp:
10/26/16 01:41:46 (13 months ago)
Author:
azaozz
Message:

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.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-editor.php

    r38932 r38939  
    840840 
    841841            'Headings' => _x( 'Headings', 'TinyMCE' ), 
     842            'Heading' => _x( 'Heading', 'TinyMCE' ), 
    842843            'Heading 1' => array( __( 'Heading 1' ), 'access1' ), 
    843844            'Heading 2' => array( __( 'Heading 2' ), 'access2' ), 
  • trunk/src/wp-includes/js/tinymce/plugins/wordpress/plugin.js

    r38897 r38939  
    579579                        if ( item.text && labels.hasOwnProperty( item.text ) ) { 
    580580                            item.shortcut = '(' + labels[ item.text ] + ')'; 
     581 
     582                            // Drop the numbers after the labels for headings. 
     583                            // TinyMCE makes previews for the h1-h6. It uses the same styles that are applied in the editor body. 
     584                            if ( item.text.indexOf( 'Heading' ) !== -1 ) { 
     585                                item.text = 'Heading'; 
     586                            } 
    581587                        } 
    582588                    } ); 
Note: See TracChangeset for help on using the changeset viewer.