|
2 | 2 | * Show all jQuery Migrate warnings in the UI. |
3 | 3 | */ |
4 | 4 | jQuery( document ).ready( function( $ ) { |
5 | | -const notice = $( '.notice.jquery-migrate-deprecation-notice' ); |
6 | | -const warnings = jQuery.migrateWarnings || []; |
7 | | -const adminbar = $( '#wp-admin-bar-enable-jquery-migrate-helper' ); |
8 | | -const countWrapper = $( '.count-wrapper', adminbar ); |
| 5 | +var notice = $( '.notice.jquery-migrate-deprecation-notice' ); |
| 6 | +var warnings = jQuery.migrateWarnings || []; |
| 7 | +var adminbar = $( '#wp-admin-bar-enable-jquery-migrate-helper' ); |
| 8 | +var countWrapper = $( '.count-wrapper', adminbar ); |
9 | 9 |
|
10 | 10 | var previousDeprecations = []; |
11 | 11 |
|
12 | 12 | /** |
13 | 13 | * Filter the trace, return the first URI that is to a plugin or theme script. |
14 | 14 | */ |
15 | 15 | function getSlugFromTrace( trace ) { |
16 | | -let traceLines = trace.split( '\n' ), |
| 16 | +var traceLines = trace.split( '\n' ), |
17 | 17 | match = null; |
18 | 18 |
|
19 | 19 | // Loop over each line in the stack trace |
@@ -85,7 +85,7 @@ jQuery( document ).ready( function( $ ) { |
85 | 85 | * @param message |
86 | 86 | */ |
87 | 87 | function appendNoticeDisplay( message ) { |
88 | | -const list = notice.find( '.jquery-migrate-deprecation-list' ); |
| 88 | +var list = notice.find( '.jquery-migrate-deprecation-list' ); |
89 | 89 |
|
90 | 90 | if ( ! notice.length ) { |
91 | 91 | return; |
@@ -122,7 +122,7 @@ jQuery( document ).ready( function( $ ) { |
122 | 122 | return; |
123 | 123 | } |
124 | 124 |
|
125 | | -let data = { |
| 125 | +var data = { |
126 | 126 | action: 'jquery-migrate-log-notice', |
127 | 127 | notice: message, |
128 | 128 | nonce: JQMH.report_nonce, |
@@ -158,8 +158,8 @@ jQuery( document ).ready( function( $ ) { |
158 | 158 |
|
159 | 159 | // Add handler for dismissing of the dashboard notice. |
160 | 160 | $( document ).on( 'click', '.jquery-migrate-dashboard-notice .notice-dismiss', function() { |
161 | | -const $notice = $( this ).closest( '.notice' ); |
162 | | -const notice_id = $notice.data( 'notice-id' ); |
| 161 | +var $notice = $( this ).closest( '.notice' ); |
| 162 | +var notice_id = $notice.data( 'notice-id' ); |
163 | 163 |
|
164 | 164 | $.post( { |
165 | 165 | url: window.ajaxurl, |
|
0 commit comments