admin.js in ElasticPress 4.7.2, at assets/js/admin.js
| 1 | /** |
| 2 | * WordPress dependencies. |
| 3 | */ |
| 4 | import domReady from '@wordpress/dom-ready'; |
| 5 | |
| 6 | /** |
| 7 | * Initialize. |
| 8 | * |
| 9 | * @returns {void} |
| 10 | */ |
| 11 | const init = () => { |
| 12 | /** |
| 13 | * If '.wp-header-end' is found, append the notices after it. |
| 14 | */ |
| 15 | const headerEnd = document.getElementById('ep-wp-header-end'); |
| 16 | const notices = document.querySelectorAll('div.update-nag'); |
| 17 | |
| 18 | for (const notice of notices) { |
| 19 | headerEnd.after(notice); |
| 20 | } |
| 21 | }; |
| 22 | |
| 23 | /** |
| 24 | * Initialize. |
| 25 | */ |
| 26 | domReady(init); |
| 27 |