Changeset 47349
- Timestamp:
- 02/23/2020 08:56:44 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/media/editor.js
r47122 r47349 165 165 166 166 props = wp.media.string.props( props, attachment ); 167 if ( props.link !== 'embed' ) 167 if ( props.link !== 'embed' ) { 168 168 return wp.media.string.link( props ); 169 } 169 170 170 171 shortcode = {}; … … 447 448 if ( attrs._orderbyRandom ) { 448 449 attrs.orderby = 'rand'; 449 } else if ( attrs._orderByField && attrs._orderByField != 'rand') {450 } else if ( attrs._orderByField && 'rand' !== attrs._orderByField ) { 450 451 attrs.orderby = attrs._orderByField; 451 452 } … … 626 627 _wpnonce: settings.post.nonce 627 628 }).done( function( html ) { 628 if ( html == '0') {629 if ( '0' === html ) { 629 630 window.alert( window.setPostThumbnailL10n.error ); 630 631 return; … … 802 803 selection = selection || state.get('selection'); 803 804 804 if ( ! selection ) 805 if ( ! selection ) { 805 806 return; 807 } 806 808 807 809 $.when.apply( $, selection.map( function( attachment ) { … … 966 968 alt: 'image_alt' 967 969 }, function( option, prop ) { 968 if ( props[ prop ] ) 970 if ( props[ prop ] ) { 969 971 options[ option ] = props[ prop ]; 972 } 970 973 }); 971 974 } else if ( 'video' === attachment.type ) {
Note: See TracChangeset
for help on using the changeset viewer.