| @@ -1,8 +1,7 @@ | ||
| 1 | 1 | /** |
| 2 | 2 | * Bulk Edit |
| 3 | 3 | * |
| 4 | - * @package ConvertKit | |
| 5 | 4 | * @author ConvertKit |
| 6 | 5 | */ |
| 7 | 6 | |
| 8 | 7 | /** |
| @@ -12,18 +11,19 @@ | ||
| 12 | 11 | * for Plugins that register settings, which is why we have this code here. |
| 13 | 12 | * |
| 14 | 13 | * @since 1.9.8.0 |
| 15 | 14 | */ |
| 16 | -jQuery( document ).ready( | |
| 17 | - function( $ ) { | |
| 15 | +document.addEventListener('DOMContentLoaded', function () { | |
| 16 | + const convertKitBulkEditWrapper = document.querySelector( | |
| 17 | + 'tr#bulk-edit .inline-edit-wrapper fieldset.inline-edit-col-right' | |
| 18 | + ), | |
| 19 | + convertKitBulkEdit = document.querySelector('#convertkit-bulk-edit'); | |
| 18 | 20 | |
| 21 | + if (convertKitBulkEditWrapper) { | |
| 19 | 22 | // Move Bulk Edit fields from footer into the hidden bulk-edit table row, |
| 20 | 23 | // if a bulk-edit table row exists (it won't exist if searching returns no pages). |
| 21 | - if ( $( 'tr#bulk-edit .inline-edit-wrapper fieldset.inline-edit-col-right' ).length > 0 ) { | |
| 22 | - $( 'tr#bulk-edit .inline-edit-wrapper fieldset.inline-edit-col-right' ).first().append( $( '#convertkit-bulk-edit' ) ); | |
| 24 | + convertKitBulkEditWrapper.appendChild(convertKitBulkEdit); | |
| 23 | 25 | |
| 24 | - // Show the Bulk Edit fields, as they are now contained in the inline-edit row which WordPress will show/hide as necessary. | |
| 25 | - $( '#convertkit-bulk-edit' ).show(); | |
| 26 | - } | |
| 27 | - | |
| 26 | + // Show the Bulk Edit fields, as they are now contained in the inline-edit row which WordPress will show/hide as necessary. | |
| 27 | + convertKitBulkEdit.style.display = 'block'; | |
| 28 | 28 | } |
| 29 | -); | |
| 29 | +}); | |