Make WordPress Core

Changeset 36931


Ignore:
Timestamp:
03/10/2016 05:41:04 AM (11 years ago)
Author:
pento
Message:

Customize: Update cropper.js to match changes in [36866].

media-views.js was updated, but the changes weren't added to cropper.js, which caused the grunt precommit:js job to incorrectly remove the changes from media-views.js.

Fixes #32783.

File:
1 edited

Legend:

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

    r33337 r36931  
    1919                content:     'crop',
    2020                router:      false,
     21                canSkipCrop: false,
    2122
    22                 canSkipCrop: false
     23                // Default doCrop Ajax arguments to allow the Customizer (for example) to inject state.
     24                doCropArgs: {}
    2325        },
    2426
    … …  
    104106
    105107        doCrop: function( attachment ) {
    106                 return wp.ajax.post( 'custom-header-crop', {
    107                         nonce: attachment.get('nonces').edit,
    108                         id: attachment.get('id'),
    109                         cropDetails: attachment.get('cropDetails')
    110                 } );
     108                return wp.ajax.post( 'custom-header-crop', _.extend(
     109                        {},
     110                        this.defaults.doCropArgs,
     111                        {
     112                                nonce: attachment.get( 'nonces' ).edit,
     113                                id: attachment.get( 'id' ),
     114                                cropDetails: attachment.get( 'cropDetails' )
     115                        }
     116                ) );
    111117        }
    112118});
Note: See TracChangeset for help on using the changeset viewer.