Coding Standards: Add missing braces to `if` conditions and use strict comparison in `js/_enqueues/wp/media/editor.js`.
Props ankitmaru. Fixes #49317. Built from https://develop.svn.wordpress.org/trunk@47349 git-svn-id: http://core.svn.wordpress.org/trunk@47136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9f8f54bfbb
commit
735d31ffbb
|
@ -164,8 +164,9 @@
|
|||
var shortcode, html, extension;
|
||||
|
||||
props = wp.media.string.props( props, attachment );
|
||||
if ( props.link !== 'embed' )
|
||||
if ( props.link !== 'embed' ) {
|
||||
return wp.media.string.link( props );
|
||||
}
|
||||
|
||||
shortcode = {};
|
||||
|
||||
|
@ -446,7 +447,7 @@
|
|||
|
||||
if ( attrs._orderbyRandom ) {
|
||||
attrs.orderby = 'rand';
|
||||
} else if ( attrs._orderByField && attrs._orderByField != 'rand' ) {
|
||||
} else if ( attrs._orderByField && 'rand' !== attrs._orderByField ) {
|
||||
attrs.orderby = attrs._orderByField;
|
||||
}
|
||||
|
||||
|
@ -625,7 +626,7 @@
|
|||
thumbnail_id: settings.post.featuredImageId,
|
||||
_wpnonce: settings.post.nonce
|
||||
}).done( function( html ) {
|
||||
if ( html == '0' ) {
|
||||
if ( '0' === html ) {
|
||||
window.alert( window.setPostThumbnailL10n.error );
|
||||
return;
|
||||
}
|
||||
|
@ -801,8 +802,9 @@
|
|||
|
||||
selection = selection || state.get('selection');
|
||||
|
||||
if ( ! selection )
|
||||
if ( ! selection ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.when.apply( $, selection.map( function( attachment ) {
|
||||
var display = state.display( attachment ).toJSON();
|
||||
|
@ -965,8 +967,9 @@
|
|||
size: 'image-size',
|
||||
alt: 'image_alt'
|
||||
}, function( option, prop ) {
|
||||
if ( props[ prop ] )
|
||||
if ( props[ prop ] ) {
|
||||
options[ option ] = props[ prop ];
|
||||
}
|
||||
});
|
||||
} else if ( 'video' === attachment.type ) {
|
||||
html = wp.media.string.video( props, attachment );
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.4-beta2-47348';
|
||||
$wp_version = '5.4-beta2-47349';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue