Make WordPress Core

Changeset 29492


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

Media Grid, support MEDIA_TRASH: add AYS to bulk actions.

See #29145.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r29491 r29492  
    58745874                            selection = this.controller.state().get( 'selection' ),
    58755875                            library = this.controller.state().get( 'library' );
     5876
     5877                        if ( ! selection.length ) {
     5878                            return;
     5879                        }
     5880
     5881                        if ( ! media.view.settings.mediaTrash && ! confirm( l10n.warnBulkDelete ) ) {
     5882                            return;
     5883                        }
     5884
     5885                        if ( media.view.settings.mediaTrash
     5886                            && 'trash' !== selection.at( 0 ).get( 'status' )
     5887                            && ! confirm( l10n.warnBulkTrash ) ) {
     5888                            return;
     5889                        }
    58765890
    58775891                        while ( selection.length > 0 ) {
  • trunk/src/wp-includes/media.php

    r29490 r29492  
    29372937        'warnDelete'             => __( "You are about to permanently delete this item.\n  'Cancel' to stop, 'OK' to delete." ),
    29382938        'warnBulkDelete'         => __( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ),
     2939        'warnBulkTrash'          => __( "You are about to trash these items.\n  'Cancel' to stop, 'OK' to delete." ),
    29392940        'bulkSelect'             => __( 'Bulk Select' ),
    29402941        'cancelSelection'        => __( 'Cancel Selection' ),
Note: See TracChangeset for help on using the changeset viewer.