Make WordPress Core

Changeset 31690


Ignore:
Timestamp:
03/09/2015 07:43:49 PM (10 years ago)
Author:
wonderboymusic
Message:

Replace flagrant instances of .html('') with .empty().

Props OriginalEXE, SergeyBiryukov.
Fixes #27034.

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/edit-comments.js

    r29662 r31690  
    352352        $('#replycontent').css('height', '').val('');
    353353        $('#edithead input').val('');
    354         $('.error', replyrow).html('').hide();
     354        $('.error', replyrow).empty().hide();
    355355        $('.spinner', replyrow).hide();
    356356
  • trunk/src/wp-admin/js/inline-edit-post.js

    r31274 r31690  
    287287            if ( 'bulk-edit' === id ) {
    288288                $('table.widefat #bulk-edit').removeClass('inline-editor').hide().siblings('tr.hidden').remove();
    289                 $('#bulk-titles').html('');
     289                $('#bulk-titles').empty();
    290290                $('#inlineedit').append( $('#bulk-edit') );
    291291            } else {
  • trunk/src/wp-admin/js/media.js

    r31582 r31690  
    3333
    3434        close: function() {
    35             $('#find-posts-response').html('');
     35            $('#find-posts-response').empty();
    3636            $('#find-posts').hide();
    3737            $( '.ui-find-overlay' ).hide();
  • trunk/src/wp-admin/js/theme.js

    r31497 r31690  
    901901    render: function() {
    902902        // Clear the DOM, please
    903         this.$el.html( '' );
     903        this.$el.empty();
    904904
    905905        // If the user doesn't have switch capabilities
  • trunk/src/wp-admin/js/widgets.js

    r29726 r31690  
    234234            drop: function(e,ui) {
    235235                ui.draggable.addClass('deleting');
    236                 $('#removing-widget').hide().children('span').html('');
     236                $('#removing-widget').hide().children('span').empty();
    237237            },
    238238            over: function(e,ui) {
     
    248248                ui.draggable.removeClass('deleting');
    249249                $('div.widget-placeholder').show();
    250                 $('#removing-widget').hide().children('span').html('');
     250                $('#removing-widget').hide().children('span').empty();
    251251            }
    252252        });
  • trunk/src/wp-includes/js/media/views.js

    r31642 r31690  
    46054605
    46064606        // clear out previous results
    4607         this.$('.embed-container').hide().find('.embed-preview').html('');
     4607        this.$('.embed-container').hide().find('.embed-preview').empty();
    46084608        this.$( '.setting' ).hide();
    46094609
  • trunk/src/wp-includes/js/media/views/embed/link.js

    r31642 r31690  
    2828
    2929        // clear out previous results
    30         this.$('.embed-container').hide().find('.embed-preview').html('');
     30        this.$('.embed-container').hide().find('.embed-preview').empty();
    3131        this.$( '.setting' ).hide();
    3232
  • trunk/src/wp-includes/js/plupload/handlers.js

    r27693 r31690  
    449449
    450450        uploader.bind('FilesAdded', function( up, files ) {
    451             $('#media-upload-error').html('');
     451            $('#media-upload-error').empty();
    452452            uploadStart();
    453453
  • trunk/src/wp-includes/js/wp-ajax-response.js

    r26159 r31690  
    1313    },
    1414    parseAjaxResponse: function( x, r, e ) { // 1 = good, 0 = strange (bad data?), -1 = you lack permission
    15         var parsed = {}, re = jQuery('#' + r).html(''), err = '';
     15        var parsed = {}, re = jQuery('#' + r).empty(), err = '';
    1616
    1717        if ( x && typeof x == 'object' && x.getElementsByTagName('wp_ajax') ) {
Note: See TracChangeset for help on using the changeset viewer.