Replace flagrant instances of .html('')
with .empty()
.
Props OriginalEXE, SergeyBiryukov. Fixes #27034. git-svn-id: https://develop.svn.wordpress.org/trunk@31690 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
64e63da3f6
commit
69c449963e
src
wp-admin/js
wp-includes/js
@ -351,7 +351,7 @@ commentReply = {
|
||||
$('#com-reply').append( replyrow );
|
||||
$('#replycontent').css('height', '').val('');
|
||||
$('#edithead input').val('');
|
||||
$('.error', replyrow).html('').hide();
|
||||
$('.error', replyrow).empty().hide();
|
||||
$('.spinner', replyrow).hide();
|
||||
|
||||
this.cid = '';
|
||||
|
@ -286,7 +286,7 @@ inlineEditPost = {
|
||||
|
||||
if ( 'bulk-edit' === id ) {
|
||||
$('table.widefat #bulk-edit').removeClass('inline-editor').hide().siblings('tr.hidden').remove();
|
||||
$('#bulk-titles').html('');
|
||||
$('#bulk-titles').empty();
|
||||
$('#inlineedit').append( $('#bulk-edit') );
|
||||
} else {
|
||||
$('#'+id).siblings('tr.hidden').addBack().remove();
|
||||
|
@ -32,7 +32,7 @@ var findPosts;
|
||||
},
|
||||
|
||||
close: function() {
|
||||
$('#find-posts-response').html('');
|
||||
$('#find-posts-response').empty();
|
||||
$('#find-posts').hide();
|
||||
$( '.ui-find-overlay' ).hide();
|
||||
},
|
||||
|
@ -900,7 +900,7 @@ themes.view.Themes = wp.Backbone.View.extend({
|
||||
// and keeping theme count in sync
|
||||
render: function() {
|
||||
// Clear the DOM, please
|
||||
this.$el.html( '' );
|
||||
this.$el.empty();
|
||||
|
||||
// If the user doesn't have switch capabilities
|
||||
// or there is only one theme in the collection
|
||||
|
@ -233,7 +233,7 @@ wpWidgets = {
|
||||
},
|
||||
drop: function(e,ui) {
|
||||
ui.draggable.addClass('deleting');
|
||||
$('#removing-widget').hide().children('span').html('');
|
||||
$('#removing-widget').hide().children('span').empty();
|
||||
},
|
||||
over: function(e,ui) {
|
||||
ui.draggable.addClass('deleting');
|
||||
@ -247,7 +247,7 @@ wpWidgets = {
|
||||
out: function(e,ui) {
|
||||
ui.draggable.removeClass('deleting');
|
||||
$('div.widget-placeholder').show();
|
||||
$('#removing-widget').hide().children('span').html('');
|
||||
$('#removing-widget').hide().children('span').empty();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -4604,7 +4604,7 @@ EmbedLink = Settings.extend({
|
||||
var url = this.model.get( 'url' );
|
||||
|
||||
// clear out previous results
|
||||
this.$('.embed-container').hide().find('.embed-preview').html('');
|
||||
this.$('.embed-container').hide().find('.embed-preview').empty();
|
||||
this.$( '.setting' ).hide();
|
||||
|
||||
// only proceed with embed if the field contains more than 6 characters
|
||||
|
@ -27,7 +27,7 @@ EmbedLink = Settings.extend({
|
||||
var url = this.model.get( 'url' );
|
||||
|
||||
// clear out previous results
|
||||
this.$('.embed-container').hide().find('.embed-preview').html('');
|
||||
this.$('.embed-container').hide().find('.embed-preview').empty();
|
||||
this.$( '.setting' ).hide();
|
||||
|
||||
// only proceed with embed if the field contains more than 6 characters
|
||||
|
@ -448,7 +448,7 @@ jQuery(document).ready(function($){
|
||||
uploader.init();
|
||||
|
||||
uploader.bind('FilesAdded', function( up, files ) {
|
||||
$('#media-upload-error').html('');
|
||||
$('#media-upload-error').empty();
|
||||
uploadStart();
|
||||
|
||||
plupload.each( files, function( file ) {
|
||||
|
@ -12,7 +12,7 @@ var wpAjax = jQuery.extend( {
|
||||
return r;
|
||||
},
|
||||
parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission
|
||||
var parsed = {}, re = jQuery('#' + r).html(''), err = '';
|
||||
var parsed = {}, re = jQuery('#' + r).empty(), err = '';
|
||||
|
||||
if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) {
|
||||
parsed.responses = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user