Fix JSHint errors in [31734] and add missing dependencies.
props iseulde. fixes #31328. git-svn-id: https://develop.svn.wordpress.org/trunk@31741 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
484733be3a
commit
8220541799
@ -272,9 +272,7 @@ inlineEditPost = {
|
||||
if ( -1 !== r.indexOf( '<tr' ) ) {
|
||||
$(inlineEditPost.what+id).siblings('tr.hidden').addBack().remove();
|
||||
$('#edit-'+id).before(r).remove();
|
||||
if ( WPEmoji ) {
|
||||
WPEmoji.parse( $( inlineEditPost.what + id ).get( 0 ) );
|
||||
}
|
||||
window.WPEmoji.parse( $( inlineEditPost.what + id ).get( 0 ) );
|
||||
$(inlineEditPost.what+id).hide().fadeIn();
|
||||
} else {
|
||||
r = r.replace( /<.[^<>]*?>/g, '' );
|
||||
|
@ -117,9 +117,7 @@ inlineEditTax = {
|
||||
// Update the value in the Parent dropdown.
|
||||
$( '#parent' ).find( 'option[value=' + option_value + ']' ).text( row.find( '.row-title' ).text() );
|
||||
|
||||
if ( WPEmoji ) {
|
||||
WPEmoji.parse( row.get( 0 ) );
|
||||
}
|
||||
window.WPEmoji.parse( row.get( 0 ) );
|
||||
|
||||
row.hide().fadeIn();
|
||||
} else {
|
||||
|
@ -741,9 +741,7 @@ jQuery(document).ready( function($) {
|
||||
});
|
||||
}
|
||||
|
||||
if ( WPEmoji ) {
|
||||
WPEmoji.parse( box.get( 0 ) );
|
||||
}
|
||||
window.WPEmoji.parse( box.get( 0 ) );
|
||||
|
||||
b.html(revert_b);
|
||||
real_slug.val(new_slug);
|
||||
|
@ -49,9 +49,7 @@ jQuery(document).ready(function($) {
|
||||
else
|
||||
$( '.tags' ).prepend( res.responses[0].supplemental.parents ); // As the parent is not visible, Insert the version with Parent - Child - ThisTerm
|
||||
|
||||
if ( WPEmoji ) {
|
||||
WPEmoji.parse( $( '.tags' ).get( 0 ) );
|
||||
}
|
||||
window.WPEmoji.parse( $( '.tags' ).get( 0 ) );
|
||||
|
||||
$('.tags .no-items').remove();
|
||||
|
||||
|
@ -447,7 +447,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->enqueue( 'emoji' );
|
||||
|
||||
if ( is_admin() ) {
|
||||
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array('jquery', 'wp-ajax-response'), false, 1 );
|
||||
$scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response', 'emoji' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array(
|
||||
'noPerm' => __('You do not have permission to do that.'),
|
||||
'broken' => __('An unidentified error has occurred.')
|
||||
@ -470,7 +470,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'tagDelimiter' => _x( ',', 'tag delimiter' ),
|
||||
) );
|
||||
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box' ), false, 1 );
|
||||
$scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'emoji' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array(
|
||||
'ok' => __('OK'),
|
||||
'cancel' => __('Cancel'),
|
||||
@ -522,7 +522,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
|
||||
$scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone' ), false, 1 );
|
||||
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest' ), false, 1 );
|
||||
$scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'emoji' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.'),
|
||||
'ntdeltitle' => __('Remove From Bulk Edit'),
|
||||
@ -530,7 +530,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
'comma' => trim( _x( ',', 'tag delimiter' ) ),
|
||||
) );
|
||||
|
||||
$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery' ), false, 1 );
|
||||
$scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'emoji' ), false, 1 );
|
||||
did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array(
|
||||
'error' => __('Error while saving the changes.')
|
||||
) );
|
||||
|
Loading…
Reference in New Issue
Block a user