Make WordPress Core

Changeset 27660


Ignore:
Timestamp:
03/23/2014 07:09:23 AM (13 years ago)
Author:
azaozz
Message:

TinyMCE:

  • Fix PressThis styling when the popup is resized.
  • Don't force loading of the media JS.
  • Add the 'image' plugin as fallback when no media button(s).
  • Add back the link icon tooltip/menu item string for translation.

See #24067, see #24409

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/press-this.css

    r27195 r27660  
    8181
    8282.press-this .posting {
    83         margin-right: 252px;
     83        margin-right: 250px;
    8484}
    8585
    … …  
    106106}
    107107
     108.press-this #wp-content-wrap #wp-content-editor-tools {
     109        padding: 0;
     110        top: 3px;
     111        overflow: hidden;
     112}
     113
    108114.press-this .wp-media-buttons {
    109115        cursor: default;
    110116        padding: 8px 8px 6px;
     117}
     118
     119.press-this #wp-content-wrap #wp-content-media-buttons a {
     120        padding: 0;
     121        line-height: normal;
     122        height: auto;
     123        font-size: 16px;
     124}
     125
     126.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn {
     127        margin: 0 1px;
     128}
     129
     130.press-this #wp-content-wrap .mce-toolbar .mce-btn button {
     131        padding: 2px 3px;
    111132}
    112133
    … …  
    133154/* Editor/Main Column */
    134155.press-this #poststuff {
    135         margin: 0 10px 10px;
     156        margin: 0 8px;
    136157        padding: 0;
    137158}
    … …  
    324345        padding: 0 5px;
    325346        border: 0 none;
    326         height: 345px;
     347        height: 340px;
    327348        font-family: Consolas, Monaco, monospace;
    328349        font-size: 13px;
  • trunk/src/wp-includes/class-wp-editor.php

    r27629 r27660  
    224224                                        $mce_external_plugins = apply_filters( 'mce_external_plugins', array() );
    225225
    226                                         /**
    227                                          * TinyMCE default plugins filter
    228                                          *
    229                                          * Specifies which of the default plugins that are included in WordPress should be added to
    230                                          * the TinyMCE instance.
    231                                          */
    232                                         $plugins = array_unique( apply_filters( 'tiny_mce_plugins', array(
     226                                        $plugins = array(
    233227                                                'charmap',
    234228                                                'hr',
    … …  
    244238                                                'wpdialogs',
    245239                                                'wpview',
    246                                         ) ) );
     240                                        );
     241
     242                                        if ( ! self::$has_medialib ) {
     243                                                $plugins[] = 'image';
     244                                        }
     245
     246                                        /**
     247                                         * TinyMCE default plugins filter
     248                                         *
     249                                         * Specifies which of the default plugins that are included in WordPress should be added to
     250                                         * the TinyMCE instance.
     251                                         */
     252                                        $plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
    247253
    248254                                        if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) {
    … …  
    508514                        add_thickbox();
    509515                        wp_enqueue_script('media-upload');
    510 
    511                         if ( self::$has_tinymce )
    512                                 wp_enqueue_script('mce-view');
    513516                }
    514517        }
    … …  
    541544                        'Superscript' => __( 'Superscript' ),
    542545                        'Clear formatting' => __( 'Clear formatting' ),
    543                         'Bold' => __('Bold'),
    544                         'Italic' => __('Italic'),
     546                        'Bold' => __( 'Bold' ),
     547                        'Italic' => __( 'Italic' ),
    545548                        'Code' => _x( 'Code', 'editor button' ),
    546549                        'Source code' => __( 'Source code' ),
    547550
    548                         'Align center' => __('Align center'),
    549                         'Align right' => __('Align right'),
     551                        'Align center' => __( 'Align center' ),
     552                        'Align right' => __( 'Align right' ),
    550553                        'Align left' => __( 'Align left' ),
    551                         'Justify' => __('Justify'),
    552                         'Increase indent' => __('Increase indent'),
    553                         'Decrease indent' => __('Decrease indent'),
     554                        'Justify' => __( 'Justify' ),
     555                        'Increase indent' => __( 'Increase indent' ),
     556                        'Decrease indent' => __( 'Decrease indent' ),
    554557
    555558                        'Cut' => __( 'Cut' ),
    … …  
    566569
    567570                        'Bullet list' => __( 'Bulleted list' ),
    568                         'Numbered list' => __('Numbered list'),
     571                        'Numbered list' => __( 'Numbered list' ),
    569572                        'Square' => _x( 'Square', 'list style' ),
    570573                        'Default' => _x( 'Default', 'list style' ),
    … …  
    592595
    593596                        // Media, image plugins
    594                         'Insert/edit image' => __('Insert/edit image'),
    595                         'General' => __('General'),
    596                         'Advanced' => __('Advanced'),
    597                         'Source' => __('Source'),
    598                         'Border' => __('Border'),
    599                         'Constrain proportions' => __('Constrain proportions'),
    600                         'Vertical space' => __('Vertical space'),
    601                         'Image description' => __('Image description'),
    602                         'Style' => __('Style'),
    603                         'Dimensions' => __('Dimensions'),
    604                         'Insert image' => __('Insert image'),
    605                         'Insert date/time' => __('Insert date/time'),
    606                         'Insert/edit video' => __('Insert/edit video'),
    607                         'Poster' => __('Poster'),
    608                         'Alternative source' => __('Alternative source'),
    609                         'Paste your embed code below:' => __('Paste your embed code below:'),
    610                         'Insert video' => __('Insert video'),
    611                         'Embed' => __('Embed'),
     597                        'Insert/edit image' => __( 'Insert/edit image' ),
     598                        'General' => __( 'General' ),
     599                        'Advanced' => __( 'Advanced' ),
     600                        'Source' => __( 'Source' ),
     601                        'Border' => __( 'Border' ),
     602                        'Constrain proportions' => __( 'Constrain proportions' ),
     603                        'Vertical space' => __( 'Vertical space' ),
     604                        'Image description' => __( 'Image description' ),
     605                        'Style' => __( 'Style' ),
     606                        'Dimensions' => __( 'Dimensions' ),
     607                        'Insert image' => __( 'Insert image' ),
     608                        'Insert date/time' => __( 'Insert date/time' ),
     609                        'Insert/edit video' => __( 'Insert/edit video' ),
     610                        'Poster' => __( 'Poster' ),
     611                        'Alternative source' => __( 'Alternative source' ),
     612                        'Paste your embed code below:' => __( 'Paste your embed code below:' ),
     613                        'Insert video' => __( 'Insert video' ),
     614                        'Embed' => __( 'Embed' ),
    612615
    613616                        // Each of these have a corresponding plugin
    … …  
    626629                        'Horizontal space' => __( 'Horizontal space' ),
    627630                        'Restore last draft' => __( 'Restore last draft' ),
     631                        'Insert/edit link' => __( 'Insert/edit link' ),
    628632
    629633                        // Spelling, search/replace plugins
    … …  
    634638                        'Prev' => _x( 'Prev', 'find/replace' ),
    635639                        'Whole words' => _x( 'Whole words', 'find/replace' ),
    636                         'Find and replace' => __('Find and replace' ),
     640                        'Find and replace' => __( 'Find and replace' ),
    637641                        'Replace with' => _x('Replace with', 'find/replace' ),
    638642                        'Find' => _x( 'Find', 'find/replace' ),
    639643                        'Replace all' => _x( 'Replace all', 'find/replace' ),
    640                         'Match case' => __('Match case'),
     644                        'Match case' => __( 'Match case' ),
    641645                        'Spellcheck' => __( 'Check Spelling' ),
    642646                        'Finish' => _x( 'Finish', 'spellcheck' ),
    … …  
    662666
    663667                        'Insert row before' => __( 'Insert row before' ),
    664                         'Insert row after' => __('Insert row after'),
     668                        'Insert row after' => __( 'Insert row after' ),
    665669                        'Insert column before' => __( 'Insert column before' ),
    666670                        'Insert column after' => __( 'Insert column after' ),
    … …  
    668672                        'Paste row after' => __( 'Paste table row after' ),
    669673                        'Delete row' => __( 'Delete row' ),
    670                         'Delete column' => __('Delete column'),
    671                         'Cut row' => __('Cut table row' ),
     674                        'Delete column' => __( 'Delete column' ),
     675                        'Cut row' => __( 'Cut table row' ),
    672676                        'Copy row' => __( 'Copy table row' ),
    673677                        'Merge cells' => __( 'Merge table cells' ),
    674                         'Split cell' => __( 'Split merged table cells' ),
     678                        'Split cell' => __( 'Split table cell' ),
    675679
    676680                        'Height' => __( 'Height' ),
    677                         'Width' => __('Width'),
     681                        'Width' => __( 'Width' ),
    678682                        'Caption' => __( 'Caption' ),
    679683                        'Alignment' => __( 'Alignment' ),
    … …  
    700704                        /* translators: word count */
    701705                        'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ),
    702                         'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __('Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.'),
    703                         'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __('Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help'),
     706                        'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' => __( 'Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.' ),
     707                        'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' => __( 'Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help' ),
    704708                        'You have unsaved changes are you sure you want to navigate away?' => __( 'The changes you made will be lost if you navigate away from this page.' ),
    705                         'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __('Your browser does not support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.'),
     709                        'Your browser doesn\'t support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' => __( 'Your browser does not support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.' ),
    706710
    707711                        // TinyMCE menus
    … …  
    715719
    716720                        // WordPress strings
    717                         'Help' => __('Help'),
    718                         'Toolbar Toggle' => __('Toolbar Toggle'),
    719                         'Insert Read More tag' => __('Insert Read More tag'),
    720                         'Distraction Free Writing' => __('Distraction Free Writing'),
     721                        'Help' => __( 'Help' ),
     722                        'Toolbar Toggle' => __( 'Toolbar Toggle' ),
     723                        'Insert Read More tag' => __( 'Insert Read More tag' ),
     724                        'Distraction Free Writing' => __( 'Distraction Free Writing' ),
    721725                );
    722726
Note: See TracChangeset for help on using the changeset viewer.