Add TinyMCE command to handle opening of the upload/insert popup, fix the shortcut "Alt+Shift+M", fix the "image" button in DFW, fixes #17992, fixes #18697, see $17144

git-svn-id: https://develop.svn.wordpress.org/trunk@18710 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2011-09-19 00:47:23 +00:00
parent e984d8503b
commit 945d4500b4
10 changed files with 38 additions and 76 deletions

View File

@@ -594,10 +594,6 @@ class WP_Editor {
<div id="wp-fullscreen-button-bar"><div id="wp-fullscreen-buttons" class="wp_themeSkin">
<?php
$media_link_type = 'image';
if ( is_multisite() && ( ( ! $mu_media_buttons = get_site_option( 'mu_media_buttons' ) ) || empty( $mu_media_buttons['image'] ) ) )
$media_link_type = 'media';
$buttons = array(
// format: title, onclick, show in both editors
'bold' => array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ),
@@ -607,7 +603,7 @@ class WP_Editor {
'numlist' => array( 'title' => __('Ordered list (Alt + Shift + O)'), 'onclick' => 'fullscreen.ol();', 'both' => false ),
'1' => 'separator',
'blockquote' => array( 'title' => __('Blockquote (Alt+Shift+Q)'), 'onclick' => 'fullscreen.blockquote();', 'both' => false ),
'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_{$media_link_type}').click();", 'both' => true ),
'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "fullscreen.medialib();", 'both' => true ),
'2' => 'separator',
'link' => array( 'title' => __('Insert/edit link (Alt + Shift + A)'), 'onclick' => 'fullscreen.link();', 'both' => true ),
'unlink' => array( 'title' => __('Unlink (Alt + Shift + S)'), 'onclick' => 'fullscreen.unlink();', 'both' => false ),