WordPress.org

Make WordPress Core

Ticket #5911: 5911-15.diff

File 5911-15.diff, 946 bytes (added by andy, 10 years ago)

Revive and filter "Add media:" text beside upload buttons

  • wp-admin/includes/media.php

     
    156156function media_buttons() {
    157157        global $post_ID, $temp_ID;
    158158        $uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID);
     159        $context = apply_filters('media_buttons_context', __('Add media: %s'));
    159160        $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID";
    160161        $media_title = __('Add Media');
    161162        $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src&type=image");
     
    172173        <a href="{$media_upload_iframe_src}&TB_iframe=true&height=500&width=640" class="thickbox" title='$media_title'><img src='images/media-button-other.gif' alt='$media_title' /></a>
    173174
    174175EOF;
    175         echo $out;
     176        printf($context, $out);
    176177}
    177178add_action( 'media_buttons', 'media_buttons' );
    178179