Restore 'insert-media-button' as an ID attribute for the first instance of media_buttons(). Remove IDs for subsequent instances.
props nacin. fixes #28090. Built from https://develop.svn.wordpress.org/trunk@29671 git-svn-id: http://core.svn.wordpress.org/trunk@29445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3920e17e19
commit
5faf09a261
|
@ -504,7 +504,7 @@ if ( post_type_supports($post_type, 'editor') ) {
|
|||
<?php wp_editor( $post->post_content, 'content', array(
|
||||
'dfw' => true,
|
||||
'drag_drop_upload' => true,
|
||||
'tabfocus_elements' => 'insert-media-button-1,save-post',
|
||||
'tabfocus_elements' => 'insert-media-button,save-post',
|
||||
'editor_height' => 300,
|
||||
'tinymce' => array(
|
||||
'resize' => false,
|
||||
|
|
|
@ -528,8 +528,9 @@ function media_buttons($editor_id = 'content') {
|
|||
|
||||
$img = '<span class="wp-media-buttons-icon"></span> ';
|
||||
|
||||
printf( '<a href="#" id="insert-media-button-%d" class="button insert-media add_media" data-editor="%s" title="%s">%s</a>',
|
||||
$instance,
|
||||
$id_attribute = $instance === 1 ? ' id="insert-media-button"' : '';
|
||||
printf( '<a href="#"%s class="button insert-media add_media" data-editor="%s" title="%s">%s</a>',
|
||||
$id_attribute,
|
||||
esc_attr( $editor_id ),
|
||||
esc_attr__( 'Add Media' ),
|
||||
$img . __( 'Add Media' )
|
||||
|
|
Loading…
Reference in New Issue