diff --git a/src/wp-admin/js/inline-edit-post.js b/src/wp-admin/js/inline-edit-post.js index 7d47a2f5c5..ad83d7e20c 100644 --- a/src/wp-admin/js/inline-edit-post.js +++ b/src/wp-admin/js/inline-edit-post.js @@ -81,7 +81,7 @@ inlineEditPost = { var te = '', type = this.type, tax, c = true; this.revert(); - $('#bulk-edit td').attr('colspan', $('.widefat:first thead th:visible').length); + $( '#bulk-edit td' ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); // Insert the editor at the top of the table with an empty row above to maintain zebra striping. $('table.widefat tbody').prepend( $('#bulk-edit') ).prepend(''); $('#bulk-edit').addClass('inline-editor').show(); @@ -131,7 +131,7 @@ inlineEditPost = { // add the new edit row with an extra blank row underneath to maintain zebra striping. editRow = $('#inline-edit').clone(true); - $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); + $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); $(t.what+id).hide().after(editRow).after(''); diff --git a/src/wp-admin/js/inline-edit-tax.js b/src/wp-admin/js/inline-edit-tax.js index e1746462f5..99bfca4632 100644 --- a/src/wp-admin/js/inline-edit-tax.js +++ b/src/wp-admin/js/inline-edit-tax.js @@ -54,7 +54,7 @@ inlineEditTax = { } editRow = $('#inline-edit').clone(true), rowData = $('#inline_'+id); - $('td', editRow).attr('colspan', $('.widefat:first thead th:visible').length); + $( 'td', editRow ).attr( 'colspan', $( 'th:visible, td:visible', '.widefat:first thead' ).length ); $(t.what+id).hide().after(editRow).after('');