diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php
index 8dc481508f..84fcf601fd 100644
--- a/src/wp-admin/edit-form-advanced.php
+++ b/src/wp-admin/edit-form-advanced.php
@@ -488,7 +488,7 @@ if ( post_type_supports($post_type, 'editor') ) {
post_content, 'content', array(
'dfw' => true,
'drag_drop_upload' => true,
- 'tabfocus_elements' => 'insert-media-button,save-post',
+ 'tabfocus_elements' => 'insert-media-button-1,save-post',
'editor_height' => 360,
'tinymce' => array(
'resize' => false,
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index bc27afd751..fec570eb8a 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -514,6 +514,9 @@ document.body.className = document.body.className.replace('no-js', 'js');
* @param string $editor_id
*/
function media_buttons($editor_id = 'content') {
+ static $instance = 0;
+ $instance++;
+
$post = get_post();
if ( ! $post && ! empty( $GLOBALS['post_ID'] ) )
$post = $GLOBALS['post_ID'];
@@ -524,8 +527,12 @@ function media_buttons($editor_id = 'content') {
$img = ' ';
- echo '' . $img . __( 'Add Media' ) . '';
-
+ printf( '%s',
+ $instance,
+ esc_attr( $editor_id ),
+ esc_attr__( 'Add Media' ),
+ $img . __( 'Add Media' )
+ );
/**
* Filter the legacy (pre-3.5.0) media buttons.
*