From f158ed15d2a494512c75c583b06d95666fc11a6a Mon Sep 17 00:00:00 2001 From: azaozz Date: Thu, 30 Jun 2011 19:23:09 +0000 Subject: [PATCH] DFW: check if the Add Image button is enabled in ms mode before using it, props nacin, fixes #17942 git-svn-id: http://svn.automattic.com/wordpress/trunk@18380 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/post.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index c236fc7a62..a29cedf469 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1792,6 +1792,10 @@ function wp_fullscreen_html() {
array( 'title' => __('Bold (Ctrl + B)'), 'onclick' => 'fullscreen.b();', 'both' => false ), @@ -1801,7 +1805,7 @@ function wp_fullscreen_html() { '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_image').click();", 'both' => true ), + 'image' => array( 'title' => __('Insert/edit image (Alt + Shift + M)'), 'onclick' => "jQuery('#add_{$media_link_type}').click();", '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 ),