- 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

Built from https://develop.svn.wordpress.org/trunk@27660


git-svn-id: http://core.svn.wordpress.org/trunk@27503 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2014-03-23 07:10:14 +00:00
parent 16f93f3952
commit 33faa15a11
5 changed files with 105 additions and 59 deletions

View File

@ -80,7 +80,7 @@ body.press-this {
} }
.press-this .posting { .press-this .posting {
margin-left: 252px; margin-left: 250px;
} }
.press-this-sidebar { .press-this-sidebar {
@ -105,11 +105,32 @@ body.press-this {
margin: 0; margin: 0;
} }
.press-this #wp-content-wrap #wp-content-editor-tools {
padding: 0;
top: 3px;
overflow: hidden;
}
.press-this .wp-media-buttons { .press-this .wp-media-buttons {
cursor: default; cursor: default;
padding: 8px 8px 6px; padding: 8px 8px 6px;
} }
.press-this #wp-content-wrap #wp-content-media-buttons a {
padding: 0;
line-height: normal;
height: auto;
font-size: 16px;
}
.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn {
margin: 0 1px;
}
.press-this #wp-content-wrap .mce-toolbar .mce-btn button {
padding: 2px 3px;
}
.press-this .howto { .press-this .howto {
margin-top: 2px; margin-top: 2px;
margin-bottom: 3px; margin-bottom: 3px;
@ -132,7 +153,7 @@ body.press-this {
/* Editor/Main Column */ /* Editor/Main Column */
.press-this #poststuff { .press-this #poststuff {
margin: 0 10px 10px; margin: 0 8px;
padding: 0; padding: 0;
} }
@ -323,7 +344,7 @@ h3.tb {
margin: 5px 0; margin: 5px 0;
padding: 0 5px; padding: 0 5px;
border: 0 none; border: 0 none;
height: 345px; height: 340px;
font-family: Consolas, Monaco, monospace; font-family: Consolas, Monaco, monospace;
font-size: 13px; font-size: 13px;
line-height: 19px; line-height: 19px;

View File

@ -80,7 +80,7 @@ body.press-this {
} }
.press-this .posting { .press-this .posting {
margin-right: 252px; margin-right: 250px;
} }
.press-this-sidebar { .press-this-sidebar {
@ -105,11 +105,32 @@ body.press-this {
margin: 0; margin: 0;
} }
.press-this #wp-content-wrap #wp-content-editor-tools {
padding: 0;
top: 3px;
overflow: hidden;
}
.press-this .wp-media-buttons { .press-this .wp-media-buttons {
cursor: default; cursor: default;
padding: 8px 8px 6px; padding: 8px 8px 6px;
} }
.press-this #wp-content-wrap #wp-content-media-buttons a {
padding: 0;
line-height: normal;
height: auto;
font-size: 16px;
}
.press-this #wp-content-wrap .mce-toolbar .mce-btn-group .mce-btn {
margin: 0 1px;
}
.press-this #wp-content-wrap .mce-toolbar .mce-btn button {
padding: 2px 3px;
}
.press-this .howto { .press-this .howto {
margin-top: 2px; margin-top: 2px;
margin-bottom: 3px; margin-bottom: 3px;
@ -132,7 +153,7 @@ body.press-this {
/* Editor/Main Column */ /* Editor/Main Column */
.press-this #poststuff { .press-this #poststuff {
margin: 0 10px 10px; margin: 0 8px;
padding: 0; padding: 0;
} }
@ -323,7 +344,7 @@ h3.tb {
margin: 5px 0; margin: 5px 0;
padding: 0 5px; padding: 0 5px;
border: 0 none; border: 0 none;
height: 345px; height: 340px;
font-family: Consolas, Monaco, monospace; font-family: Consolas, Monaco, monospace;
font-size: 13px; font-size: 13px;
line-height: 19px; line-height: 19px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -223,13 +223,7 @@ final class _WP_Editors {
*/ */
$mce_external_plugins = apply_filters( 'mce_external_plugins', array() ); $mce_external_plugins = apply_filters( 'mce_external_plugins', array() );
/** $plugins = array(
* TinyMCE default plugins filter
*
* Specifies which of the default plugins that are included in WordPress should be added to
* the TinyMCE instance.
*/
$plugins = array_unique( apply_filters( 'tiny_mce_plugins', array(
'charmap', 'charmap',
'hr', 'hr',
'media', 'media',
@ -243,7 +237,19 @@ final class _WP_Editors {
'wplink', 'wplink',
'wpdialogs', 'wpdialogs',
'wpview', 'wpview',
) ) ); );
if ( ! self::$has_medialib ) {
$plugins[] = 'image';
}
/**
* TinyMCE default plugins filter
*
* Specifies which of the default plugins that are included in WordPress should be added to
* the TinyMCE instance.
*/
$plugins = array_unique( apply_filters( 'tiny_mce_plugins', $plugins ) );
if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) { if ( ( $key = array_search( 'spellchecker', $plugins ) ) !== false ) {
// Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors. // Remove 'spellchecker' from the internal plugins if added with 'tiny_mce_plugins' filter to prevent errors.
@ -507,9 +513,6 @@ final class _WP_Editors {
if ( self::$has_medialib ) { if ( self::$has_medialib ) {
add_thickbox(); add_thickbox();
wp_enqueue_script('media-upload'); wp_enqueue_script('media-upload');
if ( self::$has_tinymce )
wp_enqueue_script('mce-view');
} }
} }
@ -540,17 +543,17 @@ final class _WP_Editors {
'Subscript' => __( 'Subscript' ), 'Subscript' => __( 'Subscript' ),
'Superscript' => __( 'Superscript' ), 'Superscript' => __( 'Superscript' ),
'Clear formatting' => __( 'Clear formatting' ), 'Clear formatting' => __( 'Clear formatting' ),
'Bold' => __('Bold'), 'Bold' => __( 'Bold' ),
'Italic' => __('Italic'), 'Italic' => __( 'Italic' ),
'Code' => _x( 'Code', 'editor button' ), 'Code' => _x( 'Code', 'editor button' ),
'Source code' => __( 'Source code' ), 'Source code' => __( 'Source code' ),
'Align center' => __('Align center'), 'Align center' => __( 'Align center' ),
'Align right' => __('Align right'), 'Align right' => __( 'Align right' ),
'Align left' => __( 'Align left' ), 'Align left' => __( 'Align left' ),
'Justify' => __('Justify'), 'Justify' => __( 'Justify' ),
'Increase indent' => __('Increase indent'), 'Increase indent' => __( 'Increase indent' ),
'Decrease indent' => __('Decrease indent'), 'Decrease indent' => __( 'Decrease indent' ),
'Cut' => __( 'Cut' ), 'Cut' => __( 'Cut' ),
'Copy' => __( 'Copy' ), 'Copy' => __( 'Copy' ),
@ -565,7 +568,7 @@ final class _WP_Editors {
'Visual aids' => __( 'Visual aids' ), 'Visual aids' => __( 'Visual aids' ),
'Bullet list' => __( 'Bulleted list' ), 'Bullet list' => __( 'Bulleted list' ),
'Numbered list' => __('Numbered list'), 'Numbered list' => __( 'Numbered list' ),
'Square' => _x( 'Square', 'list style' ), 'Square' => _x( 'Square', 'list style' ),
'Default' => _x( 'Default', 'list style' ), 'Default' => _x( 'Default', 'list style' ),
'Circle' => _x( 'Circle', 'list style' ), 'Circle' => _x( 'Circle', 'list style' ),
@ -591,24 +594,24 @@ final class _WP_Editors {
'Author' => __( 'Author' ), 'Author' => __( 'Author' ),
// Media, image plugins // Media, image plugins
'Insert/edit image' => __('Insert/edit image'), 'Insert/edit image' => __( 'Insert/edit image' ),
'General' => __('General'), 'General' => __( 'General' ),
'Advanced' => __('Advanced'), 'Advanced' => __( 'Advanced' ),
'Source' => __('Source'), 'Source' => __( 'Source' ),
'Border' => __('Border'), 'Border' => __( 'Border' ),
'Constrain proportions' => __('Constrain proportions'), 'Constrain proportions' => __( 'Constrain proportions' ),
'Vertical space' => __('Vertical space'), 'Vertical space' => __( 'Vertical space' ),
'Image description' => __('Image description'), 'Image description' => __( 'Image description' ),
'Style' => __('Style'), 'Style' => __( 'Style' ),
'Dimensions' => __('Dimensions'), 'Dimensions' => __( 'Dimensions' ),
'Insert image' => __('Insert image'), 'Insert image' => __( 'Insert image' ),
'Insert date/time' => __('Insert date/time'), 'Insert date/time' => __( 'Insert date/time' ),
'Insert/edit video' => __('Insert/edit video'), 'Insert/edit video' => __( 'Insert/edit video' ),
'Poster' => __('Poster'), 'Poster' => __( 'Poster' ),
'Alternative source' => __('Alternative source'), 'Alternative source' => __( 'Alternative source' ),
'Paste your embed code below:' => __('Paste your embed code below:'), 'Paste your embed code below:' => __( 'Paste your embed code below:' ),
'Insert video' => __('Insert video'), 'Insert video' => __( 'Insert video' ),
'Embed' => __('Embed'), 'Embed' => __( 'Embed' ),
// Each of these have a corresponding plugin // Each of these have a corresponding plugin
'Special character' => __( 'Special character' ), 'Special character' => __( 'Special character' ),
@ -625,6 +628,7 @@ final class _WP_Editors {
'Horizontal line' => __( 'Horizontal line' ), 'Horizontal line' => __( 'Horizontal line' ),
'Horizontal space' => __( 'Horizontal space' ), 'Horizontal space' => __( 'Horizontal space' ),
'Restore last draft' => __( 'Restore last draft' ), 'Restore last draft' => __( 'Restore last draft' ),
'Insert/edit link' => __( 'Insert/edit link' ),
// Spelling, search/replace plugins // Spelling, search/replace plugins
'Could not find the specified string.' => __( 'Could not find the specified string.' ), 'Could not find the specified string.' => __( 'Could not find the specified string.' ),
@ -633,11 +637,11 @@ final class _WP_Editors {
/* translators: previous */ /* translators: previous */
'Prev' => _x( 'Prev', 'find/replace' ), 'Prev' => _x( 'Prev', 'find/replace' ),
'Whole words' => _x( 'Whole words', 'find/replace' ), 'Whole words' => _x( 'Whole words', 'find/replace' ),
'Find and replace' => __('Find and replace' ), 'Find and replace' => __( 'Find and replace' ),
'Replace with' => _x('Replace with', 'find/replace' ), 'Replace with' => _x('Replace with', 'find/replace' ),
'Find' => _x( 'Find', 'find/replace' ), 'Find' => _x( 'Find', 'find/replace' ),
'Replace all' => _x( 'Replace all', 'find/replace' ), 'Replace all' => _x( 'Replace all', 'find/replace' ),
'Match case' => __('Match case'), 'Match case' => __( 'Match case' ),
'Spellcheck' => __( 'Check Spelling' ), 'Spellcheck' => __( 'Check Spelling' ),
'Finish' => _x( 'Finish', 'spellcheck' ), 'Finish' => _x( 'Finish', 'spellcheck' ),
'Ignore all' => _x( 'Ignore all', 'spellcheck' ), 'Ignore all' => _x( 'Ignore all', 'spellcheck' ),
@ -661,20 +665,20 @@ final class _WP_Editors {
'Footer' => _x( 'Footer', 'table footer' ), 'Footer' => _x( 'Footer', 'table footer' ),
'Insert row before' => __( 'Insert row before' ), 'Insert row before' => __( 'Insert row before' ),
'Insert row after' => __('Insert row after'), 'Insert row after' => __( 'Insert row after' ),
'Insert column before' => __( 'Insert column before' ), 'Insert column before' => __( 'Insert column before' ),
'Insert column after' => __( 'Insert column after' ), 'Insert column after' => __( 'Insert column after' ),
'Paste row before' => __( 'Paste table row before' ), 'Paste row before' => __( 'Paste table row before' ),
'Paste row after' => __( 'Paste table row after' ), 'Paste row after' => __( 'Paste table row after' ),
'Delete row' => __( 'Delete row' ), 'Delete row' => __( 'Delete row' ),
'Delete column' => __('Delete column'), 'Delete column' => __( 'Delete column' ),
'Cut row' => __('Cut table row' ), 'Cut row' => __( 'Cut table row' ),
'Copy row' => __( 'Copy table row' ), 'Copy row' => __( 'Copy table row' ),
'Merge cells' => __( 'Merge table cells' ), 'Merge cells' => __( 'Merge table cells' ),
'Split cell' => __( 'Split merged table cells' ), 'Split cell' => __( 'Split table cell' ),
'Height' => __( 'Height' ), 'Height' => __( 'Height' ),
'Width' => __('Width'), 'Width' => __( 'Width' ),
'Caption' => __( 'Caption' ), 'Caption' => __( 'Caption' ),
'Alignment' => __( 'Alignment' ), 'Alignment' => __( 'Alignment' ),
'Left' => __( 'Left' ), 'Left' => __( 'Left' ),
@ -699,10 +703,10 @@ final class _WP_Editors {
/* translators: word count */ /* translators: word count */
'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ), 'Words: {0}' => sprintf( __( 'Words: %s' ), '{0}' ),
'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.'), '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.' ),
'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'), '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' ),
'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.' ), '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.' ),
'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.'), '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.' ),
// TinyMCE menus // TinyMCE menus
'Insert' => _x( 'Insert', 'TinyMCE menu' ), 'Insert' => _x( 'Insert', 'TinyMCE menu' ),
@ -714,10 +718,10 @@ final class _WP_Editors {
'Format' => _x( 'Format', 'TinyMCE menu' ), 'Format' => _x( 'Format', 'TinyMCE menu' ),
// WordPress strings // WordPress strings
'Help' => __('Help'), 'Help' => __( 'Help' ),
'Toolbar Toggle' => __('Toolbar Toggle'), 'Toolbar Toggle' => __( 'Toolbar Toggle' ),
'Insert Read More tag' => __('Insert Read More tag'), 'Insert Read More tag' => __( 'Insert Read More tag' ),
'Distraction Free Writing' => __('Distraction Free Writing'), 'Distraction Free Writing' => __( 'Distraction Free Writing' ),
); );
$baseurl = self::$baseurl; $baseurl = self::$baseurl;