diff --git src/js/_enqueues/admin/common.js src/js/_enqueues/admin/common.js
index 58f68d1..88924bf 100644
|
|
|
|
| 19 | 19 | __ = wp.i18n.__; |
| 20 | 20 | |
| 21 | 21 | /** |
| | 22 | * @param {string} getter The getter that was called. |
| | 23 | * @param {string} version The version of WordPress that deprecated the function. |
| | 24 | * @param {string} replacement Optional. The getter that should have been called. Default null. |
| | 25 | */ |
| | 26 | function deprecatedGetter( getter, version, replacement ) { |
| | 27 | if ( typeof replacement !== 'undefined' ) { |
| | 28 | console.error( getter + ' is deprecated since version ' + version + '! Use ' + replacement + ' instead.' ); |
| | 29 | } else { |
| | 30 | console.error( getter + ' is deprecated since version ' + version + ' with no alternative available.' ); |
| | 31 | } |
| | 32 | } |
| | 33 | |
| | 34 | /** |
| | 35 | * Removed in 5.5.0, needed for back-compatibility. |
| | 36 | * |
| | 37 | * @since 2.6.0 |
| | 38 | * @deprecated 5.5.0 |
| | 39 | */ |
| | 40 | window.commonL10n = {}; |
| | 41 | |
| | 42 | [ 'warnDelete', 'dismiss', 'collapseMenu', 'expandMenu' ].forEach( function( getter ) { |
| | 43 | window.commonL10n.__defineGetter__( getter, function() { |
| | 44 | deprecatedGetter( getter, '5.5', 'wp.i18n' ); |
| | 45 | return ''; |
| | 46 | } ); |
| | 47 | } ); |
| | 48 | |
| | 49 | /** |
| 22 | 50 | * Removed in 3.3.0, needed for back-compatibility. |
| 23 | 51 | * |
| 24 | 52 | * @since 2.7.0 |