WordPress.org

Make WordPress Core

Changeset 29671


Ignore:
Timestamp:
09/02/2014 09:07:08 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Restore 'insert-media-button' as an ID attribute for the first instance of media_buttons(). Remove IDs for subsequent instances.

props nacin.
fixes #28090.

Location:
trunk/src/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-form-advanced.php

    r29654 r29671  
    505505    'dfw' => true,
    506506    'drag_drop_upload' => true,
    507     'tabfocus_elements' => 'insert-media-button-1,save-post',
     507    'tabfocus_elements' => 'insert-media-button,save-post',
    508508    'editor_height' => 300,
    509509    'tinymce' => array(
  • trunk/src/wp-admin/includes/media.php

    r29355 r29671  
    529529    $img = '<span class="wp-media-buttons-icon"></span> ';
    530530
    531     printf( '<a href="#" id="insert-media-button-%d" class="button insert-media add_media" data-editor="%s" title="%s">%s</a>',
    532         $instance,
     531    $id_attribute = $instance === 1 ? ' id="insert-media-button"' : '';
     532    printf( '<a href="#"%s class="button insert-media add_media" data-editor="%s" title="%s">%s</a>',
     533        $id_attribute,
    533534        esc_attr( $editor_id ),
    534535        esc_attr__( 'Add Media' ),
Note: See TracChangeset for help on using the changeset viewer.