Make WordPress Core


Ignore:
Timestamp:
08/14/2014 06:50:04 PM (10 years ago)
Author:
wonderboymusic
Message:

Media Grid, support MEDIA_TRASH:

  • Only use the special trashAttachment logic when in edit-metadata mode.
  • Don't support the trash filter in the Add Media modal for now.
  • Properly toggle trash/untrash logic in the Attachment Details sidebar

See #29145.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r29490 r29491  
    509509                <# if ( ! data.uploading && data.can.remove ) { #>
    510510                    <?php if ( MEDIA_TRASH ): ?>
     511                    <# if ( 'trash' === data.status ) { #>
     512                        <a class="untrash-attachment" href="#"><?php _e( 'Untrash' ); ?></a>
     513                    <# } else { #>
    511514                        <a class="trash-attachment" href="#"><?php _e( 'Trash' ); ?></a>
     515                    <# } #>
    512516                    <?php else: ?>
    513517                        <a class="delete-attachment" href="#"><?php _e( 'Delete Permanently' ); ?></a>
Note: See TracChangeset for help on using the changeset viewer.